Skip to content

Supported Formats

bentopdf selects the conversion engine automatically based on the input file extension. You can override this with --engine.

ExtensionFormatEngineNotes
.docxWord DocumentLibreOffice WASM
.docWord 97–2003LibreOffice WASM
.pptxPowerPointLibreOffice WASM
.pptPowerPoint 97–2003LibreOffice WASM
.xlsxExcelLibreOffice WASM
.xlsExcel 97–2003LibreOffice WASM
.odtOpenDocument TextLibreOffice WASM
.odsOpenDocument SpreadsheetLibreOffice WASM
.odpOpenDocument PresentationLibreOffice WASM
.rtfRich Text FormatLibreOffice WASM
.md / .markdownMarkdownpandoc-wasm → MuPDFTwo-stage: pandoc renders HTML, MuPDF renders to PDF
.html / .htmHTMLpandoc-wasm → MuPDFTwo-stage pipeline
.pngPNG ImageMuPDF
.jpg / .jpegJPEG ImageMuPDF
.svgSVGMuPDF
.tiff / .tifTIFF ImageMuPDF
.webpWebP ImageMuPDF

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).

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).

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.

InputOutputCommandTemplate support
.md / .markdown.docxto-docx--template for reference doc
.html / .htm.docxto-docx--template for reference doc
.md / .markdown.pptxto-pptx--template for reference doc
.html / .htm.pptxto-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.

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:

Terminal window
bentopdf to-pdf notes.txt --engine pandoc