npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bentopdf-sh

v0.2.0

Published

Convert documents to PDF using WASM engines — no native dependencies

Downloads

331

Readme

bentopdf-sh

A command-line interface for document-to-PDF conversion, powered by BentoPDF.

BentoPDF is a privacy-first, self-hosted PDF toolkit that runs entirely client-side using WebAssembly. It provides 50+ document tools through a browser interface. bentopdf-sh brings those same WASM engines to the command line, so you can convert documents without opening a browser.

All the heavy lifting is done by BentoPDF's engines. We just make them accessible from your terminal.

Install

npx bentopdf-sh to-pdf document.docx

Or install globally:

npm install -g bentopdf-sh
bentopdf to-pdf document.docx

Requires Node.js 20+.

Claude Code / AI Agent Integration

Add the to-pdf skill to your AI coding agent:

npx skills add lokkju/bentopdf-sh -a claude-code

Or install as a Claude Code plugin:

/plugin marketplace add lokkju/bentopdf-sh

This lets your agent convert documents to PDF directly when you ask it to.

Usage

Convert a file to PDF

bentopdf to-pdf report.docx                    # outputs report.pdf
bentopdf to-pdf slides.pptx -o presentation.pdf # explicit output
bentopdf to-pdf *.docx -o ./pdfs/               # batch convert

Convert Markdown to DOCX or PPTX

bentopdf to-docx notes.md                          # outputs notes.docx
bentopdf to-pptx slides.md -o presentation.pptx    # explicit output
bentopdf to-docx notes.md -t brand-template.docx   # apply a reference doc
bentopdf to-pptx slides.md -t corporate.pptx       # branded slide deck

Use --template (-t) to apply a reference document — this controls fonts, heading styles, page layout, and other formatting. Works like pandoc's --reference-doc.

Supported formats

| Format | Extensions | Engine | |--------|-----------|--------| | Word | .docx, .doc | LibreOffice-WASM | | PowerPoint | .pptx, .ppt | LibreOffice-WASM | | Excel | .xlsx, .xls | LibreOffice-WASM | | OpenDocument | .odt, .ods, .odp | LibreOffice-WASM | | Rich Text | .rtf | LibreOffice-WASM | | Markdown | .md, .markdown | Pandoc + MuPDF | | HTML | .html, .htm | Pandoc + MuPDF | | Images | .jpg, .png, .svg, .tiff, .webp | MuPDF |

Options (to-pdf)

-o, --output <path>   Output file or directory
--engine <name>       Force engine: mupdf, pandoc, or libreoffice
--verbose             Show detailed progress

Options (to-docx / to-pptx)

-o, --output <path>     Output file or directory
-t, --template <path>   Reference document for styling
--verbose               Show detailed progress

Cache management

WASM engines are cached locally after first use.

bentopdf cache list    # show cached engines
bentopdf cache clear   # remove all cached engines

How it works

bentopdf-sh wraps three WASM engines as npm packages, running them in Node.js instead of the browser:

  • MuPDF (via mupdf npm package) — images and HTML to PDF
  • Pandoc (via pandoc-wasm) — Markdown to HTML, then MuPDF renders to PDF
  • LibreOffice (via @matbee/libreoffice-converter) — Office documents to PDF

The format registry automatically picks the right engine based on file extension. No configuration needed.

Beyond BentoPDF

Some features in bentopdf-sh go beyond what BentoPDF offers in the browser, by leveraging pandoc-wasm's full capabilities:

| Feature | Command | Description | |---------|---------|-------------| | Markdown → DOCX | to-docx | Convert Markdown/HTML to Word documents via pandoc-wasm | | Markdown → PPTX | to-pptx | Convert Markdown/HTML to PowerPoint presentations via pandoc-wasm | | Template support | --template | Apply a reference document (.docx/.pptx) for branded output — controls fonts, styles, and layout |

These work because pandoc-wasm exposes the full pandoc-server API, which supports output formats and reference documents that BentoPDF's browser interface doesn't expose.

