Skip to main content
The @cle-does-things/pdfitdown-wasm package lets you run PdfItDown directly in the browser through WebAssembly. It is built from the pdfitdown-wasm Rust crate using wasm-bindgen and wasm-pack.

Installation

Via npm

Via CDN (esm)

Supported Formats

API

All functions accept a Uint8Array of input bytes and return a Uint8Array of PDF bytes.

General conversion

Specialized converters

If you already know the file type, you can call a dedicated converter for a slightly smaller WASM footprint:

Browser example

Find a full browser example here

Edge example

PdfItDown WASM bindings can be used in edge runtimes such as Cloudflare Workers, AWS Lambdas, Vercel Edge Functions and many others. Here is a quick example on how to set up a CloudFlare worker endpoint:
Full reference here

Build targets

The package ships three build flavours: You can rebuild for a specific target from the monorepo root: