Supported Formats
bentopdf selects the conversion engine automatically based on the input file extension. You can override this with --engine.
Format table
Section titled “Format table”| Extension | Format | Engine | Notes |
|---|---|---|---|
.docx | Word Document | LibreOffice WASM | |
.doc | Word 97–2003 | LibreOffice WASM | |
.pptx | PowerPoint | LibreOffice WASM | |
.ppt | PowerPoint 97–2003 | LibreOffice WASM | |
.xlsx | Excel | LibreOffice WASM | |
.xls | Excel 97–2003 | LibreOffice WASM | |
.odt | OpenDocument Text | LibreOffice WASM | |
.ods | OpenDocument Spreadsheet | LibreOffice WASM | |
.odp | OpenDocument Presentation | LibreOffice WASM | |
.rtf | Rich Text Format | LibreOffice WASM | |
.md / .markdown | Markdown | pandoc-wasm → MuPDF | Two-stage: pandoc renders HTML, MuPDF renders to PDF |
.html / .htm | HTML | pandoc-wasm → MuPDF | Two-stage pipeline |
.png | PNG Image | MuPDF | |
.jpg / .jpeg | JPEG Image | MuPDF | |
.svg | SVG | MuPDF | |
.tiff / .tif | TIFF Image | MuPDF | |
.webp | WebP Image | MuPDF |
Engines
Section titled “Engines”LibreOffice WASM
Section titled “LibreOffice WASM”Handles Office and OpenDocument formats via @matbee/libreoffice-converter. The WASM binary (~80 MB) is downloaded on first use and cached. Supports the full LibreOffice filter set.
Handles images and acts as the PDF renderer in the pandoc pipeline via the mupdf npm package. Fast, lightweight, no network download required (ships as a native Node.js addon).
pandoc-wasm
Section titled “pandoc-wasm”Converts Markdown and HTML to an intermediate HTML representation, then passes it to MuPDF for PDF rendering. Handles tables, code blocks, and most CommonMark extensions.
Also used directly for to-docx and to-pptx conversions (see below).
Beyond PDF — DOCX and PPTX output
Section titled “Beyond PDF — DOCX and PPTX output”In addition to PDF conversion, bentopdf can convert Markdown and HTML to DOCX and PPTX using pandoc-wasm directly. This goes beyond what BentoPDF offers in the browser.
| Input | Output | Command | Template support |
|---|---|---|---|
.md / .markdown | .docx | to-docx | --template for reference doc |
.html / .htm | .docx | to-docx | --template for reference doc |
.md / .markdown | .pptx | to-pptx | --template for reference doc |
.html / .htm | .pptx | to-pptx | --template for reference doc |
The --template flag accepts a reference document (.docx or .pptx) that controls fonts, heading styles, page/slide layout, and other formatting. This works like pandoc’s --reference-doc option.
Unsupported formats
Section titled “Unsupported formats”If you pass a file with an unrecognised extension, bentopdf exits with code 1 and prints:
Error: no engine registered for extension ".xyz"Use --engine to force an engine if you know the file format is compatible:
bentopdf to-pdf notes.txt --engine pandoc