Channel guide

PDFluent for WASM / JavaScript

Public betaUpdated 2026-05-14
On this page

Install

One command. The package is on npm today.

npm install @pdfluent/sdk-wasm@1.0.0-beta.11
Threaded WASM needs cross-origin-isolation headers (Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp). The PDFluent playground is configured this way.

Smoke test

Open a PDF, print the page count. The example below is the smallest useful program — copy, paste, run.

typescript
import init, { PdfDocument } from '@pdfluent/sdk-wasm';

await init();
const bytes = new Uint8Array(await file.arrayBuffer());
const doc = PdfDocument.open(bytes);
console.log(`${doc.pageCount()} pages`);

What this is good for

  • In-browser PDF processing — no server required
  • Privacy-sensitive client-side workflows
  • SaaS demos and document previews

Current limitations

This list is honest, not exhaustive. The site-wide list lives at Known limitations.

  • Public beta — APIs may shift before 1.0.
  • Threaded execution requires the page to be served with COOP/COEP headers.
  • Bundle size: the WASM binary is several MB. Pre-fetch and cache aggressively.
  • XFA rendering fidelity is improving alongside the Rust core.

Licensing

PDFluent ships with a 30-day trial built in. Every paid plan includes a perpetual-fallback licence — your build keeps working at the version you licensed, indefinitely. Details on the licensing page.

Where to go next