Skip to content

Releases: fayazara/pdfstudio

v0.4.0

Choose a tag to compare

@fayazara fayazara released this 11 Jul 08:55

Fixed

  • Fixed qpdf's wasm glue misdetecting the Cloudflare Workers runtime as Node.js when the nodejs_compat compatibility flag is enabled.

    The Emscripten-generated glue picks its code path via globalThis.process?.versions?.node. nodejs_compat polyfills process for compatibility with npm packages that expect it, which made the glue falsely take the Node.js branch. That branch calls createRequire(import.meta.url), which throws in a bundled Worker since there's no real file: URL to resolve — breaking every unlock/lock/merge/etc. call on Workers with nodejs_compat on (the majority of real-world Workers apps).

    Now detects the Workers runtime via navigator.userAgent === 'Cloudflare-Workers' (stable regardless of nodejs_compat, and never present in real Node.js) and hides process only for the duration of the one call that does the misdetection, restoring it immediately after. No API changes; real Node.js and browser usage are unaffected.

pdfstudio 0.3.0

Choose a tag to compare

@fayazara fayazara released this 11 Jul 06:17

First public release on npm: npm install pdfstudio

Client-side PDF toolkit powered by qpdf 12.3.2 compiled to WebAssembly (2.1 MB). Runs in browsers, Node.js ≥ 18, and Cloudflare Workers — files never leave the device.

Operations: lock (AES-256/128/40 + permissions), unlock, change/remove password, merge, split, extract/delete/reverse pages, rotate, collate, watermark (overlay/underlay), compress, linearize, repair, flatten, attachments (add/get/list/remove), typed getInfo, imagesToPdf (pure-TS JPEG→PDF), and a raw qpdf escape hatch.

43 end-to-end tests. Fully typed API. Apache-2.0.

🤖 Generated with Claude Code