BentoPDF uses three AGPL-licensed WASM libraries to power advanced PDF features. By default, these libraries are loaded at runtime from jsDelivr CDN — no configuration needed. For custom deployments (air-gapped networks, self-hosted infrastructure, or CDN restrictions), you can override the URLs at build time.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alam00000/bentopdf/llms.txt
Use this file to discover all available pages before exploring further.
AGPL components
| Component | License | Features |
|---|---|---|
| PyMuPDF | AGPL-3.0 | PDF to Text/Markdown/SVG/DOCX, extract images/tables, EPUB/MOBI/XPS conversion, compression, deskew |
| Ghostscript | AGPL-3.0 | PDF/A conversion, font to outline |
| CoherentPDF | AGPL-3.0 | Merge (preserve bookmarks), split by bookmarks, table of contents, PDF to/from JSON, attachments |
BentoPDF does not bundle these libraries in its source code. It pre-configures CDN URLs so that the user’s browser downloads them at runtime. The URLs themselves are baked into the JavaScript bundle at build time — changing them after the image is built has no effect.
Default configuration
The following defaults are set in.env.production and work out of the box:
Overriding WASM URLs
You can override any WASM URL at build time to point to your own server or internal mirror.- Docker build args
- .env.production
Pass the URLs as Docker build arguments:
CDN optimization
When building from source, you can enable CDN optimization so the browser loads large WASM files from jsDelivr, with local files as an automatic fallback:VITE_USE_CDN=true is set, jsDelivr is the primary source and local WASM files serve as fallback if the CDN is unreachable.
OCR configuration
OCR is powered by Tesseract.js. By default, Tesseract.js uses its own runtime defaults for worker and core URLs. For self-hosted or air-gapped deployments, set all three Tesseract variables together:VITE_TESSERACT_AVAILABLE_LANGUAGES to the same comma-separated list. This limits the UI to only the installed languages and shows a descriptive error for unsupported selections:
VITE_OCR_FONT_BASE_URL to the directory that serves the bundled OCR text-layer fonts:
User overrides
Users can override WASM URLs in the app’s Advanced Settings panel in the browser. Browser-side overrides take priority over build-time defaults. This means you can ship a build with CDN defaults and let individual users point to their own mirrors without requiring a rebuild.Disabling a module
To disable a WASM module entirely (for example, to prevent PyMuPDF from loading automatically), set its URL variable to an empty string at build time:CORS proxy for digital signatures
The Digital Signature tool may need to fetch certificate chain data from external certificate authority servers. Many CA servers do not include CORS headers, and some serve over plain HTTP — both of which browsers block on HTTPS pages. A CORS proxy is required in these cases.The proxy is only needed when using the Digital Signature tool and only when your certificate requires fetching issuer certificates from external URLs. Self-signed certificates typically do not need it.
Deploy the worker
https://bentopdf-cors-proxy.your-subdomain.workers.dev).