This is a fork of qpdf-wasm that uses ESM instead of CommonJS.
It is adjusted for the browser and has the following differences due to changes in build options:
- It is an ES module instead of a CommonJS module.
- It names the exported default function
QPDF
instead ofModule
(default name). - It build
qpdf.mjs
instead ofqpdf.js
. - It accepts overloading of the
print
andprintErr
methods.
Build with docker and run see the tests/test.html
.
qpdf
compiled to WASM via Emscripten. This doesn't expose the qpdf
library - just the CLI.
npm install --save @jspawn/qpdf-wasm
See the tests
directory for examples.