Planned:

  • [ ] inspect command — preview how pandoc will interpret your Markdown before converting (slide boundaries for PPTX, heading structure for DOCX, template style compatibility)

Feature Parity Roadmap

BentoPDF provides 100+ tools across six categories (as of 2026-03-17). Here's what bentopdf-sh supports today and what's planned. Vote on or open issues to help guide development priorities.

Convert to PDF

  • [x] Word (.docx, .doc)
  • [x] Excel (.xlsx, .xls)
  • [x] PowerPoint (.pptx, .ppt)
  • [x] OpenDocument Text (.odt)
  • [x] OpenDocument Spreadsheet (.ods)
  • [x] OpenDocument Presentation (.odp)
  • [x] Rich Text (.rtf)
  • [x] Markdown (.md)
  • [x] HTML (.html, .htm)
  • [x] Images — JPG, PNG, SVG, TIFF, WebP
  • [ ] BMP, HEIC, PSD
  • [ ] CSV, Text, JSON, XML
  • [ ] EPUB, MOBI, FB2
  • [ ] CBZ (Comic Books)
  • [ ] XPS
  • [ ] Email (.eml, .msg)
  • [ ] Apple Pages
  • [ ] WordPerfect (.wpd)
  • [ ] Microsoft Works (.wps)
  • [ ] Microsoft Publisher (.pub)
  • [ ] Microsoft Visio (.vsd)
  • [ ] OpenDocument Drawing (.odg)

Convert from PDF

  • [ ] PDF to Image (JPG, PNG, WebP, BMP, TIFF, SVG)
  • [ ] PDF to Greyscale
  • [ ] PDF to Text
  • [ ] PDF to JSON / CSV / Excel
  • [ ] Extract Tables
  • [ ] OCR PDF

Organize & Manage

  • [ ] Merge PDFs
  • [ ] Split PDF
  • [ ] Extract / Delete / Rotate Pages
  • [ ] Organize / Reorder Pages
  • [ ] N-Up / Booklet / Posterize
  • [ ] Alternate & Mix Pages
  • [ ] Divide / Combine Pages
  • [ ] Add Blank Page / Reverse Pages
  • [ ] Attachments (Add / Extract / Edit)
  • [ ] View Metadata
  • [ ] Compare PDFs
  • [ ] PDFs to ZIP

Edit & Modify

  • [ ] PDF Editor / Annotate
  • [ ] Fillable Forms / Form Filler
  • [ ] Add Page Numbers / Bates Numbering
  • [ ] Watermark / Stamps
  • [ ] Header & Footer
  • [ ] Crop / Deskew
  • [ ] Font to Outline
  • [ ] Color adjustments (Invert, Background, Text Color)
  • [ ] Flatten PDF
  • [ ] Remove Annotations / Blank Pages
  • [ ] Edit Bookmarks / Table of Contents
  • [ ] Redact Content
  • [ ] Scanner Effect

Secure & Optimize

  • [ ] Compress PDF
  • [ ] Repair PDF
  • [ ] Encrypt / Decrypt
  • [ ] Change Permissions / Remove Restrictions
  • [ ] Digital Signatures (Sign / Validate)
  • [ ] Metadata (Edit / Remove / Sanitize)
  • [ ] Linearize for Web
  • [ ] Fix Page Size / Page Dimensions

Automate

  • [ ] Pipeline / Workflow Builder (chain multiple operations)

Want a feature prioritized? Open an issue or upvote an existing one.

Acknowledgments

This project exists because of BentoPDF by @alam00000. BentoPDF pioneered the approach of running document conversion engines entirely client-side via WebAssembly, and provides a comprehensive browser-based toolkit with 50+ tools across five categories. bentopdf-sh is a CLI wrapper around the same underlying WASM technology — BentoPDF did the hard work of making these engines run in JavaScript, we just plugged in a command-line interface.

If you need a browser-based solution or a self-hosted web app, use BentoPDF directly.

License

AGPL-3.0-or-later. See LICENSE.md.

This license is required by our dependency chain — MuPDF is AGPL-3.0 and Pandoc is GPL-2.0. BentoPDF itself is also AGPL-3.0.