Every time an engineering team or internal operations unit needs to merge, redact, convert, or sign a PDF, the default path has historically involved piping sensitive documents into proprietary cloud endpoints. Handing over unencrypted financial reports, internal architectural blueprints, or employee identification files to a black-box SaaS server introduces immediate security and privacy vulnerabilities.
BentoPDF challenges this entire model. It is an open-source, client-side toolkit that moves document manipulation directly into the browser runtime. By executing operations on the local machine using modern web technologies like WebAssembly, BentoPDF guarantees that files never touch an external server, removing round-trip network latency, subscription paywalls, and privacy hazards in a single stroke.
The Architectural Shift: Client-Side Document Processing
Standard document processing platforms require an upstream HTTP POST request containing your raw binary file, backend compute processing via server-side libraries, and a subsequent downstream download. BentoPDF replaces this architecture with local in-browser compute.
Traditional PDF SaaS Pipeline:
[Browser] --- (Raw Document Upload over Network) ---> [External Backend Server] ---> [Processing] ---> [Download Payload]
BentoPDF Architecture:
[Browser Window]
├── WebAssembly & Core Engines (PDFLib.js, PDF.js, PDFKit)
└── Local Browser Memory Execution (100% In-Memory Processing / Zero Network Egress)
Because all document rendering, transformation, and structural byte manipulation execute locally inside the browser session, the engine operates with clear advantages:
- Absolute Privacy: Files are never transmitted over a wire to an external backend. No telemetry tracks the document content, and no user registration, password, or email is required.
- Uncapped Throughput: Without upstream server limits, users can process large files without throttling, arbitrary page caps, or upload size restrictions.
- Low Latency Execution: Skipping file upload and download cycles means processing speeds depend solely on local hardware execution.
Comprehensive Feature Breakdown
BentoPDF packages a vast array of document operations, spanning simple page restructuring to cryptographic encryption and visual manipulation.
1. Document Organization and Assembly
Managing page layouts and physical ordering happens entirely within an interactive UI.
| Tool Name | Operational Capability |
|---|---|
| Merge PDFs | Combines multiple distinct PDF documents into a unified output file. |
| Split PDFs | Extracts designated pages or partitions large files into separate parts. |
| Organize Pages | Provides a visual drag-and-drop interface to reorder, duplicate, or delete pages. |
| Extract Pages | Saves an isolated range of page indexes as an independent PDF document. |
| Delete Pages | Strips out specified, unwanted pages from the document stream. |
| Rotate PDF | Alters the orientation of single pages or entire document arrays. |
| N-Up PDF | Consolidates and renders multiple source pages onto a single output sheet. |
| View PDF | An integrated, high-performance client-side document viewer. |
2. Editing, Canvas Modifications, and Forms
BentoPDF allows direct visual updates and modifications to the underlying page canvas.
| Tool Name | Operational Capability |
|---|---|
| PDF Editor | Provides an editing workspace to modify document elements. |
| Add Page Numbers | Injects customizable numbering across chosen page intervals. |
| Add Watermark | Overlays text or image-based watermarks for copyright and security purposes. |
| Header & Footer | Inserts configurable structural headers and footers. |
| Crop PDF | Re-adjusts canvas bounding boxes for single pages or whole documents. |
| Invert Colors | Inverts page color spectrums to optimize readability. |
| Change Background | Alters the background canvas color of the document. |
| Change Text Color | Modifies the color palette of existing text elements. |
| Fill Forms | Completes interactive form fields directly in the browser session. |
| Flatten PDF | Freezes form inputs and annotations into immutable, static page content. |
| Remove Annotations | Strips user comments, highlights, and markup layers from the file. |
3. Cross-Format Conversions
Format transformation modules allow developers to migrate assets into and out of the PDF specification.
- Image to PDF: Ingests JPG, PNG, WebP, SVG, BMP, HEIC, and TIFF formats, packaging them into standardized PDF pages.
- Markdown to PDF: Parses
.mdsource files and compiles them into formatted PDF documents. - Text to PDF: Converts raw plain text streams into standard paginated documents.
- PDF to Image: Extracts individual PDF pages into raster image formats (JPG, PNG, WebP, BMP, TIFF).
- PDF to Greyscale: Converts color document assets into single-channel black-and-white layouts.
- OCR PDF: Runs Optical Character Recognition over scanned inputs to produce searchable, selectable text layers.
4. Security, Sanitization, and Optimization
Document security modules ensure granular control over metadata, content permanence, and document integrity.
+-------------------------------------------------------------------------+
| BentoPDF Security & Optimization |
+--------------------+---------------------+------------------------------+
| Cryptography | Redaction & Access | File Optimization |
+--------------------+---------------------+------------------------------+
| • Encrypt (Pass) | • Redact Content | • Compress PDF |
| • Decrypt (Pass) | • Strip Metadata | • Repair Corrupted Files |
| • Digital Signing | • Edit Metadata | • Modify Permissions |
+--------------------+---------------------+------------------------------+
- Redact Content: Permanently purges sensitive information from the document structure rather than applying cosmetic masks.
- Compress PDF: Reduces raw byte payloads while maintaining visual output quality.
- Repair PDF: Analyzes and recovers readable data structures from damaged or corrupted binaries.
- Permissions & Cryptography: Encrypts or decrypts files with user passwords and configures user permission flags for printing, copying, and editing.
- Metadata Control: View, edit, or entirely strip identifying metadata (authors, titles, keywords) to maintain complete operational anonymity.
Inside the Tech Stack: From Legacy JS to Modern Tooling
BentoPDF was originally conceived using foundational HTML, CSS, and vanilla JavaScript. As feature complexity grew, the codebase transitioned toward a modern architecture to ensure type safety, developer velocity, and maintainable state management:
- Vite: Serves as the primary frontend build tool and dev server, speeding up module bundling.
- TypeScript: Implements static typing across complex PDF object models and data payloads.
- Tailwind CSS: Manages the utility-first styling layer for responsive layouts.
Underneath the UI layer, BentoPDF relies on specialized open-source engines to perform in-browser rendering, editing, and transformations:
- PDFLib.js (PDF-lib): Handles in-memory client-side PDF manipulation, structure modifications, and assembly.
- PDF.js: Drives canvas-level PDF parsing and in-browser rendering.
- PDFKit: Supplies programmatic creation and document generation primitives.
- EmbedPDF: Facilitates interactive document embedding within web components.
- Cropper.js: Powers interactive visual cropping workflows for image and page boundaries.
Note on current state: Parts of the codebase still retain legacy structures from the original vanilla implementation. Refactoring and automated test additions continue as the project evolves.
Getting Started: Deployment and Local Setup
BentoPDF can be deployed as an isolated self-hosted service on private infrastructure or run locally on a developer workstation.
Prerequisites
- Node.js (v18 or higher recommended)
- npm, yarn, or pnpm
- Docker and Docker Compose (for containerized deployments)
Option 1: Instant Run via Docker Hub
The quickest path to spin up BentoPDF without managing source files is using the official Docker image:
bashdocker pull bentopdf/bentopdf:latest docker run -p 3000:80 bentopdf/bentopdf:latest
Navigate to http://localhost:3000 to access the full suite.
Option 2: Local Docker Compose Setup
To run containerized services directly from the cloned repository:
bashgit clone https://github.com/alam00000/bentopdf.git cd bentopdf docker-compose up -d
The application will be accessible at http://localhost:3000. To apply local code modifications inside the container, rebuild using:
bashdocker-compose up --build -d
Option 3: Local Node.js Development
To run the bare-metal Vite dev environment:
bashgit clone https://github.com/alam00000/bentopdf.git cd bentopdf npm install npm run dev
The Vite development server will bind to http://localhost:5173.
The BentoPDF Roadmap
The project is distributed under the open-source Apache 2.0 license. Community contributions and roadmap discussions take place actively on Discord. Upcoming roadmap targets include:
- HTML to PDF: Direct conversion of raw HTML files and live web pages into formatted PDF documents.
- Enhanced Markdown to PDF: Expanded styling and feature support for converting
.mddocuments. - Sanitize PDF: Automated structural cleaning to strip out malicious payloads, embedded scripts, and unwanted interactive code.
- Convert to PDF/A: Transformation of standard documents into the ISO-standardized PDF/A format for long-term digital preservation.
- Direct Content Editing: In-place modification of existing document text and embedded vectors.
- Linearize PDF: Optimization of PDF byte structures for "Fast Web View" streaming over HTTP.
By treating document manipulation as a client-side capability rather than a monetized cloud service, BentoPDF gives developers and security-conscious teams a fast, private, and fully open-source alternative to conventional PDF platforms.
