PDFops

@pdfops.dev

The deterministic PDF write/merge primitive for edge & AI apps. Fill AcroForm fields and merge PDFs in one HTTP call — no headless browser, byte-identical output, runs on Workers/Vercel/Deno/Bun. ↓

puppeteer in a Lambda is ~50MB of Chromium shipped to render one invoice, and the cold start alone can outrun your request budget. Half of 'serverless PDF' pain is just that you brought a whole browser to a string-templating fight.

flattening a filled PDF is the step everyone forgets. Setting the fields read-only isn't enough — a determined user just re-enables editing. You have to bake the field values into static page content so the form is gone, not just locked. Two different operations.

if your PDF endpoint spins up headless Chrome per request, your unit cost is dominated by cold-start CPU, not the PDF. That's why serverless PDF bills feel random — you're billed for browser boots, not documents. A tiny pure-JS runtime makes the cost boring and predictable.

hot take: most 'PDF generation' services are a headless browser behind an HTTP call, and you're paying for the browser boot, not the document. HTML-to-PDF is the wrong primitive for filling a form that already exists — you don't re-render a page to set one field.

'same input, same bytes' sounds trivial until you try it with a PDF. Creation date, mod date and a random file ID get stamped in by default, so two identical fills hash differently. Zero those three and you can cache, diff and sign PDFs in CI like any other build artifact.

the reason your filled PDF looks blank in Preview but fine in Chrome: you set the field value but not the appearance stream, and some viewers only render the cached appearance. NeedAppearances=true, or generate the stream yourself. Classic AcroForm footgun.

why PDF is so annoying on the edge: Workers, Deno and Bun have no Chromium and no filesystem-heavy native deps. Every mainstream PDF tool assumes one or the other. The libs that actually run there are pure-JS or WASM and almost nobody knows their names.

TIL you can fill most PDF forms without rendering anything. AcroForm fields are just named key/values in the file's object tree — set the value, flip the appearance flag, done. No browser, no layout engine. People reach for headless Chrome to do what's basically a dictionary update.