{
// 1. Verify the form provider's webhook signature (per-provider; ~5 lines)
const raw = await req.text();
if (!(await verifySignature(req, raw, process.env.FORM_WEBHOOK_SECRET!))) {
return new Response('bad signature', { status: 401 });
}
const data = JSON.parse(raw) as OnboardingPayload;
// 2. Fetch the W-9 template from Vercel Blob (or bundle at build time).
const templateResp = await fetch(process.env.W9_TEMPLATE_URL!);
if (!templateResp.ok) return new Response('template missing', { status: 500 });
const templatePdf = await templateResp.arrayBuffer();
// 3. Call PDFops /api/fill-form. Field names must match the W-9
// template's AcroForm field names — see the "template" section below
// for how I named them. Keep the W-9 signature/date lines blank;
// the contractor still signs the final doc.
const fd = new FormData();
fd.append('pdf', new Blob([templatePdf], { type: 'application/pdf' }), 'w9-template.pdf');
fd.append('fields', JSON.stringify({
legal_name: data.legal_name,
business_name: data.business_name ?? '',
tax_class: data.tax_classification,
address: [data.address_line_1, data.address_line_2].filter(Boolean).join(', '),
city_state_zip: `${data.city}, ${data.state} ${data.zip}`,
tin: data.tin,
}));
const pdfResp = await fetch('https://pdfops.dev/api/fill-form', { method: 'POST', body: fd });
if (!pdfResp.ok) {
// Return 500 so the form provider retries (Tally/Typeform both retry on 5xx)
return new Response(`PDFops error: ${await pdfResp.text()}`, { status: 500 });
}
const filledPdf = await pdfResp.arrayBuffer();
// 4. Stash the filled W-9 in Vercel Blob with a non-guessable key.
// Do NOT use the contractor's email or TIN in the key — see the
// "auth boundary" paragraph below.
const objectKey = `w9/${crypto.randomUUID()}.pdf`;
const { url } = await put(objectKey, filledPdf, {
access: 'public', // see auth-boundary discussion below
contentType: 'application/pdf',
});
// 5. Fire-and-forget email with the download URL.
fetch(process.env.EMAIL_WEBHOOK_URL!, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
to: data.email,
subject: 'Your pre-filled W-9 — please review and sign',
html: `We filled in your W-9 from your onboarding answers. ` +
`Open, double-check, sign, and email it back: ` +
`${url}
`,
}),
}).catch(() => {});
return new Response('OK');
}
That's the production-shape. Deploy it to Vercel, point your onboarding form's webhook at the URL, drop your W-9 template into Vercel Blob, and every contractor who finishes the form receives a pre-filled W-9 in their inbox within a second.
One auth-boundary footgun worth flagging: a
W-9 contains the contractor's TIN (SSN for individuals, EIN
for entities) — that's PII that belongs nowhere near a
publicly-guessable URL. The code above uses crypto.randomUUID()
as the blob key, which is unguessable in practice, but the
object is still access: 'public' — anyone with the
UUID can fetch it. That's fine for a short-lived email
link the contractor opens once, but if you want the link
to be revocable, store the blob with access: 'private'
and email a signed URL (Vercel Blob's head() + a
short-TTL signed redirect via your own route, or move to
S3-compatible storage with native presigned URLs). The
code above keeps the happy-path visible; tighten the
download boundary before you send the first email.
The template
Download the IRS's current W-9 PDF from irs.gov/pub/irs-pdf/fw9.pdf — the official version is already AcroForm-enabled. Open it in Acrobat, Mac Preview, or LibreOffice Draw, and rename the form fields to short, predictable names that your code can target (legal_name, business_name, tax_class, address, city_state_zip, tin). The IRS's default field names are long and inconsistent across PDF versions; renaming them once lets your code survive the annual W-9 form refresh. The free form-field inspector lists a template's current field names — handy for checking your renames took.
Upload the renamed template to Vercel Blob via vercel blob put or the dashboard. ~80-200 KB is typical; well under any practical limit. For W-8BEN (non-US contractors) the same approach works against fw8ben.pdf — branch on contractor country in the function and pick the right template.
The cost math
Contractor onboarding is usually low-volume per business (tens to hundreds per year), but multiply across a portfolio and it adds up. At 5,000 W-9s per year across a holdco — a realistic number for an agency, staffing firm, or multi-business operator — here's how the substrate matters:
Manual back-and-forth: ~10 minutes of human time per contractor (send blank PDF, chase, scan, OCR, re-key into your system). At $30/hr loaded ops cost, 5,000 × 10 min = ~833 hours = ~$25,000/yr in ops drag. And the data quality is worse than what the contractor already typed into the onboarding form.
DocRaptor or similar hosted PDF API: $0.05–$0.20/doc × 5,000 = $250–$1,000/yr. Cheaper than the manual approach but priced from a substrate that doesn't fit edge-deployed apps.
Headless Chrome on Lambda: ~$5-15/yr of compute at this volume, but the operational cost is the same as ever — Chrome layer, cold starts, the occasional render-failure rabbit hole.
PDFops (post-beta): priced from the substrate's unit economics. Per-document pricing lands when paid tiers open; the substrate the API runs on puts the floor at a different number entirely. During beta: 100 requests per IP per month, free, no signup.
Update 2026-11-09: the $0.05-$0.20 per document range above is out of date. Current published prices are lower: DocRaptor's Max plan works out to about 3.7 cents per document at 4,000 documents a month, PDFShift about 1 cent or less, and PDFMonkey about 0.5 cent (prices read 2026-11-09). See the comparisons.
The point isn't that PDFops generates W-9s faster than alternatives. It's that the hosting substrate has different unit economics, and that difference passes through to per-document pricing — while removing the ops drag of the manual back-and-forth entirely.
When this pattern doesn't fit
You need the contractor to e-sign the PDF inside your app, not just download-print-sign-email-back. That's a DocuSign / Dropbox Sign / HelloSign workflow on top of the filled PDF. The fill-form step above is still upstream of that — auto-fill the W-9 from onboarding answers, then feed the filled PDF into your e-sign provider.
You need to extract data from a W-9 the contractor uploaded (the reverse direction — OCR or AcroForm field extraction). That endpoint (/api/extract-text) is on the roadmap but not shipped yet. The waitlist is how I'm prioritizing.
You're handling thousands of W-9s per month and need them archived for IRS audit purposes. The fill-form pattern still works; you'll want a real storage layer with retention and access logging in front of Vercel Blob (most ops teams already have one — S3 + a retention policy is fine). The PDFops call doesn't touch the long-term archive; it just produces the filled PDF.
Try it
The fill-form endpoint is live and works against any AcroForm PDF — not just W-9s. Same shape for I-9s, 1099 templates, vendor-onboarding NDAs, or any pre-designed form you want a webhook to populate:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@w9-template.pdf" \
-F 'fields={"legal_name":"Alex Doe","business_name":"","tax_class":"individual","address":"123 Main St","city_state_zip":"Austin, TX 78701","tin":"123-45-6789"}' \
-o filled-w9.pdf
You'll get a filled W-9 PDF back. From there it's just wiring it into a webhook handler shaped like the function above.
Onboarding-flow questions, missing endpoints, edge-deploy weirdness? Drop a note on the waitlist form — the message field is the fastest way to influence what ships next.
Related
Assembling a KYC packet on Deno Deploy — the same fill pattern, extended to multi-document packets
The /api/inspect endpoint reference — list a template's form fields programmatically
Fill a PDF form in JavaScript — the fill-form call outside a webhook context
The case for deterministic PDF filling — why tax forms shouldn't be filled by a model
← All posts · PDFops home
---
# Filling encrypted government PDFs: what actually works, measured
Source: https://pdfops.dev/blog/filling-encrypted-government-pdfs
Guide
Filling encrypted government PDFs: what actually works, measured
2026-08-07 · ~6 min read
You download an official blank from a court or tax site, it opens in
every viewer without asking for anything, and then your code throws:
Input document to PDFDocument.load is encrypted. There is
no password to supply, because the file was published for the public.
We ran two real forms in this class, California's FL-100 divorce
petition and Canada's TD1 tax credits return, through seven
independent fill tools and recorded exactly which ones cope.
Why a public form rejects your library
These blanks are AES-encrypted with an empty user password.
The PDF spec allows a document to carry two passwords: a user
password that gates opening, and an owner password that gates
modification. Publishers set the user password to the empty string,
so any viewer decrypts the file silently, and set a real owner
password to discourage edits. Strict parsers see the encryption
dictionary, notice they were given no credentials, and refuse the
whole file. That is the correct reading of the spec and a useless
outcome for you.
pdf-lib and its maintained fork @cantoo/pdf-lib both
reject FL-100 and TD1 at load. The
PDFops fill API is built on the same
family and refuses too, with a 400 encrypted_pdf that
tells you the workaround instead of leaving you to guess. pypdf
opens both files directly when installed as
pypdf[crypto], but writes text fields only. The full
per-tool results live on the registry pages for
ca-fl-100 and
cra-td1.
The shell answer: pdftk fills them natively
The one mainstream tool that treats an empty user password like a
viewer does is pdftk-java. It enumerated all 158 fields
of FL-100, filled 148 of them (every text field, checkbox and radio
group; the rest take no value by design), and re-reading its output
confirmed all 148 values landed. Same story on TD1: 27 of 27. No
decrypt step, and the output file comes out unencrypted.
# enumerate fields (works despite the encryption)
pdftk fl100.pdf dump_data_fields > fields.txt
# fill from an FDF file
cat > values.fdf <<'EOF'
%FDF-1.2
1 0 obj
<< /FDF << /Fields [
<< /T (FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyFor_ft[0]) /V (Jane Doe) >>
] >> >>
endobj
trailer
<< /Root 1 0 R >>
%%EOF
EOF
pdftk fl100.pdf fill_form values.fdf output filled.pdf
pdftk prints a warning about the owner password and carries on. The
owner password restricts editing as a matter of policy, and pdftk
takes the position that a file the public can open is a file the
public can fill. Adobe's own tools take the stricter position. Know
which side your compliance story needs before you rely on this.
The dump_data_fields trap
One gotcha cost us an hour and produces a convincing false negative.
On forms that carry an XFA layer alongside the normal field tree,
dump_data_fields prints two
FieldValue lines per field: an empty one first, then
the real value.
FieldName: FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyFor_ft[0]
FieldNameAlt: ATTORNEY FOR (name):
FieldFlags: 8388608
FieldValue:
FieldValue: Jane Doe
A verification script that greps the first FieldValue
line reads an empty string, concludes the fill silently failed, and
sends you debugging a problem that does not exist. Collect every
FieldValue line for a field and check whether any of
them matches what you wrote.
The in-process answer: decrypt first
If your fill runs inside a JS or Python service rather than a shell
pipeline, remove the restriction up front with qpdf. The
transformation is lossless: same pages, same fields, same
appearance.
qpdf --decrypt fl100.pdf fl100-open.pdf
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@fl100-open.pdf" \
-F 'fields={"FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyFor_ft[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
After the decrypt, the file behaves like any other AcroForm: pdf-lib
loads it, the API fills and flattens it, and field values verify on
re-inspection. In our runs this path landed every supported field on
both forms.
How common is this class?
More common than two unlucky picks. After this post was drafted we
extended the corpus to 22 forms, and five of them ship
empty-password AES: FL-100 and FL-150
(so it is the California Judicial Council's house style, on 2 of 2
sampled), TD1 and T2200 (same for
the CRA, 2 of 2), and SSA-89, the SSN
verification consent signed in most US mortgage closings. pdftk
filled all five natively; every pdf-lib-family tool refused all
five. If your product touches court filings, Canadian tax paperwork
or lending, you will meet this class.
The forms this does not save
Encryption is sometimes the smaller half of the problem. Every
current USCIS form we sampled except the
I-9 combines this same empty-password
AES with a dynamic XFA body, which means the visible form is
rendered from an embedded XML template rather than from the AcroForm
field tree. qpdf gets you through the encryption, but fillers in the
pdf-lib family then write the AcroForm layer and drop XFA on save,
and pdftk inherits the same limits. For that class, plan on the
AcroForm output being correct in mainstream viewers and blank in
old XFA-first Adobe products, or use the agency's own e-filing
channel.
Related
CA FL-100 registry page: the full seven-tool matrix, field schema, and provenance hash for the encrypted court form
CRA TD1 registry page: the same measurements for the Canadian tax form, which adds an XFA layer on top of the encryption
Deterministic PDF filling: why two runs of the same fill should produce byte-identical output, and how PDFops guarantees it
← All posts · PDFops home
---
# Flat PDFs: field detection
Source: https://pdfops.dev/blog/flat-pdfs-field-detection
Release
Flat PDFs: field detection
2026-11-25 · ~5 min read
A flat PDF is a form with no form fields: the blanks are just lines
and boxes drawn on the page, so there is nothing to fill. PDFops now
finds those blanks. Send a flat PDF to
POST /api/detect-fields
and get a fillable PDF back in one request, or a list of suggested
fields to review first. The same detection is a tool in the hosted
MCP server and a button in the browser.
What it finds
It reads the page's drawing and text layer and works out where a
person would write: a horizontal rule, an empty box, a run of
underscores, a small square for a checkbox. Each field gets a name
from the nearest printed label (for a text field: inside the box, to its left, above it or below it; for a checkbox: to its left or right), a position and a confidence between 0 and 1.
The rules are fixed geometry, so the same file always gives the
same answer, and no model reads the page.
One request, a fillable PDF
Add format=pdf and the endpoint detects the fields,
adds them to the PDF and returns the result. It counts as one
request. The sample below is a one-page membership form with
blanks drawn on it. Download it, then run the call with your own key
(or use your own flat PDF).
curl -sO https://pdfops.dev/sample-flat-form.pdf
curl -s -D headers.txt -X POST https://pdfops.dev/api/detect-fields \
-H "X-API-Key: $PDFOPS_API_KEY" \
-F "pdf=@sample-flat-form.pdf" -F format=pdf -o fillable.pdf
grep -i '^x-pdfops-field' headers.txt
x-pdfops-field-names: ["Full name","Date of birth","Address","Phone","Individual","Family","Signature","Date"]
x-pdfops-fields: 8
The names in that header are the keys to fill by. Here a text field
and a checkbox are filled with
/api/fill-form, and the
call returned a filled PDF:
curl -s -X POST https://pdfops.dev/api/fill-form \
-H "X-API-Key: $PDFOPS_API_KEY" \
-F "pdf=@fillable.pdf" \
-F 'fields={"Full name":"Ada Lovelace","Individual":"true"}' \
-o filled.pdf
Leave out format to get JSON instead: every suggested
field with its label, confidence and rectangle, in the frame
/api/add-fields reads, so
the entries you keep can be sent there as they are. If nothing is
found, the JSON mode answers 200 with a count of 0 and a note, and
format=pdf answers 400 no_fields, so you
never get back an unchanged file that looks like a result.
In an agent
The hosted MCP server has a read-only
pdf_detect_fields tool, which brings it to 24 tools.
pdf_add_fields also takes detect: true, to
detect and add in one tool call. That one makes one request and counts
once. See /mcp.
In the browser
The free make-fillable tool has a
Detect fields button. It proposes fields on the pages you loaded;
you rename or remove them, draw any it missed, and export the
fillable PDF. It runs in your browser, so nothing is uploaded.
Long documents
One call looks at up to 40 pages by default (max_pages
goes to 100) and returns at most 200 fields, in whole pages (a page that alone has more
than 200 returns its 200 most confident and stays in the list of pages
left). When it stops early, the answer says truncated and names the
pages not done: nextPages in JSON, or the
X-PDFops-Next-Pages header with format=pdf.
Add the returned fields to the PDF, send that PDF again with
pages set to the named pages, and repeat until the
answer is no longer truncated. Sending the original file again
repeats the same names and is not supported. The file you send back
must still fit the 4 MB upload limit.
What it does not do
It does not find a blank that has nothing drawn. Empty space, or a shaded area with no outline, has no line or box to detect. Draw those in the browser tool, or place them by coordinates with /api/add-fields.
It does not read scanned pages. A scan is a picture, with no drawing or text to read. There is no vision model and no OCR.
Results should be reviewed. Some suggestions are not blanks, such as an empty cell in a table, and some blanks are missed. format=pdf adds whatever it finds without a review step, so use it when you will check the result, or when any suggested field is better than none.
It does not use an AI model or keep a template. Detection is fixed rules, so the same file gives the same fields every time, and nothing is stored between calls. If you want AI field detection and a template saved in an account to fill again, DocSpring works that way. Its comparison of MCP servers for filling PDF forms covers both approaches, PDFops included.
Try it
Send a flat PDF with the call above and open the result in any
viewer. A form it gets wrong, or a kind of blank it should find, is
the most useful thing you can tell us.
← All posts · Docs · Pricing
---
# Getting started with PDFops — PDFops
Source: https://pdfops.dev/blog/getting-started
Quickstart
Getting started with PDFops
2026-05-12 · ~2 min read
30 seconds to a working PDF API call. No auth, no signup.
PDFops is live. Here's how to make your first call in three lines of shell.
Fill a PDF form
Pull a PDF with form fields off your desktop and swap in the field-name JSON. Or grab the sample template — its AcroForm fields are named exactly as the curl below uses them.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
You get a filled PDF back. The fields JSON keys must match AcroForm field names that already exist in your PDF — in the example above, an invoice template with customer_name and total fields. Send a name the PDF doesn't have and you get a 400 unknown_field; the endpoint doesn't create new fields or place text by coordinate. Bring a fillable template you authored (Acrobat, Mac Preview, LibreOffice Draw, or pdftk all work), or use the sample above to see the round-trip first. Full reference at /docs/fill-form — request schema, all 5 field-type semantics, every error code.
Merge PDFs
Any number of pdf form parts. They're concatenated in the order you pass them — full reference at /docs/merge.
curl -X POST https://pdfops.dev/api/merge \
-F "pdf=@cover.pdf" \
-F "pdf=@body.pdf" \
-F "pdf=@appendix.pdf" \
-o combined.pdf
Limits
100 requests per IP per month without a key — no signup, no auth. Need more? A free API key (250/month, emailed, no card) takes one field, and paid tiers (Indie $16/mo for 4,000, Pro $79/mo for 25,000) are live. Pass the key as X-API-Key. Hit your cap and you'll get a 429 Too Many Requests response with a Retry-After header set to the seconds until the next calendar month rolls (UTC).
If none of those quotas is the right number for you, hello@pdfops.dev handles custom volume — and the contact form is how I prioritize which endpoints ship next.
What's coming
Beyond the two calls above, /api/inspect (list a PDF's form fields) and /api/invoice (a complete invoice PDF from JSON) are also live — see the docs. Next on the list:
/api/stamp — apply text or image stamps to a PDF (think: confidential watermarks, page numbers, draft markers)
/api/sign — sign a PDF programmatically
/api/extract-text — pull text out of a PDF for downstream processing
/api/redact — remove sensitive content destructively
Tell me on the contact form which one matters most for your use case — it's what prioritizes what ships next.
Why this exists
The longer story is in Why I built PDFops — short version: every SaaS I've shipped eventually needs PDFs, the existing options either cost too much at scale or assume a backend stack I don't use, and I got tired of solving it from scratch every time.
Related
The playground — run fill and merge in the browser before writing any code
Free form-field inspector — see a PDF's field names and the exact JSON to fill them
Fill and merge PDFs in your browser — the no-code side of the same API
← All posts · PDFops home
---
# Assembling a KYC packet on Deno Deploy — inspect, fill, and merge with the pdfops-sdk
Source: https://pdfops.dev/blog/kyc-packet-on-deno-deploy
Guide
Assembling a KYC packet on Deno Deploy — inspect, fill, and merge with the pdfops-sdk
2026-07-21 · ~6 min read
Compliance owns the KYC application template, not engineering
— and they revise it without filing a ticket. Hardcode the
field names once and the next template swap either breaks
silently (a field goes unfilled) or throws
unknown_field in production. The fix is to stop
assuming the shape of a PDF you don't control: ask it, at
request time, what fields it actually has, fill whatever
comes back, then merge the filled application with the
applicant's uploaded ID scan into one packet. Here's the
whole flow in ~45 lines on Deno Deploy, using the new
pdfops-sdk
instead of raw fetch calls.
Why inspect first
Every other example on this blog hardcodes a JSON object of
field names — reasonable when the template PDF is a file you
committed to your own repo. A KYC application template isn't
that. It's owned by a compliance or ops team who edit it in
Acrobat, rename a field, add a new disclosure checkbox, and
re-upload it to wherever your app fetches it from — all
without a code review on your side. Filling against a
hardcoded key list against a template you don't control is a
bug waiting for the next revision.
POST /api/inspect answers "what
fields does this PDF have right now?" — every
AcroForm field's name, type, and (for dropdowns/radios) its
options, plus a ready-to-fill fillTemplate object
keyed by name. Call it once per request against the live
template, and the fill step only
ever writes into fields that actually exist. A template revision changes what gets filled,
not whether the request throws.
Install the SDK, get a key
Every earlier post here uses fetch and
FormData directly against the HTTP API — that
still works and always will. pdfops-sdk is a thin
typed wrapper around the same endpoints: no dependencies,
edge-safe (Workers, Vercel Edge, Deno, Bun, Node 18+,
browsers), and it turns the multipart plumbing into three
method calls.
npm install pdfops-sdk
You need a key to run more than the anonymous trial. A free
one costs nothing and needs no card —
email in, key out (the
key arrives by email, not in the response body, so inbox
possession is the verification step):
import { PdfOps } from 'pdfops-sdk';
const trial = new PdfOps(); // no key: 100 requests/IP/month
await trial.signup('you@example.com'); // free key, 250/month, no card — check your inbox
Once the key lands, wire it in and every call meters against
your own quota instead of your IP's:
const pdfops = new PdfOps({ apiKey: Deno.env.get('PDFOPS_API_KEY') });
The Deno Deploy handler
The endpoint takes a multipart POST — the applicant's data as
a JSON field, their ID scan as a file — pulls the current
application template, inspects it, fills only the fields it
finds, and merges in the ID scan. No browser, no second
runtime, ~45 lines.
// main.ts — Deno Deploy
import { PdfOps, PdfOpsError } from 'pdfops-sdk';
const pdfops = new PdfOps({ apiKey: Deno.env.get('PDFOPS_API_KEY') });
Deno.serve(async (req: Request) => {
if (req.method !== 'POST') {
return new Response('POST multipart/form-data: applicant, id_scan', { status: 405 });
}
const form = await req.formData();
const idScan = form.get('id_scan');
const applicantRaw = form.get('applicant');
if (!(idScan instanceof File) || typeof applicantRaw !== 'string') {
return new Response('expected fields "applicant" (JSON) and "id_scan" (file)', { status: 400 });
}
const applicant: Record = JSON.parse(applicantRaw);
// 1. Pull the CURRENT template — compliance swaps this file on their
// own schedule, so the fetch (not a bundled asset) is deliberate.
const templateResp = await fetch(Deno.env.get('TEMPLATE_URL')!);
const template = new Uint8Array(await templateResp.arrayBuffer());
// 2. Ask the template what fields it has right now, instead of
// assuming a fixed shape.
const { fillTemplate } = await pdfops.inspect(template);
// 3. Map applicant data onto whatever fields actually exist. A field
// the template dropped is silently skipped; a field the applicant
// didn't send stays at the template's default.
const values: Record = {};
for (const name of Object.keys(fillTemplate)) {
if (name in applicant) values[name] = String(applicant[name]);
}
try {
// 4. Fill the application.
const filled = await pdfops.fillForm(template, values);
// 5. Merge the filled application with the uploaded ID scan into
// one packet — page order follows array order.
const idBytes = new Uint8Array(await idScan.arrayBuffer());
const packet = await pdfops.merge([filled, idBytes]);
return new Response(packet, { headers: { 'content-type': 'application/pdf' } });
} catch (e) {
if (e instanceof PdfOpsError) {
return new Response(JSON.stringify({ error: e.code, details: e.message }), { status: e.status });
}
throw e;
}
});
deployctl deploy main.ts, set
PDFOPS_API_KEY and TEMPLATE_URL as
environment variables, and you have a live endpoint. The
fillForm and merge calls both return
Uint8Array PDF bytes — hand them to storage, a
Response, or an email attachment as-is; nothing
in this handler buffers more than one document at a time.
Why merge goes last, and what else it can hold
merge([filled, idBytes]) concatenates pages in
array order, so the filled application always lands as page 1
— the reviewer opens the packet and reads the application
first, attachments after. The array isn't capped at two: a
real KYC packet is usually
merge([filled, idFront, idBack, proofOfAddress])
— every attachment the applicant uploaded, in the order you
want a reviewer to see them, still one POST /api/merge
call.
Errors and watching your quota
Every non-2xx response the SDK sees throws a
PdfOpsError with the API's stable error slug —
the catch block above turns
unknown_field, invalid_pdf, or a
429 rate_limited straight into the right HTTP
status for the caller, instead of a generic 500. And because
the free tier has a real ceiling (250/month per key), check
it before you're surprised by one:
const { used, remaining, resets_at } = await pdfops.usage();
That's GET /api/usage under the
hood — it reads the same counter the 429 fires on, so the
number you show a user is never out of sync with the number
that blocks them.
Where this fits a real app
Swap the runtime and the trigger, and the same three-call
shape — inspect, fill, merge — covers most "combine a filled
form with something a user uploaded" flows:
Contractor onboarding: fill a W-9 from a webhook payload, no ID scan needed — auto-filling a W-9 from an onboarding webhook.
Contracts: fill a contract, merge it with a signed-cover page, email the countersigned result — signed contracts from a Tally webhook on Workers.
Audit trails: fill the main document and a metadata cover page, merge them, in a Next.js Server Action — audit-trail PDFs from a Next.js Server Action.
The part that's new here is inspect in the chain
— reach for it whenever the template isn't a file you fully
control, not just for KYC packets.
Try it
All three endpoints are live. Prove the chain from your
terminal before writing a line of Deno:
# 1. What fields does this template have?
curl -X POST https://pdfops.dev/api/inspect -F "pdf=@application.pdf"
# 2. Fill it
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@application.pdf" \
-F 'fields={"applicant_name":"Ada Lovelace","country":"UK"}' \
-o filled.pdf
# 3. Merge with the ID scan
curl -X POST https://pdfops.dev/api/merge \
-F "pdf=@filled.pdf" -F "pdf=@id-scan.pdf" \
-o packet.pdf
You get 100 keyless requests per IP per month, or
pdfops.signup('you@example.com') / the form at
/pricing for a free key (250/mo, no
card — delivered by email).
Building a KYC or onboarding flow and something about
inspect's field-type coverage doesn't fit yours?
Drop a note on the contact form —
it's the fastest way to influence what ships next.
Related
Free form-field inspector — the browser version of the inspect step
Contracts & agreements at scale — the broader onboarding-packet use case
Fill a PDF in a Cloudflare Worker — the same fill primitive on Workers
← All posts · PDFops home
---
# Why a valid MCP request still gets a 400 from pdfops.dev
Source: https://pdfops.dev/blog/mcp-400-protocol-version-header
Guide
Why a valid MCP request still gets a 400 from pdfops.dev
2026-11-12 · ~4 min read
A JSON-RPC body that is fully valid for the 2026-07-28 MCP spec,
with a real tool name and valid arguments, can still get a flat
400 from pdfops.dev's hosted MCP endpoint on the very first call.
The same request against a local MCP server works fine. The cause
is an HTTP header the spec requires alongside the body, separate
from the protocol version field already sitting in the JSON-RPC
payload, and it is easy to leave off because the body alone looks
complete.
The request that looks right and still fails
The 2026-07-28 revision of MCP moved protocol negotiation out of
an initialize handshake and into fields carried on
every request: params._meta carries
io.modelcontextprotocol/protocolVersion and
io.modelcontextprotocol/clientCapabilities in the
JSON-RPC body itself. A client built against that revision fills
those fields in correctly. What the spec also asks for,
separately, is an MCP-Protocol-Version HTTP header on
the same request, and pdfops.dev's server checks that the two
agree rather than trusting either one alone.
curl -X POST https://pdfops.dev/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "pdfops_usage",
"arguments": {},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}'
# {"jsonrpc":"2.0","id":1,"error":{"code":-32020,
# "message":"Header mismatch: MCP-Protocol-Version header is required"}}
# HTTP 400
That is the exact response from a live call: the body is valid
JSON-RPC, the tool name and arguments are fine, and the only
problem is a header that never made it onto the wire. Over the
last 30 days of production traffic, /api/mcp logged
451 separate 400 responses from 55 distinct callers, the whole
measured 4xx volume for this endpoint. The log does not record
which of the server's several 400 causes fired on each of those
rows, so the exact split between a missing header and the other
causes below is not something the log can answer. What it does
show is that 400 is the only 4xx /api/mcp produces at
any real volume, and a missing MCP-Protocol-Version
header is one confirmed way to land on it.
The fix is one header, matched to the body
Adding MCP-Protocol-Version: 2026-07-28 to the
request, with a value that matches
_meta["io.modelcontextprotocol/protocolVersion"]
exactly, turns the same body into a normal result:
curl -X POST https://pdfops.dev/api/mcp \
-H "Content-Type: application/json" \
-H "MCP-Protocol-Version: 2026-07-28" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "pdfops_usage",
"arguments": {},
"_meta": {
"io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientCapabilities": {}
}
}
}'
# {"jsonrpc":"2.0","id":1,"result":{"resultType":"complete",
# "content":[{"type":"text","text":"PDFops API error 401
# (missing_api_key): pass your key as X-API-Key"}],"isError":true, ...}}
# HTTP 200
For the 2026-07-28 revision, the server treats the header and the
body field as two halves of one claim about the protocol version.
If the header says 2026-07-28, or there is no header and the body
field says 2026-07-28, both must be present and agree, or the
request fails before any tool runs. A client wired to send only one
of the two needs the other line added, not a retry or a different
tool call. A header naming an older supported revision skips this
check.
A few more ways to land on the same 400
A few other request shapes get rejected before any tool runs,
with the same style of error. Sending a protocol version the
server does not support at all returns -32022 with
the list of versions it does accept, so a client pinned to an old
draft of the spec gets told exactly what to change to. A body
that is not valid JSON at all returns -32700, same as
any JSON-RPC server. And a JSON array of several calls in one
POST returns -32600: MCP dropped batching support in
the 2025-06-18 revision, so the modern spec does not allow it
either, and pdfops.dev's endpoint rejects it the same way a
spec-compliant client would expect.
# malformed JSON body
curl -s -X POST https://pdfops.dev/api/mcp -d '{not valid json'
# {"jsonrpc":"2.0","id":null,"error":{"code":-32700,"message":"Parse error"}}
# batched array body
curl -s -X POST https://pdfops.dev/api/mcp \
-d '[{"jsonrpc":"2.0","id":1,"method":"tools/list"}]'
# {"jsonrpc":"2.0","id":null,"error":{"code":-32600,
# "message":"Batched requests are not supported"}}
Try it
The descriptor at GET https://pdfops.dev/api/mcp and
a free key from /docs/signup work
without any of this. The header check itself is not limited to
tools/list or tools/call: under the
modern protocol revision the server checks the header against the
body for any method call that carries an id, including
server/discover. Sending
MCP-Protocol-Version on every call, matched to
whatever
_meta["io.modelcontextprotocol/protocolVersion"]
says, clears the header-mismatch error above. An unsupported
version, malformed JSON, or a batched array still get rejected
regardless, since those are checked before the header comparison
runs.
← All posts · PDFops home
---
# Merging PDFs in a Bun server: page order, quota, and the 429 you'll eventually hit
Source: https://pdfops.dev/blog/merge-pdfs-bun-server
Guide
Merging PDFs in a Bun server: page order, quota, and the 429 you'll eventually hit
2026-08-06 · ~6 min read
Bun ships a fast HTTP server out of the box, so it's a common place
to put a small endpoint that stitches a few PDFs together: an
application packet, a signed contract plus its exhibits, a
statement plus its cover letter. The merge call itself is one
request. The part that actually breaks in production is what
happens the day a real user's request hits your free-tier ceiling
instead of your laptop's IP.
The endpoint
POST /api/merge takes a multipart body
with a repeated pdf field and concatenates the inputs
in the order the fields appear, not the order the filenames sort
in. A Bun server accepting three uploaded files and forwarding them
in a fixed order (cover letter, resume, transcript) looks like
this:
// server.ts
const PDFOPS_KEY = process.env.PDFOPS_API_KEY;
Bun.serve({
port: 3000,
async fetch(req) {
if (req.method !== "POST" || new URL(req.url).pathname !== "/apply") {
return new Response("not found", { status: 404 });
}
const incoming = await req.formData();
const cover = incoming.get("cover");
const resume = incoming.get("resume");
const transcript = incoming.get("transcript");
if (!(cover instanceof File) || !(resume instanceof File) || !(transcript instanceof File)) {
return Response.json({ error: "missing_file" }, { status: 400 });
}
// Order matters: pages concatenate in the order these fields are
// appended, not the order they were uploaded or their filenames.
const merged = new FormData();
merged.append("pdf", cover, "cover.pdf");
merged.append("pdf", resume, "resume.pdf");
merged.append("pdf", transcript, "transcript.pdf");
const res = await fetch("https://pdfops.dev/api/merge", {
method: "POST",
headers: PDFOPS_KEY ? { "X-API-Key": PDFOPS_KEY } : {},
body: merged,
});
if (!res.ok) {
const { error, details } = await res.json();
return Response.json({ error, details }, { status: res.status });
}
return new Response(res.body, {
headers: { "Content-Type": "application/pdf" },
});
},
});
Bun's fetch and FormData are the same web
standard APIs Node and Deno expose, so this isn't Bun-specific code:
it's the pattern any of the three edge-adjacent runtimes use to
call PDFops. What's worth pointing at is what the endpoint does
after the happy path, because that's the part every one of
these worked examples tends to skip.
The 429 you'll eventually hit
Anonymous calls to /api/merge are metered per source
IP at 100 requests a month. A Bun server proxying merge requests on
behalf of many end users looks like one IP to PDFops, so that
ceiling arrives fast: one busy afternoon, not a slow month. When
it's exhausted, PDFops returns 429 with a
Retry-After header set to the seconds remaining until
the 1st of next month UTC, which is not a number worth waiting on
inside a live request. The right move is to surface it as a clear,
distinct error instead of a generic 500:
if (res.status === 429) {
const retryAfter = res.headers.get("Retry-After");
return Response.json(
{
error: "merge_quota_exhausted",
retryAfterSeconds: retryAfter ? Number(retryAfter) : null,
},
{ status: 503 },
);
}
A 503 back to your own caller (rather than passing the
raw 429 through) is a judgment call worth making
deliberately: it tells your client "the service is temporarily
unable to complete this," which is closer to the truth than "you
personally are rate-limited," since the limit here belongs to your
server's IP, not to the end user who just uploaded three files.
Getting past the anonymous cap
A free key raises that ceiling from 100 requests/month per IP to
250 requests/month tied to the key itself, which is the more
honest unit for a server proxying requests on behalf of many
users. Signing up doesn't require a card:
curl -X POST https://pdfops.dev/api/signup \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
The key arrives by email; set it as PDFOPS_API_KEY in
the Bun process's environment and the server code above already
picks it up and sends it as X-API-Key. An invalid or
revoked key returns 401 invalid_api_key rather than
silently falling back to the anonymous IP cap, so a typo in the
env var fails loudly instead of quietly eating into a shared quota.
Watching usage before you hit the wall
Waiting for a 429 to find out you're close to the ceiling means
your first signal is a broken request in front of a real user.
GET /api/usage reads the same counter the
rate limiter enforces, so a periodic check against it can warn
before the wall instead of after:
const usage = await fetch("https://pdfops.dev/api/usage", {
headers: { "X-API-Key": PDFOPS_KEY },
}).then((r) => r.json());
// { tier: "free", limit: 250, used: 231, remaining: 19, period: "2026-08", resetsAt: "2026-09-01T00:00:00Z" }
if (usage.remaining
Run that check on a schedule, a Bun cron job, or just a log line
at the top of a handler that fires once an hour, and the upgrade
decision happens on your terms, with the usage curve in front of
you, instead of during an incident.
What doesn't carry across the merge
Merging preserves every page of every input in the order supplied,
but document-level structure doesn't union: AcroForm fields belong
to the document, not the individual pages, so a merge of two filled
forms doesn't produce one document with both sets of fields intact.
If the cover letter or resume above were AcroForm templates that
still needed values written in, that has to happen via
POST /api/fill-form before the merge
call, not after.
Related
POST /api/merge reference: full field list, error codes, and the 4.5 MB request-size limit
Assembling a KYC packet on Deno Deploy: the fuller inspect → fill → merge chain on a different edge-adjacent runtime
Monthly PDF bundles on a Cloudflare Cron Trigger: fill-then-merge at scale on a schedule instead of per-request
← All posts · PDFops home
---
# Migrating off wkhtmltopdf on AWS Lambda — the unpatched CVE and the form-fill swap
Source: https://pdfops.dev/blog/migrating-off-wkhtmltopdf-on-lambda
Guide
Migrating off wkhtmltopdf on AWS Lambda — the unpatched CVE and the form-fill swap
2026-07-23 · ~6 min read
wkhtmltopdf's GitHub repo was archived in January 2023, its
organization followed in July 2024, and its last release still
carries an unpatched, CVSS-9.8 server-side request forgery. None
of that has stopped it from running inside a Lambda Layer behind
thousands of invoice and receipt endpoints — because "swap out
the rendering engine" sounds like a multi-week project. Usually
it isn't. If what you're generating is the same layout with
different data every time, the fix is smaller than a rendering
migration: stop rendering HTML and fill a form instead.
The state of wkhtmltopdf, plainly
Three facts, so you can decide how urgent this is without
taking my word for it:
Archived. The wkhtmltopdf repo was archived by its owner on January 2, 2023; the wkhtmltopdf GitHub organization was archived on July 10, 2024. No maintainer is triaging issues.
Stale. The last release, 0.12.6, shipped in 2020 and is still what most Lambda Layer builds bundle today.
Unpatched, critical. CVE-2022-35583 is an SSRF (server-side request forgery — the renderer can be tricked into making requests to internal addresses on your behalf) via iframe injection, scored CVSS 9.8 (critical), and there will be no 0.12.7 to fix it.
None of this is a knock on the original project — it did its
job for over a decade. But "archived + unpatched critical CVE"
is the point where a security review stops asking "is this
still fine" and starts asking "why is this still here."
Why it's worse specifically on Lambda
wkhtmltopdf isn't a library — it's a compiled binary wrapping a
decade-old fork of QtWebKit, which means running it in a
function means shipping the binary alongside your code, not
importing a package:
The binary usually arrives as a Lambda Layer, 50-80MB, eating into the 250MB unzipped deployment limit before your own code counts.
It needs a writable filesystem for its own temp files — Lambda only offers /tmp, so the handler has to manage a scratch path and clean up after itself.
Spinning up a headless-browser-shaped binary is real cold-start weight on top of your runtime's own init — separate from, and additive to, whatever your handler already pays.
It can't run at all in a V8-isolate-style runtime (Workers, Deno Deploy, Vercel Edge). Build on wkhtmltopdf today and moving this function off Lambda later means rewriting the render step, not just redeploying it.
When this migration doesn't apply
Be honest about what you're actually rendering before doing
this. PDFops fills fields in a PDF template — it doesn't render
arbitrary HTML and CSS. If your output genuinely varies in
layout — long-form articles, portfolio pages, dashboards with
charts, anything where the structure changes per
document, not just the values — you still need a real browser
renderer. That's a different migration (Puppeteer or Playwright
in a proper sandbox, not a Lambda Layer binary), and this guide
isn't it.
But check what you're actually generating. Most wkhtmltopdf
endpoints render the same HTML template every time —
an invoice, a receipt, a monthly statement, a contract — with
only the data changing. That's a form problem wearing an HTML
renderer's clothes, and it's the case this guide covers.
The swap
Re-author the HTML template once as a real PDF with AcroForm
fields — where a Liquid/Handlebars variable used to sit,
there's now a named form field. Acrobat's Prepare Form tool,
LibreOffice Draw's Form Controls toolbar, or pdftk
on an existing PDF all work; it's a one-time job per template,
not a per-request cost. Don't have one handy to test against?
Grab the sample invoice-template.pdf
— it ships with customer_name and total
fields already wired up.
Once the template has real fields,
POST /api/fill-form replaces the
entire render step: upload the template plus a JSON object of
field values, get back a filled PDF. No HTML string assembly,
no CSS, no rendering engine — just data going into boxes that
already exist.
The Lambda handler
Node.js 22.x runtime, ESM, no Layer. The template ships inside
the deployment zip and is read once at cold start — outside
the handler — so a warm invocation does zero filesystem work
before calling the API:
// index.mjs — AWS Lambda (Node.js 22.x), Function URL
import { readFile } from 'node:fs/promises';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { PdfOps, PdfOpsError } from 'pdfops-sdk';
const here = dirname(fileURLToPath(import.meta.url));
// Bundled in the deployment package — no Layer, no /tmp write.
const template = await readFile(join(here, 'invoice-template.pdf'));
const pdfops = new PdfOps({ apiKey: process.env.PDFOPS_API_KEY });
export const handler = async (event) => {
if (event.requestContext?.http?.method !== 'POST') {
return { statusCode: 405, body: 'POST a JSON body: { customer_name, total }' };
}
const invoice = JSON.parse(event.body ?? '{}');
try {
const filled = await pdfops.fillForm(template, {
customer_name: String(invoice.customer_name ?? ''),
total: String(invoice.total ?? ''),
});
return {
statusCode: 200,
headers: { 'content-type': 'application/pdf' },
body: Buffer.from(filled).toString('base64'),
isBase64Encoded: true,
};
} catch (e) {
if (e instanceof PdfOpsError) {
return { statusCode: e.status, body: JSON.stringify({ error: e.code, details: e.message }) };
}
throw e;
}
};
npm install pdfops-sdk, zip index.mjs,
node_modules, and invoice-template.pdf
together, set PDFOPS_API_KEY as an environment
variable, done. Compare that deployment package — a handful of
KB of pure JavaScript — to a Lambda Layer carrying a 50-80MB
native binary, and the size difference alone is most of why
cold starts get faster: there's no subprocess to spin up before
your code even runs.
What you get beyond removing the CVE
Filling a form is a narrower operation than rendering HTML, and
narrower means more predictable. The same input bytes and the
same field values produce byte-identical output every time —
no font-substitution drift, no headless-renderer version bump
silently reflowing last month's invoices. If that determinism
matters for hashing, caching, or diffing PDFs in CI, that's the
whole argument in the case for deterministic PDF filling.
Getting a key
The handler above needs a key to run past the anonymous trial.
POST /api/signup with an email gets
a free one — 250 requests/month, no card, delivered to your
inbox (never in the response body, so inbox possession doubles
as ownership proof):
curl -X POST https://pdfops.dev/api/signup \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
Anonymous calls (no X-API-Key header) still work
at 100 requests/IP/month — enough to run the example below
before deciding whether to wire in a key.
Try it
Prove the fill step from a terminal before touching Lambda:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
filled.pdf opens with both fields populated — that
curl call is exactly what the Lambda handler above does under
the hood, just wrapped in the SDK's typed fillForm
method instead of raw multipart.
Related
POST /api/fill-form reference — full field-type mapping, error codes, and a dedicated section on migrating from hosted HTML→PDF services (PDFMonkey and others)
The case for deterministic PDF filling — why byte-identical output matters once you can hash and diff PDFs in CI
Generating invoice PDFs from Stripe webhooks on Cloudflare Workers — the same fill-form call on an edge runtime instead of Lambda
← All posts · PDFops home
---
# Merging a Letter invoice with an A4 attachment in pypdf, and the page size nobody normalizes
Source: https://pdfops.dev/blog/mixed-page-sizes-pypdf-merge
Guide
Merging a Letter invoice with an A4 attachment in pypdf, and the page size nobody normalizes
2026-09-24 · ~6 min read
pypdf's writer.append() concatenates PDFs page by
page and copies each page's own /MediaBox along
with it. Merge a US Letter invoice (612x792pt) with an A4
attachment (595x842pt) and the output has two page sizes, not
one. Most viewers render that fine, each page at its own size.
A print queue set to "same size as first page," a thumbnail
generator, or a batch rasterizer that assumes one page size for
the whole document can scale or crop the second page as if it
were the first.
What /MediaBox actually is
/MediaBox is a rectangle stored per page inside a
PDF's page tree, not once for the whole document. A PDF has no
page-size property to read off the file as a whole; every page
carries its own, and two pages in the same file are free to
disagree. pypdf mirrors that structure.
page.mediabox reads the page's own rectangle, and
nothing in the library reconciles it against any other page
already sitting in the writer.
Reproducing the mismatch
Build two single-page PDFs at different sizes and merge them
with append(). Reading page.mediabox
back off each page in the result shows exactly what went in:
page 0 at 612x792, page 1 at 595.32x841.92. Nothing warns about
the mismatch and nothing normalizes it, because normalizing was
never part of the job append() does.
from pypdf import PdfReader, PdfWriter
invoice = PdfWriter()
invoice.add_blank_page(width=612, height=792) # US Letter
invoice.write("invoice.pdf")
attachment = PdfWriter()
attachment.add_blank_page(width=595.32, height=841.92) # A4
attachment.write("attachment.pdf")
merged = PdfWriter()
for path in ("invoice.pdf", "attachment.pdf"):
merged.append(PdfReader(path))
merged.write("merged.pdf")
check = PdfReader("merged.pdf")
for i, page in enumerate(check.pages):
print(i, page.mediabox.width, page.mediabox.height)
# 0 612.0 792.0
# 1 595.32 841.92
Why a viewer hides it and a rasterizer doesn't
A human scrolling through the merged file in Preview or Acrobat
will not notice anything wrong. Each page renders at its own
size, the way a PDF is supposed to. The trouble shows up one
step downstream, in anything built around the assumption that a
document has a single page size: a print dialog's "fit to same
size as first page" option, a thumbnail grid sized off page
one, a rasterizer that renders every page at one fixed
DPI-and-dimension pair for a PNG export. Those tools scale or
crop the second page to match the first, and an A4 attachment
merged after a Letter invoice comes out stretched or clipped in
exactly the places that matter.
Normalizing to one page size before merging
The fix is to normalize page size before merging, not after.
Create a blank page at the target size, then merge the
mismatched page's content onto it through a scale-and-center
transform. pypdf's Transformation and
PageObject.merge_transformed_page do the actual
work; the function below just computes the scale factor that
fits the source page inside the target rectangle without
distorting its aspect ratio, and the translation that centers
it.
from pypdf import PageObject, PdfReader, PdfWriter, Transformation
LETTER = (612, 792)
def fit_to_letter(page):
src_w = float(page.mediabox.width)
src_h = float(page.mediabox.height)
scale = min(LETTER[0] / src_w, LETTER[1] / src_h)
tx = (LETTER[0] - src_w * scale) / 2
ty = (LETTER[1] - src_h * scale) / 2
blank = PageObject.create_blank_page(width=LETTER[0], height=LETTER[1])
transform = Transformation().scale(scale, scale).translate(tx, ty)
blank.merge_transformed_page(page, transform)
return blank
reader = PdfReader("attachment.pdf")
fixed_attachment = fit_to_letter(reader.pages[0])
writer = PdfWriter()
writer.add_page(PdfReader("invoice.pdf").pages[0])
writer.add_page(fixed_attachment)
writer.write("merged.pdf")
Run fit_to_letter on the A4 page before appending
it and both pages in the merged output report 612x792. The
attachment's content is scaled down slightly and letterboxed
rather than stretched to fill a rectangle it was never drawn
for, which is the difference between "smaller but legible" and
"the wrong aspect ratio."
Try it
/api/merge concatenates
pages the same way pypdf's append() does: each
input page keeps whatever size it already had, and the
endpoint does not resize anything for you. That is the correct
default for most callers, since resizing without being asked
would silently alter content nobody meant to touch. If you
need one uniform page size in the output, normalize each page
first with the transform above, then send the normalized files
to /api/merge. A free key from
/docs/signup covers 250 calls a
month, and /api/inspect
reads back page dimensions along with field names if you want
to check sizes before merging rather than after.
← All posts · PDFops home
---
# Monthly PDF bundles on a Cloudflare Cron Trigger — PDFops
Source: https://pdfops.dev/blog/monthly-pdf-bundles-on-cron
Use Case
Monthly PDF bundles on a Cloudflare Cron Trigger
2026-05-14 · ~6 min read
Update (July 2026): self-serve API keys and paid tiers are now live — free key (250/mo) and plans from $16/mo at /pricing. Pricing/waitlist references below reflect the beta era this post was written in.
The second most common SaaS PDF use case, after invoice
generation: monthly per-customer statement bundles. A few
sections per customer (summary, line items, attachments)
rendered from templates, merged into one PDF, stored,
emailed. The whole pipeline runs on a single Cloudflare
Worker fired by a Cron Trigger, completes in seconds per
customer, and costs roughly nothing.
The setup
You run a SaaS. Customers want a monthly statement that
combines multiple views — usage summary, line-item detail,
maybe a compliance attachment. Each section already exists
as a template; what you don't have is the glue that fills
each template for each customer, stitches the sections in
the right order, and gets the result in front of the
customer on the 1st of the month. (Companion:
report PDFs at scale
covers the broader pattern across statements, inspection
reports, and audit reports.)
The shape of the problem maps to a scheduled handler
calling two PDF endpoints in sequence per customer:
/api/fill-form to render each section from
its template, then /api/merge
to bundle the sections together. Cloudflare's Cron Triggers
can fire a Worker on cron syntax — 0 0 1 * *
for "midnight UTC on the first of every month" — which means
no extra infrastructure beyond what's already in your
Workers account.
The flow
Cron → CF Worker: scheduled handler fires on the 1st of the month at 00:00 UTC
Worker → D1 (or your CRM): pull the customer list and last-month's usage rows (~50-200ms)
Worker → KV: fetch the two section templates once at the start, reused per customer (~10ms)
Per customer, in parallel batches:
POST /api/fill-form twice (summary + line-items), ~200-300ms total
POST /api/merge with the two filled PDFs, ~80-120ms
Worker → R2: stash the bundle keyed by {customer_id}/{YYYY-MM}.pdf (~30-50ms)
Worker → email service: queue a transactional email with a signed download link (~10ms)
End-to-end per customer: ~400-600ms. A 1,000-customer fleet finishes in ~10 minutes if you fan out at concurrency 16, well under Cloudflare's scheduled-handler ceiling.
The Worker
~60 lines of TypeScript. The interesting part is the per-customer pipeline; the rest is plumbing. Concurrency is bounded by chunking the customer list into batches — Workers gives you fan-out via Promise.all but you'll hit subrequest limits if you fire 1,000 in flight.
export interface Env {
STATEMENTS_KV: KVNamespace; // section templates
STATEMENTS_R2: R2Bucket; // rendered bundles
STATEMENTS_DB: D1Database; // customers + usage
EMAIL_WEBHOOK_URL: string; // your transactional email
}
export default {
async scheduled(event: ScheduledEvent, env: Env, ctx: ExecutionContext) {
const period = lastMonthISO(); // e.g. "2026-04"
const [summaryTpl, lineTpl] = await Promise.all([
env.STATEMENTS_KV.get('summary-template', 'arrayBuffer'),
env.STATEMENTS_KV.get('line-items-template', 'arrayBuffer'),
]);
if (!summaryTpl || !lineTpl) {
throw new Error('Templates missing from KV');
}
const { results: customers } = await env.STATEMENTS_DB
.prepare('SELECT id, name, email FROM customers WHERE active = 1')
.all<{ id: string; name: string; email: string }>();
// Bound concurrency to 16 so subrequests don't pile up
const chunk = 16;
for (let i = 0; i < customers.length; i += chunk) {
await Promise.all(
customers.slice(i, i + chunk).map(c =>
buildStatementForCustomer(c, period, summaryTpl, lineTpl, env)
)
);
}
},
};
async function buildStatementForCustomer(
customer: { id: string; name: string; email: string },
period: string,
summaryTpl: ArrayBuffer,
lineTpl: ArrayBuffer,
env: Env,
) {
const { results: usage } = await env.STATEMENTS_DB
.prepare('SELECT * FROM usage WHERE customer_id = ? AND period = ?')
.bind(customer.id, period).all();
// 1. Render the two sections in parallel via /api/fill-form
const summaryReq = fillForm(summaryTpl, {
customer_name: customer.name,
period_label: prettyPeriod(period),
total_amount: totalFromUsage(usage),
invoice_id: `STMT-${period}-${customer.id.slice(-6)}`,
});
const linesReq = fillForm(lineTpl, {
customer_name: customer.name,
items_json: JSON.stringify(usage.slice(0, 100)), // cap for template
});
const [summary, lines] = await Promise.all([summaryReq, linesReq]);
// 2. Merge the two sections into one bundle
const bundle = await mergePdfs([summary, lines]);
// 3. Stash in R2 (organized by customer/period)
const r2Key = `statements/${customer.id}/${period}.pdf`;
await env.STATEMENTS_R2.put(r2Key, bundle, {
httpMetadata: { contentType: 'application/pdf' },
});
// 4. Fire-and-forget email with a signed download URL.
// The URL is signed via R2's S3-compatible presign API so it
// expires in 7 days — no auth-boundary footgun like the
// Stripe-invoice post called out.
const signedUrl = await presignR2(env.STATEMENTS_R2, r2Key, 7 * 86400);
fetch(env.EMAIL_WEBHOOK_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
to: customer.email,
subject: `Your ${prettyPeriod(period)} statement`,
html: `Your statement is ready: download
`,
}),
}).catch(() => {});
}
async function fillForm(template: ArrayBuffer, fields: Record) {
const fd = new FormData();
fd.append('pdf', new Blob([template], { type: 'application/pdf' }), 'tpl.pdf');
fd.append('fields', JSON.stringify(fields));
const r = await fetch('https://pdfops.dev/api/fill-form', { method: 'POST', body: fd });
if (!r.ok) throw new Error(`fill-form: ${r.status}`);
return await r.arrayBuffer();
}
async function mergePdfs(parts: ArrayBuffer[]) {
const fd = new FormData();
for (const p of parts) fd.append('pdf', new Blob([p], { type: 'application/pdf' }), 'p.pdf');
const r = await fetch('https://pdfops.dev/api/merge', { method: 'POST', body: fd });
if (!r.ok) throw new Error(`merge: ${r.status}`);
return await r.arrayBuffer();
}
The auth-boundary fix from the
Stripe-invoice post
is baked into this one — the email contains a 7-day R2
presigned URL, not the raw object path. If you're going to
send N customers a link, signing the URL costs ~1ms per
customer and removes the entire "Stripe ID is guessable"
class of footgun.
The Cron Trigger config
One line in wrangler.toml:
[triggers]
crons = ["0 0 1 * *"] # 00:00 UTC on the 1st of each month
That's the whole scheduling layer. Cloudflare bills you for
the Worker's CPU time during the scheduled invocation, not
for the cron itself. A 1,000-customer monthly run might use
~10 minutes of total Worker CPU once you account for
concurrency, well inside any non-trivial Workers plan.
The cost math
For a 5,000-customer SaaS shipping monthly statements (one bundle = 2 fill-form calls + 1 merge call = 3 PDFops calls per customer = 15,000 calls/month):
Headless Chrome on Lambda: ~$15-30/mo of compute for the rendering, plus the operational cost of keeping the Chrome layer current. Adds a 200-400MB cold start in front of every batch.
Hosted incumbents (DocRaptor / PDFShift / PDFMonkey): ~$0.05-0.20 per render × 15,000 = $750-3,000/mo. Each handles one shape (HTML→PDF), so the merge step is still on you.
PDFops (post-beta): priced from the substrate's unit economics, not as a discount on incumbents. Per-call pricing lands when paid tiers open; the substrate (CF Workers + R2, no Chrome, no Lambda cold starts) puts the floor at a different number entirely. The merge endpoint is one call, not a separate hosted service.
Update 2026-11-09: the $0.05-$0.20 per document range above is out of date. Current published prices are lower: DocRaptor's Max plan works out to about 3.7 cents per document at 4,000 documents a month, PDFShift about 1 cent or less, and PDFMonkey about 0.5 cent (prices read 2026-11-09). See the comparisons.
The two-step shape (fill + merge) is where the substrate
economics show up most clearly. Incumbent hosted PDF
services price each operation as a separate render; on
Workers, the marginal cost of the second call is the same
as the first — there's no per-render runtime spin-up.
When this pattern doesn't fit
You need fully dynamic layout (rich CSS, dynamic page counts driven by content length, complex tables that overflow pages). PDFops fills form fields in pre-designed templates; if your statement layout depends on rendering arbitrary HTML, Puppeteer or a hosted HTML-to-PDF service is still the answer.
Your customer fleet is large enough that 10-minute scheduled invocations are too slow. Cloudflare's scheduled handlers have a wall-time ceiling; past a few thousand customers, the right shape is a queue (Cloudflare Queues, SQS) where the Cron just enqueues work and a separate consumer fans out. The PDF generation per customer stays identical.
You need per-page customization in the merge order (interleaving customer A's summary with customer B's, weird page-level overrides). The merge endpoint takes whole PDFs in sequence; if you need to splice at the page level, you'll want fill-form for each page individually and then merge.
Customer count is below ~20. Honestly, at that scale, generating statements by hand once a month and emailing them is fine — automate later.
Try it
Both endpoints used in this pattern are live during beta:
# fill-form (per section)
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@summary-template.pdf" \
-F 'fields={"customer_name":"Acme Co","period_label":"April 2026","total_amount":"$2,450.00","invoice_id":"STMT-2026-04-001"}' \
-o summary.pdf
# merge (combine the sections)
curl -X POST https://pdfops.dev/api/merge \
-F "pdf=@summary.pdf" \
-F "pdf=@line-items.pdf" \
-o statement.pdf
You'll get a merged statement back. Wire it into a Cron Trigger handler shaped like the code above and you have monthly customer statements running globally with no servers to manage.
Missing endpoints, integration questions, scaling weirdness? The waitlist's message field is the fastest way to shape what ships next.
Related
Fill a PDF inside a Cloudflare Worker — the single-fill primitive this batch job repeats
Inspect, fill, and merge a KYC packet — the same fill+merge chain with the SDK
The /api/usage endpoint reference — watch your quota when a cron makes 15,000 calls a month
← All posts · PDFops home
---
# Packing-slip PDFs from a fulfillment webhook, and the redelivery that duplicates them
Source: https://pdfops.dev/blog/packing-slip-pdf-fulfillment-webhook
Guide
Packing-slip PDFs from a fulfillment webhook, and the redelivery that duplicates them
2026-09-03 · ~5 min read
A fulfillment webhook that fires when an order ships doesn't
promise to fire exactly once. Most providers document
at-least-once delivery, so a timeout on your side, a 5xx from a
cold start, or a stray network blip triggers a retry with the
same payload, sometimes seconds later, sometimes minutes.
A packing-slip handler that calls PDFops fill-form on every
delivery fills the same slip twice, burns quota twice, and
sometimes emails a customer the same document twice. Fixing it
takes one atomic claim on the event id, checked and set in a
single round trip, so the second delivery learns someone
already has it before doing any of that work again.
The shape of the job
Say a small 3PL runs packing slips off its warehouse system's
order-shipped webhook: an order ships, the webhook fires with
the order number, the shipping address, and the line items,
and a Vercel Function fills a packing-slip template through
PDFops, uploads the result to Vercel Blob, and returns the URL
so the warehouse UI can show a print button. One order should
produce one slip, no matter how many times the webhook decides
to tell you about it.
At-least-once means sometimes-twice
Webhook providers rarely guarantee exactly-once delivery,
because guaranteeing it would mean holding a distributed lock
across every subscriber before confirming an event even landed.
What they promise instead is at-least-once: if your endpoint
doesn't answer with a fast 2xx, the event goes back into a
retry queue and fires again, carrying the same event id and the
same body. A five-second cold start on a rarely-hit Function, a
transient 502 from your own upstream, or a provider retry
policy that fires on any non-2xx response are each enough to
trigger a second delivery of an event your handler already
finished.
A single atomic claim, not two separate steps
The obvious first attempt reads: check a table for this event
id, and if it's missing, do the work and insert a row. Under a
single delivery that's correct. Under two deliveries that
arrive close together, both requests can pass the check before
either one finishes the insert, and both go on to call
fill-form. The fix is to make the check and the reservation the
same operation. A SET with NX (set
only if the key doesn't already exist) is atomic in Redis, so
exactly one of two concurrent requests gets back confirmation
that it won the claim.
The handler
Everything above collapses into a route handler and a small
helper, reachable from a Vercel Function over Upstash's REST
API without pinning a TCP connection to a serverless
invocation.
// app/api/webhooks/fulfillment/route.ts
import { Redis } from '@upstash/redis';
import { put } from '@vercel/blob';
const redis = Redis.fromEnv();
const PDFOPS_KEY = process.env.PDFOPS_API_KEY!;
export async function POST(req: Request) {
const event = await req.json();
// Field name varies by provider; use whatever id it signs on the event.
const claimKey = `packing-slip:${event.id}`;
const claimed = await redis.set(claimKey, 'in_progress', {
nx: true,
ex: 60, // clears itself if the handler crashes before finishing
});
if (claimed !== 'OK') {
const state = await redis.get(claimKey);
if (state === 'in_progress') {
// A concurrent delivery already owns this event; let the
// provider's own retry backoff handle the wait.
return new Response(null, { status: 409 });
}
// state holds the URL from a run that already finished.
return Response.json({ url: state });
}
try {
const url = await generatePackingSlip(event.order);
await redis.set(claimKey, url, { ex: 60 * 60 * 24 * 30 }); // keep 30 days
return Response.json({ url });
} catch (e) {
await redis.del(claimKey); // let the next redelivery try again
throw e;
}
}
async function generatePackingSlip(order: {
number: string;
shipTo: string;
items: { qty: number; sku: string }[];
}): Promise {
const template = await fetch(process.env.PACKING_SLIP_TEMPLATE_URL!).then(
(r) => r.arrayBuffer(),
);
const form = new FormData();
form.set('pdf', new Blob([template], { type: 'application/pdf' }), 'template.pdf');
form.set(
'fields',
JSON.stringify({
order_number: order.number,
ship_to: order.shipTo,
items: order.items.map((i) => `${i.qty}x ${i.sku}`).join('\n'),
}),
);
form.set('flatten', 'true');
const res = await fetch('https://pdfops.dev/api/fill-form', {
method: 'POST',
headers: { 'X-API-Key': PDFOPS_KEY },
body: form,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`fill-form failed: ${err.error} (${err.details})`);
}
const pdf = await res.arrayBuffer();
const blob = await put(`packing-slips/${order.number}.pdf`, pdf, {
access: 'public',
contentType: 'application/pdf',
});
return blob.url;
}
The claim key carries three possible states over its life:
absent (no delivery has touched this event yet),
in_progress (a delivery is mid-flight, held under a
short expiry so a crash doesn't wedge it forever), and a stored
URL (the run that finished, kept for a month so a very late
redelivery gets the same answer instead of a second document).
A redelivery that lands while the first is still working gets a
409 back; a redelivery that lands after success gets the URL
straight back, with no call to fill-form made at all.
Releasing a claim that never finished
A handler that crashes mid-fill, say because the template fetch
times out, leaves its claim in the in_progress
state until the expiry clears it. That's why the TTL matters:
pick it to comfortably exceed the slowest real run, short
enough that a genuine crash doesn't block a legitimate retry for
long. The catch block also deletes the claim directly on a
known failure, so a clean error doesn't have to wait out the
timer at all before the next delivery can try again.
Try it
The same claim pattern covers any webhook-triggered document: an
invoice on payment succeeded, a contract on signature completed,
a statement on billing cycle closed, anywhere a provider might
redeliver an event your handler already finished. A free key
from /docs/signup covers 250 calls a
month, worth protecting from accidental doubles for exactly the
reason above: a duplicate fill on a retried webhook is quota
spent on a document nobody asked for twice. Check usage anytime
at /docs/usage or the
dashboard, and confirm a template's
field names at /docs/inspect before
wiring the fields object above to your own PDF.
← All posts · PDFops home
---
# Automating PDF fills, merges, and invoices in n8n without a Function node
Source: https://pdfops.dev/blog/pdf-automation-in-n8n
Guide
Automating PDF fills, merges, and invoices in n8n without a Function node
2026-08-13 · ~5 min read
Most n8n workflows that touch PDFs end up in the same place: an HTTP
Request node with a hand-built multipart body, or a Code node
calling pdf-lib and hoping the binary handling survives the next
n8n upgrade. n8n-nodes-pdfops
is a community node, verified by n8n, that turns PDF inspect, fill, merge,
and invoice generation into typed n8n operations, with binary PDFs
flowing in and out like any other node. For costs and when to use something
else, see the PDF API for n8n guide.
Installing it
Self-hosted, it's Settings → Community Nodes → Install, or from the
CLI:
n8n community-node install n8n-nodes-pdfops
The node works with no credential at all, against the same
100-requests-per-IP-per-month anonymous tier the
playground uses. Add a PDFops
API credential (an API key in the X-API-Key
header) once you want a higher quota or the usage operation
described below.
The five operations
Update, November 2026: node 0.3.0 adds ten more operations (extract, delete, rotate and split pages, watermark, page numbers, unlock, protect, read and set metadata). n8n verified them in node 0.4.0 on 10 November 2026, and verified 0.6.0 with 25 operations on 30 November. The five below are the original set. The n8n page keeps the current list.
One node, five operations, picked from a dropdown: Inspect
Fields lists a PDF's AcroForm field names, types, and
current values, plus a fill template you can paste straight into
the next node. Fill Form writes values into those
fields and can flatten the result so it stops being editable.
Merge concatenates every PDF on the incoming items,
in item order, into one file. Generate Invoice
renders a complete invoice PDF from a JSON object, no template
required. Get Usage returns tier, quota, used, and
reset date for a key. Fill, merge, and invoice are deterministic:
run the same workflow twice on the same input and the output PDF is
byte-identical, so a re-run never shows up as a spurious diff in
whatever you archive it to.
A worked example: fill from a webhook, catch the typo first
The node ships with three ready-to-import workflow templates. The
one worth walking through end to end is fill and flatten
PDF forms from webhook data, because it solves the failure
mode that makes "just fill the PDF" workflows unreliable: a field
name typed wrong in the JSON payload doesn't error, it just fills
nothing, and the caller gets back a document that looks correct
until someone opens it.
The workflow receives a webhook carrying a PDF URL, an email
address, and a fields object, validates the payload,
then runs Inspect Fields on the blank PDF before
it fills anything. A Code node diffs the requested field names
against the real ones the inspect call returned. Any name that
doesn't match routes straight to an error response, naming the bad
field, instead of silently producing a blank form. Only a payload
that passes the diff reaches Fill Form with
flatten on, so the result can't be edited after it
ships. From there it fans out: Gmail sends the filled PDF, Google
Drive archives a copy, and the caller gets a JSON receipt.
Swap Gmail for SMTP or Slack and Drive for S3 without touching the
PDF steps; none of them know or care where the file ends up.
Two more recipes, already built
Merge two forms into one packet. A workflow named
onboarding packet from two PDF forms takes two blank PDF
URLs and two field objects (a new-hire packet, a new-tenant packet,
whatever your business fills in pairs), fills each with its own
Fill Form node, waits for both branches, and joins
them with Merge so the first form always lands as
page one. It refuses to upload a packet unless both branches
actually filled, so a partial run never produces a half-finished
file that looks whole.
An invoice on every Stripe payment. A Stripe
trigger on payment_intent.succeeded feeds a Code node
that shapes the charge into invoice JSON, and this is the step
where most hand-rolled invoice code breaks quietly: Stripe reports
amounts in the smallest currency unit, but JPY, KRW, and thirteen
other currencies don't have 100 of those units, so a reflexive
amount / 100 issues an invoice a hundred times too
small. The template checks the currency against a zero-decimal
list before it divides. Generate Invoice renders
the deterministic PDF, then it archives to S3, emails the customer
when an address is on file, and logs a row to a spreadsheet ledger.
A failed render posts to Slack with the payment ID, so a missing
invoice gets noticed instead of just not existing.
Keyless works; a key gets you further
Every operation runs without a credential at the shared 100/IP/mo
anonymous rate, the same limit the API enforces everywhere else. A
free API key (250 requests/month, email in,
key out, no card) raises that ceiling and is required for the
Get Usage operation, which returns your remaining
quota so a workflow can check headroom before it burns the month's
last call. Paid tiers exist once a workflow outgrows 250 a month,
but the free key runs a real production automation, not just a
demo.
Try it
Search "PDFops" in the n8n nodes panel, or install
n8n-nodes-pdfops self-hosted. The three templates
above are importable as-is from the node's
npm page;
swap in your own PDF, Stripe account, or storage provider and the
PDF steps don't change. Building on the raw API instead? Start at
/docs or the
OpenAPI spec.
← All posts · PDFops home
---
# You fill a PDF's line items, and the total field comes back blank
Source: https://pdfops.dev/blog/pdf-form-calculated-field-blank-after-fill
Guide
You fill a PDF's line items, and the total field comes back blank
2026-11-05 · ~5 min read
An invoice template has qty_1, price_1,
and a total field that Acrobat fills in on its own
whenever you type a number into the other two. Fill the same form
with pdf-lib or pypdf and send back only qty_1 and
price_1, and total comes back exactly as
empty as the blank template. No error, no warning header, just a
missing number on an invoice someone is about to pay.
A calculated field is a spreadsheet cell, not a label
When a form author in Acrobat marks a field as calculated, what
actually gets written into the PDF is a small JavaScript action
attached to that field's /AA (additional actions)
dictionary, plus an entry in the AcroForm's /CO
(calculation order) array that tells every viewer which fields to
recompute and in what order. The field looks like plain text in a
viewer, but underneath it carries a line like
event.value = this.getField("qty_1").value *
this.getField("price_1").value;, and Acrobat runs that line
every time a dependency changes.
Why pdf-lib and pypdf leave it alone
Running that line needs a JavaScript interpreter wired up to the
document's field model, and neither pdf-lib nor pypdf ships one.
The fill path in PDFops' own stack is pdf-lib underneath, and it
does exactly what the library gives it: write the string you sent
into a field's /V entry, then redraw that field's
appearance stream from whatever /V now holds. A
calculated field you never mentioned has nothing new in
/V, so the appearance redraw paints back the same
value the template shipped with, usually a blank string or a
literal 0.00. Nothing throws, because from the
library's point of view every field it was asked to fill was
filled correctly.
Finding which fields are calculated before you fill
The /CO array is the fastest way to answer "which
fields does this template expect something else to compute."
Walking it needs the same low-level dictionary access
/api/inspect already uses
to detect a hybrid XFA layer:
import { PDFDocument, PDFDict, PDFName, PDFArray } from "pdf-lib";
async function findCalculatedFields(pdfBytes) {
const pdfDoc = await PDFDocument.load(pdfBytes);
const acroDict = pdfDoc.catalog.lookup(PDFName.of("AcroForm"));
if (!(acroDict instanceof PDFDict)) return [];
const order = acroDict.lookup(PDFName.of("CO"));
if (!(order instanceof PDFArray)) return []; // no calculated fields at all
const names = [];
for (let i = 0; i
Any name this returns is a field your own code needs to compute,
because nothing downstream of it will.
Computing the total yourself, before the fill call
Once a field is known to be calculated, the fix is to treat it
like any other derived value in application code and send it
explicitly alongside the inputs it depends on, rather than
leaving it out and hoping something fills it in later.
const items = [
{ qty: 2, price: 450 },
{ qty: 1, price: 900 },
];
const total = items.reduce((sum, item) => sum + item.qty * item.price, 0);
const fields = {
qty_1: String(items[0].qty),
price_1: items[0].price.toFixed(2),
qty_2: String(items[1].qty),
price_2: items[1].price.toFixed(2),
total: total.toFixed(2), // computed here; the PDF will not compute it
};
await fetch("https://pdfops.dev/api/fill-form", {
method: "POST",
headers: { "X-API-Key": apiKey },
body: toMultipart(pdfBytes, fields),
});
total now lands in /V the same way
qty_1 and price_1 do, so the appearance
redraw paints the real number instead of the template's default.
Try it
A free key from /docs/signup includes
250 calls a month, enough to run /api/fill-form
against a real invoice template and check the total field by eye
before any customer-facing number depends on it.
← All posts · PDFops home
---
# A customer's name fills a PDF form field as ????, and the response is still 200
Source: https://pdfops.dev/blog/pdf-form-field-non-winansi-text
Guide
A customer's name fills a PDF form field as ????, and the response is still 200
2026-10-29 · ~5 min read
A W-9 request form has a text field called
full_legal_name. A customer named Tanaka Taro
signs up, the field gets filled with his name, and the PDF
that comes back is a 200 with a valid
application/pdf body. Open it, and the name
field reads ????. Nothing in the response says
that happened.
Why Helvetica cannot draw the name you just filled
Most PDF form fields reference a font through a
/DA default-appearance string, usually
/Helvetica, one of fourteen standard fonts every
PDF reader ships without the PDF embedding it. Helvetica as a
standard font encodes WinAnsi, which is Latin-1: the Latin
alphabet plus the accented letters Western European languages
need. It has no glyphs for Japanese, Cyrillic, Arabic,
Hebrew, Thai, or Han characters, and none for most emoji
either. A filler that draws the field's text with that font
can only draw what WinAnsi covers, no matter what string the
caller sent.
What a tool does when it meets a character it cannot draw
A PDF library filling thousands of forms a day cannot stop
and ask a human what to do with a character outside the
font, so most pick a fallback and move on rather than
throwing on every unsupported codepoint. The common choice,
and the one the fill path in PDFops' own stack takes by
default, is to encode the text one codepoint at a time and
substitute a literal ? for anything WinAnsi
cannot represent. That substitution happens inside the font
embedder, with no exception raised and no flag set on the
result. Four Japanese characters go in; four question marks
come out, baked straight into the field's appearance stream.
Why the field value looks fine and the PDF still doesn't
The field's underlying value, the actual string a PDF stores
in its /V entry, is untouched by any of this.
Reading it back with a library like pypdf or pdf-lib returns
"Tanaka Taro" exactly as sent. Only the rendered appearance,
the glyphs drawn for a human to look at, carry the question
marks. That split is what makes the bug easy to ship: a test
that fills a field and reads the value straight back passes
every time, because the value was never touched. The only
way to catch the problem is to open the file and look, or to
inspect the raw content stream the appearance was drawn
into, and a CI pipeline does neither by default.
Checking before you fill, not after
The fix that actually works is checking the string against
the font's character set before it ever reaches the fill
call, the same way a form validates an email address before
it hits the database. WinAnsi is a fixed, small set, so the
check is cheap: build it once from the embedded font, then
test every character of every value against it.
// Build once per process; WinAnsi never changes at runtime.
const WINANSI = new Set(
Array.from({ length: 256 }, (_, i) => i)
.filter((code) => isWinAnsiRenderable(code)), // see your PDF library's font metrics
);
function findUnrenderable(value) {
const bad = [];
for (const ch of value) {
const cp = ch.codePointAt(0);
if (!WINANSI.has(cp)) bad.push(ch);
}
return bad;
}
function assertRenderable(fieldName, value) {
const bad = findUnrenderable(value);
if (bad.length > 0) {
throw new Error(
`field "${fieldName}": "${value}" contains characters a WinAnsi ` +
`font cannot draw (${bad.join(", ")}). Embed a Unicode font ` +
`(e.g. a Noto variant) instead of the standard Helvetica, or ` +
`transliterate the value before filling.`,
);
}
}
This is the same shape of check PDFops' own
/api/invoice
endpoint already runs before it draws a single character,
precisely because that endpoint builds its own pages with
the same standard Helvetica. Running the identical check in
application code ahead of any form-fill call, whatever
library sits underneath it, turns a silently wrong PDF into
a loud error that names the exact field and the exact
characters it couldn't draw.
What a WinAnsi font actually covers
Latin-1 covers more than it looks like at a glance: café,
Müller, and García all render correctly, since é, ü, and í
sit inside WinAnsi's extended range. What breaks is anything
outside the Latin script entirely, plus a handful of
typographic characters some editors insert automatically,
like curly quotes or an em dash pasted from a word
processor, if the specific font's character table happens to
omit them. The only real fix for names and text in another
script is embedding a font that actually has the glyphs, a
Noto variant covers most scripts, and re-running the
appearance generation with that font instead of Helvetica.
Where that is not practical, transliterating to the closest
Latin representation is the honest fallback, with the
original value still stored in whatever system of record
sits behind the PDF.
Try it
A free key from /docs/signup
includes 250 calls a month, enough to fill a test AcroForm
with a few non-Latin names and confirm for yourself which
ones come back readable and which come back as question
marks before any real customer data goes through the same
path.
← All posts · PDFops home
---
# A fixed-row invoice template, and the line item that doesn't fit
Source: https://pdfops.dev/blog/pdf-invoice-line-item-overflow
Guide
A fixed-row invoice template, and the line item that doesn't fit
2026-10-15 · ~5 min read
An invoice template with an AcroForm has a fixed number of
line-item rows baked in at authoring time: ten fields named
item_1 through item_10, say, each
paired with a qty_N and price_N. That
works until an order has eleven items, and then the eleventh
one has nowhere to go. The API will fill the ten fields you
send it without complaint; it just has no field named
item_11 to put the eleventh row into.
Why a template can't grow a row on request
The AcroForm spec doesn't have a concept of a repeating row. A
field is a fixed object at a fixed position on a fixed page,
placed there when the PDF was authored in Acrobat or
LibreOffice Draw. Adding a field at request time isn't on the
table either: /api/fill-form
only fills fields that already exist in the uploaded PDF, and
a field name it doesn't recognize comes back as a 400
unknown_field rather than a new row appearing on
the page. So an invoice with a variable number of items needs
a different shape of template, not a bigger one.
Split into pages, not rows
The fix is a one-page continuation template with the same ten
row fields as the main page, minus the header and the totals
block, and a running count instead of a hard limit. Eleven
items becomes two filled pages: the main template holds items
one through ten, the continuation template holds item eleven
alone, and the two get merged in page order. Thirty items
becomes a main page plus two full continuation pages. The row
count per page stays fixed; what varies is how many pages get
generated and merged.
Totals only go on the last page
If every continuation page repeats a running subtotal, a
customer glancing at page two of three sees a number that
looks like the invoice total but isn't, and that's a worse
failure than a plain unlabeled row. Compute the grand total
once, from the full line-item list, and only pass it into the
fields payload for whichever page turns out to be last; every
other continuation page gets its ten row fields and nothing
else.
The script
Chunking the items into pages of ten, building a fields
payload per chunk, and calling fill-form once per chunk is the
whole algorithm. The main template and the continuation
template are two different PDF files on disk, so the loop
picks whichever one matches the current chunk's position,
fills it, and collects the resulting buffer. Once every chunk
has been filled, one call to
/api/merge with the
buffers in order produces the finished invoice, main page
first, continuation pages after it in the same order the items
appeared in.
import { readFile } from "node:fs/promises";
const API_KEY = process.env.PDFOPS_API_KEY;
const ROWS_PER_PAGE = 10;
function chunk(items, size) {
const out = [];
for (let i = 0; i {
fields[`item_${i + 1}`] = item.name;
fields[`qty_${i + 1}`] = String(item.qty);
fields[`price_${i + 1}`] = item.price.toFixed(2);
});
return fields;
}
async function fillPage(templatePath, fields) {
const template = await readFile(templatePath);
const form = new FormData();
form.append("pdf", new Blob([template]), "template.pdf");
form.append("fields", JSON.stringify(fields));
form.append("flatten", "true");
const res = await fetch("https://pdfops.dev/api/fill-form", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!res.ok) throw new Error(`fill-form failed: ${res.status}`);
return Buffer.from(await res.arrayBuffer());
}
async function buildInvoice(customer, items) {
const pages = chunk(items, ROWS_PER_PAGE);
const total = items.reduce((sum, i) => sum + i.qty * i.price, 0);
const buffers = [];
for (let i = 0; i
A thirty-item order costs four API calls here: three
fill-form calls, one per page, and one merge call to stitch
the pages together. A ten-item order that fits on the main
page alone costs one fill-form call and no merge call, since
buffers.length === 1 skips straight to returning
the single filled page.
Try it
A free key from /docs/signup covers
this comfortably: a ten-row template split across a couple of
continuation pages per invoice is two or three calls, well
inside the 250 a month a free key includes, enough to test the
chunking logic against a real template before wiring it into
an order pipeline.
← All posts · PDFops home
---
# PDFops now ships a skill over MCP
Source: https://pdfops.dev/blog/pdf-skill-over-mcp
Release
PDFops now ships a skill over MCP
2026-11-27 · ~4 min read
MCP, the Model Context Protocol, is how an AI client such as Claude
Code calls tools. The npm package
pdfops-mcp
0.7.0 now ships a skill next to its 24 tools. A skill is a
SKILL.md file of instructions. This one tells the model
in what order to call the PDF tools.
What a skill over MCP is
On 2026-11-24 Anthropic put Skills over MCP
into public beta in Claude and Claude Code. An MCP server can ship a
skill, and optionally supporting files, next to its tools. The client
lists the skills and loads one only when a task needs it. The
extension is named io.modelcontextprotocol/skills; see
the overview
and the Claude Code docs.
Why we wrote one
A tool description says what the tool does. It does not say in which
order to call the tools. The skill, named pdf-workflows,
covers that:
Filling a form. Read the fields with pdf_inspect, use the exact field names and option values it returns, then call pdf_fill.
A flat PDF with no fields. Call pdf_detect_fields, review the suggestions, call pdf_add_fields, then pdf_fill. See field detection and the docs.
A long document. Detection runs in rounds using next_pages until truncated is false, with a stop rule when a round finds nothing new.
Scans. There is no OCR, so a scanned page has nothing to detect or extract.
Quota. Facts such as pdf_html_to_pdf counting as 5 requests.
This is the step list for the first case, as written in the skill:
1. Call `pdf_inspect` on the PDF. It lists each field's name, type, options,
current value and `maxLength`, and returns a `fillTemplate` object.
2. Call `pdf_fill` with `fields` set to an object of field name to string value.
Use the exact names and, for dropdowns and radio groups, one of the option
values that `pdf_inspect` returned.
Try it
Claude Code 2.1.331 or later lists the skill as
/pdfops:pdf-workflows when the server is added under the
name pdfops:
claude mcp add pdfops -- npx -y pdfops-mcp
Then type the skill name followed by a request. This is from our
test, with form.pdf in the working folder:
/pdfops:pdf-workflows List the form fields of form.pdf in this folder using
the pdfops tools, then reply with only the field count and the tool you called.
15 fields, pdf_inspect (mcp__pdfops__pdf_inspect)
That answer is lightly reformatted: Claude's reply used a dash where
this page has a comma. Claude Code's status line read: This skill is
served by MCP server "pdfops" at skill://pdf-workflows.
No API key is needed to try it. Without PDFOPS_API_KEY
the server runs on the keyless trial of 100 requests per IP per
month. A free key gives 250 a month; sign up here.
To turn the skill off in Claude Code, add a deny rule
Skill(mcp__pdfops__*) under /permissions.
What changed underneath
The package moved from the v1 MCP TypeScript SDK
(@modelcontextprotocol/sdk 1.32.2, newest protocol
revision 2025-11-25) to v2 (@modelcontextprotocol/server
2.4.0, revision 2026-07-28), because the skills extension needs that
revision. Clients on the 2024 and 2025 revisions are still served.
The tool list is the same as 0.6.1 except two things: an optional
execution field is no longer sent, and
pdf_inspect's output schema now lists the
label field the API already returned.
Three things we hit on the v2 SDK
For people building MCP servers.
Schema dialect. The v2 SDK advertises tool schemas as JSON Schema 2020-12, where v1 gave draft-07. A client that compiles schemas with a draft-07 validator can reject an unknown meta-schema. We kept draft-07 by asking zod for the draft-07 target, because the SDK has no option for it, and we pinned the SDK and zod to exact versions because of that.
One-shot pipes. The v2 stdio transport closes at end of input while a tool call is still waiting. A one-shot pipe such as printf ... | npx pdfops-mcp ran the call and never printed the answer. The server now finishes pending requests before it exits.
A missing skills folder. It stopped the server from starting, so a build that dropped the folder would have lost all 24 tools. The server now logs one line and serves its tools without the skill.
One more detail: we serve exactly one file as the skill, read once at
startup, so nothing else placed in that folder is served.
What it does not do
The hosted server does not serve it yet. The skill ships in the npm package. The hosted server at pdfops.dev/api/mcp does not serve it.
A skill is guidance, not enforcement. The tools validate their input either way.
Only clients with the extension load it. Clients without it ignore the skill, and the 24 tools work as before.
We tested one client. That was Claude Code 2.1.332. Other clients that support the extension were not tested.
Get it
The package is on npm
and the source is on GitHub.
The MCP page lists the tools. A task where the
skill sends the model the wrong way is the most useful thing you can
tell us.
← All posts · Docs · Pricing
---
# Giving an AI agent PDF tools over MCP, and why it has to inspect before it fills
Source: https://pdfops.dev/blog/pdf-tools-for-ai-agents-over-mcp
Guide
Giving an AI agent PDF tools over MCP, and why it has to inspect before it fills
2026-09-17 · ~6 min read
MCP (Model Context Protocol) lets an agent call a tool directly instead
of you writing the client code that calls an API on the agent's
behalf. For PDF forms that convenience runs into the same problem
pypdf developers hit by hand: a fill call needs the form's exact
field names, and an agent guessing at them from a filename or a
user's request gets it wrong in the same silent way a person does.
pdfops-mcp handles this by shipping a tool whose entire
job is answering "what fields does this PDF actually have," and
documenting, in the tool description itself, that it has to be
called before pdf_fill. An agent reads tool
descriptions as instructions, not just documentation, so that
ordering is enforced in the one place the agent actually reads.
What pdf_inspect gives the agent
pdf_inspect takes a PDF source and returns its AcroForm
fields: name, type, options for a dropdown or radio group, current
value, and a per-field maxLength where the PDF declares
one. It also returns a fillTemplate object shaped
exactly like what pdf_fill expects, so the agent has a
paste-ready starting point instead of assembling one from the field
list by hand. Run against a W-9 template, the response for one field
looks like this:
{
"name": "name",
"type": "text",
"maxLength": 60,
"value": ""
},
{
"name": "tax_classification",
"type": "radio",
"options": ["individual", "c_corp", "s_corp", "partnership", "llc", "other"],
"value": ""
}
Neither of those names is guessable from "the W-9 form." A model
filling this blind would reach for something like full_name
or entity_type, both of which are wrong for this
specific template and would fail the same way a hand-written script
fails on a field name that doesn't exist. The tool description on
pdf_fill spells this out directly: field names must
exist in the PDF, values over a field's maxLength are
rejected, and checkboxes take a plain "true" or
"false" string rather than whatever on-state name the
PDF happens to use internally.
Wiring it in
For Claude Code, adding the server is one command:
claude mcp add pdfops -- npx -y pdfops-mcp
Claude Desktop and Cursor take the same package through a config
file instead:
{
"mcpServers": {
"pdfops": {
"command": "npx",
"args": ["-y", "pdfops-mcp"],
"env": { "PDFOPS_API_KEY": "pdfops_live_…" }
}
}
}
The API key is optional. Without one the server runs on the keyless
trial (100 requests per IP per month); a free key from
/docs/signup raises that to 250 a month
with no card. Either way the agent now has five tools:
pdf_inspect, pdf_fill,
pdf_merge, pdf_invoice, and
pdfops_usage for checking remaining quota mid-session.
A two-step request, three tool calls
Ask the agent to "fill the W-9 at ~/docs/w9.pdf for the contractor
and merge it with the signed cover sheet," and the tool sequence is
pdf_inspect to read back the real field names,
pdf_fill with those names to write the filled copy,
then pdf_merge to combine it with the cover sheet in
order. All three take plain file paths when the server runs next to
the agent. npx pdfops-mcp under Claude Code or Claude
Desktop starts as a local process over stdio, so it reads and writes
the same filesystem the agent does, and the PDF bytes themselves
never pass through the model's context window at all. The agent
only ever sees field names, a confirmation string, and a path.
The part that breaks on a hosted server
That local-path convenience assumes the MCP server and the agent
share a filesystem. Run the same server on a hosted gateway, such as
Glama's hosted mode or a cloud IDE's remote MCP client,
and ~/docs/w9.pdf stops meaning anything, because it
names a path on the machine the agent is running on, not the
machine the server is running on. A file path handed to a remote
server just fails to open. pdfops-mcp's
pdf_path and pdf_paths arguments accept an
https:// URL or a data:application/pdf;base64,…
URI as well as a local path, and every tool that produces a PDF
returns it inline as an embedded resource whenever
output_path is omitted, rather than assuming there's
somewhere on that machine worth writing it. Nothing in the config
changes between local and hosted mode: the server just checks what
kind of string it got handed and resolves it accordingly.
Try it
The same pdf_inspect → pdf_fill →
pdf_merge sequence is also three plain HTTP calls if
you'd rather wire an agent up yourself:
/api/inspect,
/api/fill-form, and
/api/merge, all under one
X-API-Key header from a free key at
/docs/signup. But for anything already
running inside Claude Code, Claude Desktop, or Cursor,
npx -y pdfops-mcp skips writing that client entirely:
the agent just gets the tools.
← All posts · PDFops home
---
# A PDFMonkey alternative for fixed-layout PDFs, with the migration code
Source: https://pdfops.dev/blog/pdfmonkey-alternative-with-code
Guide
A PDFMonkey alternative for fixed-layout PDFs, with the migration code
2026-11-19 · ~5 min read
PDFMonkey renders HTML and CSS, with Liquid logic for loops and
conditionals, into a new PDF. That's the right tool when a document
needs real page design: a catalog with a grid of products, a report
with charts, anything built from scratch. A lot of what teams
actually generate is narrower than that. A rental application is
already a PDF with named fields. An invoice is a header, two
address blocks, a line item table, and a total, the same shape
every time. Those don't need a template engine. They need data
written into a fixed layout. Here is that migration end to end,
with every request run against the live API and the actual
response.
Draw the invoice from JSON, no template dashboard
Start with the invoice, since PDFMonkey's biggest use case is
probably billing. There's no template upload step. A POST to
/api/invoice with a
from block, a to block, an item list, and
a date returns a finished PDF, header, address blocks, items table,
and total laid out already.
curl -X POST https://pdfops.dev/api/invoice \
-H "Content-Type: application/json" \
-H "X-API-Key: $PDFOPS_API_KEY" \
-d '{
"from": { "name": "Birch & Co", "lines": ["44 Birch Lane", "Austin, TX 73301"] },
"to": "Jamie Oyelaran",
"invoice_number": "INV-1042",
"date": "2026-11-19",
"items": [
{ "description": "PDF form filling, 2000 docs", "quantity": 1, "unit_price": 79.00 },
{ "description": "Overage, 340 docs", "quantity": 340, "unit_price": 0.01 }
],
"notes": "Net 15"
}' \
-o invoice.pdf
That request returned a 200 and a one-page, 2,676-byte PDF with the
two line items, their totals, and the note printed under them. Send
the same JSON again next month for a recurring invoice and the
output is byte-identical, since there's no render-time clock or
random layout pass involved, so a dedup check or a cache key can
hash the request and skip work it already did.
Fill the PDF you already have
Now the application form. This is the case PDFMonkey can't really
touch, because the output has to be a specific PDF someone else
already designed, a government form, a lease, a W-9, with fields in
fixed positions. The API works from the PDF itself rather than a
template description, so the first step is asking it what fields
exist.
curl https://pdfops.dev/api/inspect \
-H "X-API-Key: $PDFOPS_API_KEY" \
-F "pdf=@application-form.pdf"
# {"count":8,"fields":[{"name":"applicant_name","type":"text",...},
# {"name":"email_addr",...},{"name":"dob",...},{"name":"addr_line1",...},
# {"name":"city",...},{"name":"postal_code",...},{"name":"phone_no",...},
# {"name":"notes",...}]}
Inspecting the sample application returns eight text fields:
applicant_name, email_addr,
dob, addr_line1, city,
postal_code, phone_no, and
notes. Posting those same keys with real values to
/api/fill-form writes
them into the form and hands back a filled, 11,120-byte PDF with
the original layout intact.
curl https://pdfops.dev/api/fill-form \
-H "X-API-Key: $PDFOPS_API_KEY" \
-F "pdf=@application-form.pdf" \
-F 'fields={"applicant_name":"Jamie Oyelaran","email_addr":"jamie@example.com",
"dob":"1990-04-12","addr_line1":"44 Birch Lane","city":"Austin",
"postal_code":"73301","phone_no":"512-555-0199",
"notes":"Referred by a current tenant"}' \
-o filled.pdf
Combine them into one packet
Last step, a packet. A rental application usually travels with a
cover invoice or receipt attached, so merge the two PDFs from above
into one file with /api/merge,
which takes the files as repeated multipart fields and concatenates
their pages in the order sent.
curl https://pdfops.dev/api/merge \
-H "X-API-Key: $PDFOPS_API_KEY" \
-F "pdf=@filled.pdf" \
-F "pdf=@invoice.pdf" \
-o packet.pdf
The merged file came back as a 2-page, 7,843-byte PDF, the filled
application first, the invoice second, in the order the two
pdf fields were sent. Same quota as the other two
calls, same multipart shape, no separate merge product to learn.
Try it
All three calls above ran against the live API with a key, but
none of them need one to try. Keyless access caps at 100 requests
per IP a month, enough to run this exact migration end to end. A
free key from POST /api/signup raises
that to 250 a month under the X-API-Key header and
removes nothing else, same three endpoints, same request shapes.
← All posts · PDFops home
---
# A 429 from /api/fill-form, and what your retry loop should actually do
Source: https://pdfops.dev/blog/pdfops-api-retries-and-rate-limits
Guide
A 429 from /api/fill-form, and what your retry loop should actually do
2026-10-22 · ~5 min read
A batch job fills two hundred PDFs overnight, call forty hits
a 429, and the generic retry wrapper you copied from another
project kicks in: wait a second, retry, wait two seconds,
retry, wait four. PDFops caps are monthly, not per-minute, so
that loop is backing off toward a wall it cannot back off
past, and it will spend the rest of the night finding that
out one doubling at a time.
What the cap actually tracks
Every PDFops endpoint meters against a monthly quota, not a
request rate: 100 requests a month per IP with no key, 250 a
month on a free key, more on indie and pro. There is no
per-second or per-minute throttle to wait out. When the count
for the current UTC month is spent, every call fails with
429 rate_limited until the first of next month,
no matter how far apart the calls are spaced.
Retry-After tells you the truth, if you read it
The 429 response carries a Retry-After header,
and on this API it is not a short number. It is seconds
until the next UTC month starts, which can be anywhere from
one second to beyond a million. A retry wrapper tuned for
typical API throttling treats any Retry-After
under some sane ceiling as obey-and-retry and anything past
it as give-up-now, and a monthly cap blows past that ceiling
on the first day of the month. Reading the header before
choosing to retry turns a silent all-night retry storm into
one log line: quota resets in 1,180,000s, bailing.
Validation failures do not cost you anything
The flip side is worth knowing before you build defensive
retry logic you do not need: a 400 for a malformed field list
or an unknown field name never touches the quota, and neither
does a 500 on PDFops' side. Only a 2xx response counts
against the monthly budget. That means a batch job can fail
fast and loud on a bad template without worrying it is
burning through the same number that gates working calls,
and it means the only response code worth backing off for is
429, because every other failure is either yours to fix in
the request or ours to fix on our side.
Check /api/usage before the batch starts, not after it 429s
A key's current count, limit, and reset time are all sitting
behind one GET call: /api/usage
with the same X-API-Key header, returning
tier, limit, used,
remaining, and resets_at. A batch
job that reads remaining before it starts and
compares it against the number of calls the batch is about
to make can stop itself at item one hundred and ninety
instead of discovering the wall at item two hundred with ten
PDFs half-written to a destination that now has a gap in it.
The script
The pattern below checks the budget up front, aborts the
batch cleanly if it will not fit, and treats a mid-run 429 as
a stop signal rather than something to wait out.
const API_KEY = process.env.PDFOPS_API_KEY;
const BASE = "https://pdfops.dev";
async function checkBudget(pendingCalls) {
const res = await fetch(`${BASE}/api/usage`, {
headers: { "X-API-Key": API_KEY },
});
if (!res.ok) throw new Error(`usage check failed: ${res.status}`);
const { remaining, resets_at } = await res.json();
if (remaining = 500) {
// transient on our side — worth one short retry, not a long backoff
await new Promise((r) => setTimeout(r, 1000 + Math.random() * 500));
const retry = await fetch(`${BASE}/api/fill-form`, {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: form,
});
if (!retry.ok) throw new Error(`fill-form failed twice: ${retry.status}`);
return Buffer.from(await retry.arrayBuffer());
}
if (!res.ok) {
const body = await res.json();
throw new Error(`fill-form rejected the request: ${body.error} — ${body.details}`);
}
return Buffer.from(await res.arrayBuffer());
}
async function runBatch(jobs) {
await checkBudget(jobs.length);
const results = [];
for (const job of jobs) {
results.push(await fillOne(job.template, job.fields));
}
return results;
}
checkBudget only has to run once, before the
loop starts. Inside the loop, a 429 is treated as fatal
rather than something to sleep through, because the quota
that just ran out will not come back until next month no
matter how long the loop waits. A 500 gets exactly one
short, jittered retry, since that failure mode is a transient
server issue rather than a budget problem.
Try it
A free key from /docs/signup
includes 250 calls a month, enough to run this batch pattern
against a real template and watch remaining count
down in /api/usage
before wiring the budget check into a production job.
← All posts · PDFops home
---
# PDFops v0.10: fill a PDF by email, make any PDF fillable
Source: https://pdfops.dev/blog/pdfops-v0-10
Release
PDFops v0.10: fill a PDF by email, make any PDF fillable
2026-08-06 · ~4 min read
v0.10 is the no-code on-ramps release. The API is unchanged — same
two primitives, fill and merge — but there are now two ways to use
PDFops before you've written a line of code, and one of the oldest
dead-ends in PDF automation ("this PDF has no form fields") finally
has a fix that doesn't involve Acrobat.
Fill a PDF by email — fill@pdfops.dev
Attach a blank fillable PDF and your field values to an email, send
it to fill@pdfops.dev,
and the reply comes back with the filled PDF — plus the exact
curl command that produced it, so the jump from "it
works" to "it's in my codebase" is copy-paste. Values go in the
body as plain key: value lines, as raw JSON, or as a
values.json attachment. Add flatten: true
to bake the result flat.
Limits are deliberate: blank templates only (a PDF that already
contains data is refused — attachment contents are never stored or
logged, and refusing filled-in forms means this address can't
become the thing that forwards someone's data around), 5 MB per
PDF, evaluation volume rather than production volume. The full
contract is on /fill-by-email.
Make any flat PDF fillable — in the browser
Most PDFs that should be forms aren't — they're flat:
text and layout baked into the page, no interactive field layer.
Until now, every PDFops surface answered that with "sorry, no
AcroForm fields." The new
make-fillable tool
closes that gap: drop the flat PDF, draw text and checkbox fields
where they belong, rename them to something your code will
recognize, and download a standard AcroForm PDF that works in
Acrobat, Preview, browsers, and every PDF library.
It runs entirely in your browser — rendering (pdf.js) and field
creation (pdf-lib) both happen client-side, so the PDF never
leaves your machine. On export you also get the ready-to-POST
/api/fill-form call with
your own field names already in it.
The chain, end to end
Those two pieces compose. Starting from a PDF with no fields at all:
Draw the fields on /tools/make-fillable and export — you now have a real template. (No PDF handy? The tool ships with a sample flat PDF.)
Prove the template with zero code: email it with values to fill@pdfops.dev, get the filled PDF back.
Automate it: the reply already contains the equivalent API call — wire it into your webhook, cron, or edge function. Guides for Python, Node.js, and JavaScript.
Deterministic fills, and flatten=true
Since late July, /api/fill-form and
/api/merge are byte-deterministic: the same template
and the same values return a byte-identical PDF, every time,
across deployments. If you snapshot-test documents in CI or need
audit-grade reproducibility, you can now assert on a hash — the
how and why is in
snapshot-testing PDFs in CI.
fill-form also accepts flatten=true,
which bakes the filled fields into the page content so the output
is no longer editable — re-inspecting a flattened fill reports
zero fields.
Also since the last release notes
Paid tiers are live. Free keyed tier (250 requests/month, email in, key out, no card), Indie $16/mo for 4,000, Pro $79/mo for 25,000 — with a usage dashboard and GET /api/usage.
POST /api/invoice — a complete, deterministic invoice PDF from JSON, no template needed, with a free browser generator on top.
PDFops vs pdf-lib — an honest in-process-vs-hosted comparison, including when you should just use pdf-lib.
Fixed: the curl example in the API-key signup email had a bug that broke every new user's first copy-paste call. It's fixed, with an apology to everyone who hit it.
Try it
The 30-second version, no signup:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@your-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
Or skip the terminal entirely: make a PDF fillable,
fill it by email, or use the
playground. Questions, bugs, or a workflow
these primitives don't cover? Tell us — the
roadmap is driven by what people actually hit.
← All posts · Docs · Pricing
---
# PDFops v0.11: ten new PDF operations, in the API and in every client
Source: https://pdfops.dev/blog/pdfops-v0-11
Release
PDFops v0.11: ten new PDF operations, in the API and in every client
2026-11-08 · ~6 min read
v0.10 in August was the no-code
on-ramps release. v0.11 is the operations release. The API had three
PDF primitives, inspect, fill and merge, plus an invoice renderer.
It now has fourteen PDF endpoints, and every client we ship, the
n8n node, the MCP server, the TypeScript SDK and the Python
package, carries the same set at the same version of the contract.
Ten new endpoints
Each one takes the multipart shape /api/fill-form
already uses: a pdf file, a few string fields, and a
PDF back. The limits are the same too, 4 MB and 2,000 pages
per input PDF, and every call counts against the same quota as a
fill or a merge.
extract-pages keeps the pages you list, in the order you list them, so it also reorders and duplicates.
delete-pages removes a page list and refuses to return an empty document.
rotate turns all pages, or a list of them, by 90, 180 or 270 degrees clockwise.
split cuts one PDF into several by page ranges or by a fixed chunk size. One response cannot carry several files, so it returns JSON with each part as base64, up to 100 parts.
watermark stamps diagonal text with an opacity and a position. Standard Helvetica only, so Latin-1 characters.
page-numbers prints a format such as Page {n} of {total} at a position of your choice, with a starting number.
unlock re-saves a PDF without its encryption, given the password. It does not crack passwords it is not given.
protect encrypts with a user password, an owner password, or both, and a list of the permissions that stay allowed.
metadata returns page count, per-page sizes, title, author, dates, the encryption flag and the form field count as JSON.
set-metadata writes title, author, subject, creator and keywords.
Splitting a packet into two-page parts, from a shell:
curl -X POST https://pdfops.dev/api/split \
-F "pdf=@packet.pdf" \
-F "every=2" \
-o parts.json
fill-form resolves field names forgivingly
An exact field name still wins, every time. When no field has the
exact name you sent, the key and each field name are compared in a
normalized form: Unicode-normalized, lowercased, with only letters
and digits kept and array indices like [0] removed,
against the full name and against its last dotted segment. The
field's label, the tooltip a form author typed in Acrobat, is
compared the same way. So F1 01 fills
f1_01, and First Name fills the field
whose tooltip says that, whatever its internal name is.
Only a unique match resolves. A key that matches two fields is a
422 that lists up to five candidates, and a key that matches none
lists up to three similar names. The endpoint still refuses to
skip unknown keys silently, because that is how wiring bugs reach
a signed document. The full rules are under
Field matching.
Encrypted templates open on their own
Most government blanks are owner-locked with an empty user
password: anyone can open them, and only edits are restricted. Until
October, every one of them came back as encrypted_pdf
with a pointer to qpdf. Now fill-form, inspect,
merge and all ten new endpoints open those files
themselves. A PDF with a real user password takes it in the
password form field, and unlock is there
when you want the file re-saved without encryption for good.
The same operations in every client
The point of a small API is that each wrapper can carry all of it.
As of this week, all four do:
n8n: n8n-nodes-pdfops 0.3.0 is on npm with fifteen operations. The node is verified by n8n, but n8n has verified 0.2.1 only, so n8n Cloud installs the five original operations. Update, 30 November 2026: n8n has since verified 0.6.0. Cloud users can install all 25 operations.
MCP: pdfops-mcp 0.4.0 serves fifteen tools, from pdf_inspect and pdf_fill through pdf_split, pdf_protect and pdf_set_metadata. One npx line in Claude Code, Claude Desktop, Cursor or VS Code. The same tools are served over Streamable HTTP at https://pdfops.dev/api/mcp, and connecting, listing tools and the first 100 tool calls per IP each month need no key.
TypeScript: pdfops-sdk 0.5.0 adds extractPages, deletePages, rotate, split, watermark, pageNumbers, unlock, protect, metadata and setMetadata, with the split parts decoded to bytes for you.
Python: pdfops 0.2.0 on PyPI adds the same ten as snake_case methods, still with zero dependencies.
from pdfops import PdfOps
client = PdfOps() # reads PDFOPS_API_KEY from the environment
result = client.split("packet.pdf", every=2)
for i, part in enumerate(result.parts):
stamped = client.watermark(part.pdf, "COPY", opacity=0.2)
open(f"part-{i + 1}.pdf", "wb").write(stamped)
print(client.metadata("packet.pdf")["page_count"])
Fixed: a long multiline value could stall a fill
A multiline text field given tens of kilobytes of text with no
line breaks could run past the edge function's time limit and come
back as a 504. The cause was in the layout step underneath: for one
unbroken paragraph, pdf-lib's line breaking does work that grows
with the cube of the word count, so a value that filled a page in a
viewer took minutes to lay out on a server. Since 2026-11-08,
fill-form wraps any line over 300 characters that is
wider than its field before the layout runs. The stored value gains
newlines at those points; shorter lines, and lines that fit, are
stored exactly as sent. The 60 KB value that timed out now
returns in about two seconds.
Also since v0.10
Merged output has no size cap of its own. At this release the API ran on an edge runtime, where responses streamed, so a merge was limited by its inputs (the API has since moved to Node and this has not been re-measured). The 4.5 MB request limit applies to the whole multipart body you send, never to what comes back.
Rate limiting is documented end to end. A 429 carries Retry-After, GET /api/usage tells you where you stand, and the retry post shows what a correct loop does with both.
Three guides on fills that return 200 and are still wrong: a calculated total field that comes back blank, a name that renders as ????, and a line item that does not fit a fixed-row template.
Try it
Watermark a draft, with no signup. The keyless trial allows 100 calls per IP a month:
curl -X POST https://pdfops.dev/api/watermark \
-F "pdf=@contract.pdf" \
-F "text=DRAFT" \
-F "opacity=0.2" \
-o draft.pdf
A free key from /docs/signup raises that
to 250 calls a month, no card. Every endpoint has a reference page
under /docs and a schema in
openapi.json. A workflow these fourteen
endpoints still do not cover is the most useful thing you can
tell us.
← All posts · Docs · Pricing
---
# PDFops v0.12: HTML to PDF, text and tables out of PDFs, stamps and e-invoices
Source: https://pdfops.dev/blog/pdfops-v0-12
Release
PDFops v0.12: HTML to PDF, text and tables out of PDFs, stamps and e-invoices
2026-11-22 · ~9 min read
v0.11 was the page-operations
release. v0.12 is about what is inside a PDF and where one comes
from. You can now turn an HTML string into a PDF, pull text and
tables out of a PDF as JSON, CSV or an Excel workbook, find a phrase
and stamp next to it, add fillable fields to a flat file, attach
files, build a PDF from images, Markdown or CSV, and write an
invoice that carries its own machine-readable data. The TypeScript
SDK, the Python client, the MCP server and the n8n node on npm all
cover it.
Every sample below runs as written, with no signup: the keyless
trial allows 100 calls per IP a month. To count calls against a key
instead, add -H "X-API-Key: $PDFOPS_API_KEY" to any
of them. They build on each other, so run them in order in one
folder.
HTML to PDF
POST /api/html-to-pdf
takes an HTML string and returns a PDF. A headless browser on our
side lays it out, so CSS, images and web fonts come out as they do
in a browser print, on A4 or Letter pages.
curl -X POST https://pdfops.dev/api/html-to-pdf \
-H "Content-Type: application/json" \
-d '{"html": "Invoice 1042 Item Qty Amount Widget 2 USD 40.00 Gadget 1 USD 15.50 Total USD 55.50
Thank you.
", "page_size": "a4"}' \
-o invoice.pdf
The limits are part of the feature. It takes HTML text only: no URL
input, and JavaScript is switched off, so a page that builds itself
in the browser renders empty. External resources load over https
from public hosts only, and the document can run to 50 pages. It
costs 5 requests of quota per call, not 1, and once the renderer is
reached a failed render counts too. Unlike every other endpoint, its
output is not byte-identical between runs, because a browser wrote it.
Text out of PDFs
POST /api/extract-text
reads a born-digital PDF, one made by software such as an invoice
system or a bank, and returns each page's text in reading order,
every line with its position, and any tables as rows of cells.
tables_format asks for the tables as CSV text, or as one
Excel workbook with a sheet per table. Here is the invoice from above
as CSV, then as a workbook:
curl -X POST https://pdfops.dev/api/extract-text \
-F "pdf=@invoice.pdf" \
-F "tables_format=csv" \
| jq -r '.pages[].tables[].csv' > tables.csv
curl -X POST https://pdfops.dev/api/extract-text \
-F "pdf=@invoice.pdf" \
-F "tables_format=xlsx" \
-o tables.xlsx
Tables are found from where the text sits, so borderless ones work.
A cell whose text wraps comes back as an extra row, and two tables
side by side come back as one. There is no OCR: a scanned page is
listed in pagesWithoutText. In the workbook every cell
is text, so a value that starts with = is never a formula.
POST /api/find-text
searches the same text layer for a literal or a regular expression and
returns each hit with its page and box, in the coordinates
edit uses. So a hit feeds the next call directly.
Building and marking up PDFs
POST /api/edit draws text,
PNG or JPEG images and barcodes at exact positions on the pages you
name. Barcodes, QR codes included, are drawn as vector shapes, so they
scan at any size. This finds a total, writes a note beside it and
puts a QR code in the corner:
HIT=$(curl -s -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoice.pdf" -F "query=USD 55.50" | jq -c '.hits[0]')
ITEMS=$(echo "$HIT" | jq -c '[
{type:"text", page:.page, x:(.x + .width + 8), y:.y, size:.height, text:"paid"},
{type:"barcode", page:1, x:480, y:40, format:"qrcode", value:"https://example.com/invoice/1042", width:72}
]')
curl -X POST https://pdfops.dev/api/edit \
-F "pdf=@invoice.pdf" \
-F "items=$ITEMS" \
-o stamped.pdf
POST /api/add-fields
creates fillable fields in a flat PDF: text, multiline text,
checkboxes, radio groups, dropdowns and empty signature boxes, each at
a page and a rectangle. It signs nothing. Fill the result with
fill-form:
curl -X POST https://pdfops.dev/api/add-fields \
-F "pdf=@stamped.pdf" \
-F 'fields=[{"type":"text","name":"approved_by","page":1,"x":72,"y":80,"width":200,"height":20},{"type":"checkbox","name":"paid_in_full","page":1,"x":72,"y":110,"width":14,"height":14}]' \
-o fillable.pdf
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@fillable.pdf" \
-F 'fields={"approved_by":"Jordan Lee","paid_in_full":"true"}' \
-o approved.pdf
Three smaller ones, each one call:
attach embeds up to 10 files in a PDF, with a name, a description and a PDF/A-3 relationship such as Data. Listing attachments back is not in the API yet; qpdf --list-attachments does it.
image-to-pdf makes one page per JPG or PNG, sized to the image or to A4 or Letter. merge now accepts images among its inputs too.
text-to-pdf lays out Markdown, plain text or CSV on the built-in fonts. It is not HTML to PDF: no HTML or CSS, no custom fonts, WinAnsi characters only.
curl -X POST https://pdfops.dev/api/attach \
-F "pdf=@invoice.pdf" \
-F "file=@tables.csv;type=text/csv" \
-F 'options=[{"name":"tables.csv","description":"Invoice lines","relationship":"Data"}]' \
-o with-data.pdf
curl -X POST https://pdfops.dev/api/image-to-pdf \
-F "pdf=@page1.png" \
-F "pdf=@page2.png" \
-F "page_size=a4" \
-o photos.pdf
curl -X POST https://pdfops.dev/api/text-to-pdf \
-H "Content-Type: application/json" \
-d '{"content": "# Release notes\n\nVersion **0.12** is out.\n\n- HTML to PDF\n- Text and tables out of PDFs", "title": "Release notes", "page_numbers": true}' \
-o notes.pdf
Factur-X e-invoices
POST /api/invoice
takes "e_invoice": "factur-x" and returns a PDF/A-3 file
with the invoice data embedded as factur-x.xml, in the
EN 16931 profile of Factur-X, also called ZUGFeRD. The page and the
XML are computed by the same code with exact decimal arithmetic, so
they cannot disagree. The mode needs more fields than a plain invoice,
such as a currency, structured addresses, a seller VAT id and a unit
code on every item; a request that misses any gets a 400 that lists
every missing field.
curl -X POST https://pdfops.dev/api/invoice \
-H "Content-Type: application/json" \
-d '{
"e_invoice": "factur-x",
"invoice_number": "INV-0042",
"date": "2026-11-22",
"due": "2026-12-22",
"currency": "EUR",
"from": {"name": "Acme GmbH", "street": "Hauptstrasse 1", "postcode": "10115", "city": "Berlin", "country": "DE", "vat_id": "DE123456789"},
"to": {"name": "Globex SARL", "street": "1 rue de la Paix", "postcode": "75002", "city": "Paris", "country": "FR"},
"tax_rate": 19,
"items": [
{"description": "Consulting", "quantity": 10, "unit_price": 120, "unit": "HUR"},
{"description": "Setup fee", "quantity": 1, "unit_price": 250, "unit": "C62"}
]
}' \
-o einvoice.pdf
qpdf --list-attachments einvoice.pdf
The exact limits of the claim: the output of every variant in our test
suite is checked with the Mustang validator 2.26.0 (PDF/A-3 through
veraPDF, the Factur-X schema and the EN 16931 schematron), and a file
counts only when both halves pass. That is a statement about the tests
we ran. It is not a certification and not advice on what a tax
authority or a buyer's system accepts in your country. We do not
produce XRechnung, Peppol or UBL, any other Factur-X profile, credit
notes, discounts or charges, and an invoice carries one VAT category and
rate. A Factur-X call costs 1 request.
The same operations in every client
The point of a small API is that each wrapper can carry all of it.
Published on 22 November 2026, each of these covers everything above:
TypeScript: pdfops-sdk 0.7.0 on npm adds htmlToPdf, textToPdf, imageToPdf, extractText, extractTextPlain, extractTablesXlsx, findText, edit, addFields and attach. It is a server-side client built on fetch: it runs on Node 18+ and on Cloudflare Workers, the two runtimes we ran it on. It does not work from a browser page, because the API sends no CORS headers, and a key shipped in page code is public.
Python: pdfops 0.4.0 on PyPI adds the same as snake_case methods, still with zero dependencies, and is tested on Python 3.9, 3.12 and 3.13.
MCP: pdfops-mcp 0.5.0 on npm, also in the MCP registry, adds pdf_edit, pdf_extract_text, pdf_find_text, pdf_add_fields, pdf_add_attachment, pdf_image_to_pdf, pdf_text_to_pdf and pdf_html_to_pdf to the local server. The hosted server at https://pdfops.dev/api/mcp already had them.
n8n: n8n-nodes-pdfops 0.5.0 is on npm with eight new operations (add fields, edit, attach, extract text, find text, HTML to PDF, images to PDF and text to PDF) and a Factur-X switch on Generate Invoice. Update, 30 November 2026: n8n verified 0.6.0 for Cloud, including these eight operations, Detect Fields and Make Fillable.
Zapier and Make: the Zapier app is at 1.0.1 with four actions: fill form, inspect, merge and invoice. None of the new endpoints are Zap actions yet; use a Webhooks step. There is nothing published for Make.
from pdfops import PdfOps
client = PdfOps() # reads PDFOPS_API_KEY from the environment
page = client.html_to_pdf("Invoice 1042 Total USD 55.50
", page_size="a4")
open("from-html.pdf", "wb").write(page.pdf)
result = client.extract_text("invoice.pdf", tables_format="csv")
for table in result["pages"][0]["tables"]:
print(table["csv"])
hit = client.find_text("invoice.pdf", "USD 55.50")["hits"][0]
print(hit["page"], hit["x"], hit["y"])
Fixed and hardened
Clients no longer follow redirects with your key. The TypeScript SDK, the Python client, the MCP server and the n8n node now refuse a 3xx instead of following it, so an X-API-Key header and a request body can never travel on to another origin.
The TypeScript SDK works on Cloudflare Workers with its default fetch. In 0.3.0 to 0.6.0 it stored the global fetch on the client and called it as a method, which Workers reject. 0.7.0 wraps the call, so new PdfOps() needs no custom fetch there.
The Python client is tested on 3.9, 3.12 and 3.13, and now sends a fixed content type for common attachment file extensions instead of reading the machine's MIME database, which gave different answers on different boxes.
Also since v0.11
Requests may run for up to 60 seconds. A request that goes past that is stopped by the platform with a plain-text 504, not the usual error JSON.
Try it
Turn Markdown into a PDF, with no signup. The keyless trial allows 100 calls per IP a month:
curl -X POST https://pdfops.dev/api/text-to-pdf \
-H "Content-Type: application/json" \
-d '{"content": "# Hello\n\nA PDF from one call.", "page_numbers": true}' \
-o hello.pdf
A free key from /docs/signup raises that
to 250 calls a month, no card. HTML to PDF counts 5 of them per call. A
workflow these endpoints still do not cover, PDF to image, OCR and
Office conversion among them, is the most useful thing you can
tell us.
← All posts · Docs · Pricing
---
# Filling a checkbox with pypdf, and the on-state string it never validates
Source: https://pdfops.dev/blog/pypdf-checkbox-not-checked
Guide
Filling a checkbox with pypdf, and the on-state string it never validates
2026-09-10 · ~5 min read
pypdf's update_page_form_field_values() will set a
checkbox's value without checking whether the value you passed
means anything. Pass the wrong on-state string, one that
doesn't exist anywhere in that field's appearance dictionary,
and the call returns normally, the field looks filled if you
read it back with get_fields(), and the box still
renders unchecked in every viewer. No exception, no log line,
not even at DEBUG level. Four common inputs trigger it:
"Yes" without the leading slash, "true",
"1", and the Python boolean True.
Only the exact string the field's own appearance dictionary
defines actually checks the box.
What actually decides whether a box looks checked
An AcroForm checkbox carries two things that have to agree: the
field's value (/V) and the widget's appearance
state (/AS). A viewer renders whichever appearance
stream /AS points to, out of the ones listed in
the widget's /AP /N dictionary. The PDF spec never
mandates a name for the checked state. /Yes is the
common convention because Acrobat's own form wizard writes it,
but a PDF built in a different tool can use /On,
/1, or a name its author chose. There is no
universal on value for a checkbox, only whatever key sits in
that specific field's own appearance dictionary next to
/Off.
Reproducing the silent no-op
Take a one-field test PDF whose checkbox agree_to_terms
really uses /Yes as its on-state, confirmed by
reading _States_ off the field:
['/Off', '/Yes']. Running
update_page_form_field_values() with
auto_regenerate=False for the values
"Yes", "true", "1", and
True leaves /V and /AS
at /Off every time, on pypdf 6.18.0. Only
{"agree_to_terms": "/Yes"}, matching the field's
real on-state string exactly, sets both to /Yes.
The function returns None, so there is nothing in
the call to check for success, and nothing gets logged either
way.
from pypdf import PdfReader, PdfWriter
reader = PdfReader("consent-form.pdf")
writer = PdfWriter()
writer.append(reader)
# Every one of these looks reasonable. None of them checks the box.
for value in ["Yes", "true", "1", True]:
writer.update_page_form_field_values(
writer.pages[0], {"agree_to_terms": value}, auto_regenerate=False,
)
print(value, "->", writer.get_fields()["agree_to_terms"].get("/V"))
# /Off, every single time. No exception, no warning.
# Only the field's own on-state string checks it.
writer.update_page_form_field_values(
writer.pages[0], {"agree_to_terms": "/Yes"}, auto_regenerate=False,
)
print(writer.get_fields()["agree_to_terms"].get("/V")) # /Yes
Reading the real on-state before you fill
The fix is to stop guessing at the on-state name and read it
off the field instead. reader.get_fields()
exposes it as _States_, a list where one entry is
always /Off and the other is the string that
actually checks the box; the widget annotation's own
/AP /N keys carry the same string for anyone
working at that lower level. Either way, the value passed to
update_page_form_field_values has to come from the
PDF itself, never from a hardcoded /Yes or a
stringified boolean, because the on-state name belongs to that
specific template, not to the file format in general.
reader = PdfReader("consent-form.pdf")
fields = reader.get_fields()
on_state = next(
s for s in fields["agree_to_terms"]["/_States_"] if s != "/Off"
)
writer = PdfWriter()
writer.append(reader)
writer.update_page_form_field_values(
writer.pages[0], {"agree_to_terms": on_state}, auto_regenerate=False,
)
The default that trades one bug for a viewer-dependent one
update_page_form_field_values defaults
auto_regenerate to True, and that
default sets NeedAppearances on the whole
document's AcroForm dictionary rather than baking the
checkbox's new appearance into the file at write time.
NeedAppearances tells a conforming viewer to
regenerate every field's appearance itself when the document
opens, so rendering moves from decided once, at fill time, to
decided per viewer, on every open. Acrobat honors the flag. A
number of other renderers, including some used in headless
pipelines, do not regenerate anything and just show whatever
appearance stream was already baked in, which for a field
filled this way can mean no visible change at all.
What that breaks beyond checkboxes
That reaches past checkboxes for anyone
testing generated
PDFs by hashing them. A document with
NeedAppearances set can render two different ways
depending on which engine opens it, and that undercuts the
premise behind hashing a PDF and diffing it in CI: the bytes
match, but a screenshot or a downstream re-render is not
guaranteed to. auto_regenerate=False avoids
planting that flag, at the cost of handling any
appearance-stream work pypdf does not bake in on its own.
Try it
None of this is specific to a checkbox filled by hand. It is
why /api/fill-form
takes a plain "true" or "false"
string for any checkbox field, resolves the real on-state name
internally, and bakes a fresh appearance stream into the
response PDF instead of setting NeedAppearances
and leaving the outcome to whichever viewer opens the file
next. A free key from /docs/signup
covers 250 calls a month, and
/docs/inspect reads back a
template's real field names and types first, checkboxes
included, so there is no need to go spelunging through
_States_ by hand at all.
← All posts · PDFops home
---
# Flattening a filled PDF form with pypdf, and the method that doesn't exist
Source: https://pdfops.dev/blog/pypdf-flatten-form-fields
Guide
Flattening a filled PDF form with pypdf, and the method that doesn't exist
2026-10-01 · ~6 min read
pypdf fills AcroForm fields without complaint: set a value, call
write(), and a compliant viewer shows the string in the
field. What ships in that output PDF is still a form. Every field a
script just filled stays interactive, so a person can click into it
and change what was just set, and a lot of downstream systems that
scan a PDF for stray AcroForm fields will flag it as unfinished.
Flattening is the step that removes that: bake each field's current
value into the page content, delete the field and its widget, and
the document behaves like a printed page instead of a form someone
forgot to lock.
What pypdf calls flatten() is a different operation
Reach for the obvious name and pypdf's PdfWriter has no
public flatten() method at all. It does carry a private
_flatten(), and its own docstring warns against
assuming what it does:
>>> from pypdf import PdfWriter
>>> [m for m in dir(PdfWriter()) if "flat" in m.lower()]
['_flatten', '_flatten_leaf_page', '_flatten_page_tree_node', 'flattened_pages']
"Flattening a PDF also means combining all the contents into one
single layer and making the file less editable" is the exact note
pypdf's maintainers left to distinguish their
_flatten() from that other meaning. Their version
flattens the page tree. It copies inherited attributes like
/Resources and /MediaBox down from parent
nodes onto each page object, which speeds up page lookups and has
nothing to do with form fields.
Filling still works, baking doesn't
from pypdf import PdfReader, PdfWriter
reader = PdfReader("w9.pdf")
writer = PdfWriter()
writer.append(reader)
writer.update_page_form_field_values(
writer.pages[0],
{"full_name": "Jordan Rivera"},
auto_regenerate=False,
)
with open("filled.pdf", "wb") as f:
writer.write(f)
That output has the right text sitting in the right box in every
viewer tested. It also still carries an /AcroForm
dictionary and an /Annots entry pointing at a live text
field widget, both readable straight back out through
PdfReader(...).get_fields(). pypdf has no further
method to call that removes them.
pdftk's flatten does the job, when you can run it
pdftk has shipped a flatten operation since its
earliest releases, and running it against the file above closes
that gap:
pdftk filled.pdf output flattened.pdf flatten
Run that and PdfReader("flattened.pdf").get_fields()
comes back empty, /Annots comes back None,
and the name renders as plain page content in every viewer tested.
For a script running on a machine where pdftk is already installed,
that one line is the rest of the job pypdf leaves undone.
The part that breaks on Lambda, Vercel, or a Worker
pdftk is a Java program wrapped in a shell script, so using it means
shipping a JRE alongside the code, not a small binary vendored into
a zip. AWS Lambda carries no system Java by default and needs a
custom layer with both the JRE and the pdftk jar; Vercel's
serverless functions run into the same shape of problem, and
Cloudflare Workers can't run it at all, because a V8 isolate has no
subprocess to shell out to in the first place. The same constraint
that forced the wkhtmltopdf-on-Lambda
migration applies here: a tool that works fine on a laptop can
be unusable on the runtime a PDF actually needs to run on.
One call instead
PDFops' /api/fill-form
takes a flatten parameter directly, so the
fill-and-bake step that needs pdftk locally becomes one HTTP call
instead, with no JRE to package and no subprocess to shell out to:
curl -X POST https://pdfops.dev/api/fill-form \
-H "X-API-Key: $PDFOPS_KEY" \
-F "pdfFile=@w9.pdf" \
-F 'fields={"full_name":"Jordan Rivera"}' \
-F "flatten=true" \
-o filled.pdf
The response is the flattened PDF itself, with no
AcroForm or Annots left to query, built on
a Helvetica appearance pass that runs the same way whether
flatten is set or not. Flattening here is cosmetic: it
stops casual re-editing in a viewer, not tamper evidence or a
digital signature, so pair it with an actual signing step if a
filled PDF needs to prove it wasn't altered afterward.
Try it
A free key from /docs/signup includes 250
fills a month with no card, enough to try
flatten=true against a real template before wiring it
into anything bigger.
← All posts · PDFops home
---
# Signed contracts from a Tally webhook on Cloudflare Workers
Source: https://pdfops.dev/blog/signed-contracts-from-tally-on-workers
Use Case
Generating signed contracts from a Tally webhook on Cloudflare Workers
2026-05-23 · ~6 min read
Update (July 2026): self-serve API keys and paid tiers are now live — free key (250/mo) and plans from $16/mo at /pricing. Pricing/waitlist references below reflect the beta era this post was written in.
A customer agrees to a 12-month deal in a sales call. You
send them a Tally form with the terms — name, company,
billing email, plan, start date, the standard MSA clauses
as a click-through. They hit submit. Within the second, a
counter-signed PDF of the contract lands in their inbox,
stamped with their answers and your signature block,
stored with a retention key that satisfies your auditor.
The whole flow runs on a single Cloudflare Worker that
fires when Tally's webhook hits — webhook handler,
PDFops /api/fill-form call, R2 storage,
transactional email — in under 400ms end-to-end.
The setup
Every B2B SaaS I run eventually accumulates a stack of
customer-contract obligations: MSAs for new customers,
DPAs for the GDPR-touching ones, order forms for each
renewal, SOWs for the consulting tier, NDAs for the
enterprise procurement gate. Most of these documents are
AcroForm-shaped — the customer's company name and
billing address, the plan they're on, the renewal date,
the signer's name and title — and most of them get
generated once and then sit in a contracts folder for
the next seven years.
The traditional path is a DocuSign envelope: salesperson
drags the customer's name into a template, clicks
"send for signature," customer logs in, signs, the
envelope gets archived. That works fine; it also costs
$30-45/user/month per ops seat and adds two days of
back-and-forth latency to every deal close. For a
deal-shape where the customer has already accepted
the terms in a form — clicked through every clause, typed
their billing details — DocuSign is a lot of overhead for
a flow that's already legally complete. (Companion:
contract PDFs from onboarding
flows covers the broader template-fill pattern across
MSAs, DPAs, and SOWs.)
The shape of the fix is to treat the form submission
itself as the signing event and emit a fully-stamped PDF
immediately. Tally fires a webhook on every submission;
a Cloudflare Worker picks it up, calls PDFops against
your contract template with the customer's answers,
stores the result in R2 with a retention-grade key, and
emails the customer a download link. Your operations
team never touches the deal close-out; the contract
archive grows by one row per submitted form.
The flow
Customer submits Tally form: the click-through is the acceptance; Tally fires its webhook
Tally → Worker: POST hits the Worker with HMAC signature in the tally-signature header (~50ms network)
Worker → signature verification: HMAC-SHA256 of the raw body against the shared secret (~1ms)
Worker → R2: fetch the contract template (cached at the edge after first fetch; ~10-30ms)
Worker → PDFops: POST /api/fill-form with the template + the customer's answers + your counter-signature metadata (~100-200ms including network)
Worker → R2: stash the filled contract with a retention key built from the customer ID + a UUID (~30-50ms)
Worker → email service: transactional email to the customer with the download URL (~10ms via webhook to Resend or similar)
Worker → Tally: 200 OK; Tally records the webhook as delivered
End-to-end: ~250-400ms. Tally's webhook UI shows the green checkmark before the customer has finished closing the tab; the contract is in their inbox by the time they open it.
The function
Here's the whole thing — ~75 lines of TypeScript, no abstractions. The Tally HMAC verification is real (Tally's signing scheme is HMAC-SHA256 over the raw request body, base64-encoded, compared against the tally-signature header). The template fetch goes through R2's binding so there's no egress charge from same-Worker reads.
// src/worker.ts
//
// Cloudflare Worker. Fires when Tally POSTs a form submission.
export interface Env {
CONTRACT_TEMPLATES: R2Bucket; // bound to your templates bucket
CONTRACT_ARCHIVE: R2Bucket; // bound to your archive bucket
TALLY_WEBHOOK_SECRET: string; // env var
PDFOPS_BASE_URL: string; // "https://pdfops.dev"
RESEND_API_KEY: string; // env var
RESEND_FROM: string; // "contracts@yourdomain.com"
}
const TEMPLATE_VERSION = '2026.05.msa-v4';
const COUNTERSIGNER = { name: 'TJ Hayes', title: 'Founder', signed_at: () => new Date().toISOString() };
interface TallyPayload {
data: {
fields: Array<{ key: string; label: string; value: string | string[] | boolean }>;
submissionId: string;
createdAt: string;
};
}
export default {
async fetch(req: Request, env: Env, ctx: ExecutionContext): Promise {
if (req.method !== 'POST') return new Response('method not allowed', { status: 405 });
// 1. Verify Tally's HMAC signature.
const raw = await req.text();
const sig = req.headers.get('tally-signature') ?? '';
if (!(await verifyTally(raw, sig, env.TALLY_WEBHOOK_SECRET))) {
return new Response('bad signature', { status: 401 });
}
const payload = JSON.parse(raw) as TallyPayload;
// 2. Project Tally's field array into the AcroForm field names your
// template uses. The mapping is template-specific; this is the
// shape for the MSA template — adapt per contract.
const byKey = Object.fromEntries(payload.data.fields.map((f) => [f.key, f.value]));
const customer = {
company_name: String(byKey['company_name'] ?? ''),
signer_name: String(byKey['signer_name'] ?? ''),
signer_title: String(byKey['signer_title'] ?? ''),
billing_email: String(byKey['billing_email'] ?? ''),
plan: String(byKey['plan'] ?? ''),
start_date: String(byKey['start_date'] ?? ''),
agreement_version: TEMPLATE_VERSION,
countersigner_name: COUNTERSIGNER.name,
countersigner_title: COUNTERSIGNER.title,
countersigned_at: COUNTERSIGNER.signed_at(),
};
// 3. Fetch the contract template from R2 (template-version-pinned key).
const tplObj = await env.CONTRACT_TEMPLATES.get(`msa/${TEMPLATE_VERSION}.pdf`);
if (!tplObj) return new Response('template missing', { status: 500 });
const templatePdf = await tplObj.arrayBuffer();
// 4. Call PDFops /api/fill-form with the template + the projection above.
const fd = new FormData();
fd.append('pdf', new Blob([templatePdf], { type: 'application/pdf' }), 'msa-template.pdf');
fd.append('fields', JSON.stringify(customer));
const pdfResp = await fetch(`${env.PDFOPS_BASE_URL}/api/fill-form`, { method: 'POST', body: fd });
if (!pdfResp.ok) {
// 5xx so Tally retries (Tally retries on 5xx with exponential backoff).
return new Response(`PDFops error: ${await pdfResp.text()}`, { status: 500 });
}
const filledPdf = await pdfResp.arrayBuffer();
// 5. Archive the filled contract under a retention-grade key.
// Keep the submissionId in the key path so audit retrieval is
// deterministic; UUID-suffix to avoid object-name collisions.
const archiveKey = `contracts/${payload.data.submissionId}-${crypto.randomUUID()}.pdf`;
await env.CONTRACT_ARCHIVE.put(archiveKey, filledPdf, {
httpMetadata: { contentType: 'application/pdf' },
customMetadata: {
template_version: TEMPLATE_VERSION,
company_name: customer.company_name,
countersigned_at: customer.countersigned_at,
submission_id: payload.data.submissionId,
},
});
// 6. Fire-and-forget email with a signed download URL.
// The presigned URL is what the customer opens; the R2 object stays
// private so revoking access is just rotating the signing key.
const downloadUrl = await signedR2Url(env.CONTRACT_ARCHIVE, archiveKey, { expiresInSeconds: 60 * 60 * 24 * 7 });
ctx.waitUntil(fetch('https://api.resend.com/emails', {
method: 'POST',
headers: {
Authorization: `Bearer ${env.RESEND_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
from: env.RESEND_FROM,
to: customer.billing_email,
subject: `Your countersigned ${customer.plan} agreement`,
html: `Your ${customer.plan} agreement is countersigned and on file. ` +
`Download a copy: ${downloadUrl}
`,
}),
}));
return new Response('OK');
},
};
async function verifyTally(raw: string, sig: string, secret: string): Promise {
if (!sig) return false;
const key = await crypto.subtle.importKey(
'raw', new TextEncoder().encode(secret),
{ name: 'HMAC', hash: 'SHA-256' }, false, ['verify'],
);
const signature = Uint8Array.from(atob(sig), (c) => c.charCodeAt(0));
return crypto.subtle.verify('HMAC', key, signature, new TextEncoder().encode(raw));
}
That's the production-shape. Deploy with wrangler deploy, point Tally's webhook at https://.workers.dev, set the four env vars, drop your MSA PDF into the templates bucket, and every submitted form produces a countersigned contract in the customer's inbox within a second.
One auth-boundary footgun worth flagging: the
example uses access: 'private' by default on the
R2 archive object and emails a presigned URL with a one-week
expiry. That's the right shape for an initial download link — but
contracts are long-lived artifacts and the link expiring 7 days
later breaks audit retrieval. For long-term access, keep the
object private and front it with your own download route handler
that checks the requesting user's claim (customer can fetch
their own contract; finance/legal can fetch any). The
presigned URL is the convenience for the first download; the
access layer is what survives the audit.
The contract template
Build the template once in Acrobat, Mac Preview, or LibreOffice Draw — paste your MSA prose into the body, drop AcroForm fields where customer-specific data goes, and rename the fields to short predictable names (company_name, signer_name, signer_title, billing_email, plan, start_date) that match the keys your Worker projects from Tally — the free form-field inspector lists a template's current names if you need to check them. Put your counter-signature block at the bottom with fields for countersigner_name, countersigner_title, countersigned_at, and agreement_version.
Version the template path in R2: msa/2026.05.msa-v4.pdf. When your terms change — quarterly is typical for a growing SaaS — upload msa/2026.08.msa-v5.pdf and bump TEMPLATE_VERSION in the Worker. The previous version stays in R2 unchanged, which means contracts signed against v4 remain forensically reproducible from the same template you signed them with. The agreement_version field stamps the rendered PDF too, so a customer looking at a contract from eighteen months ago knows exactly which terms they accepted.
Keep the field-naming stable across template versions. If you rename billing_email to contact_email in v5, the Worker's projection map breaks silently for v5 submissions until you update it. A schema-version field on the template itself (template_schema: '2') plus a switch in the Worker is a cheap way to keep multiple versions co-resident during a migration.
What "signed" means in this pattern
The PDF the customer receives says "countersigned by on " on the signature block and stamps the template version. That's a representation of an agreement that's already complete — the customer clicked through the terms in Tally, your Worker signed the resulting PDF, both halves are on file. For most B2B SaaS contracts this is sufficient: the click-through plus the emitted PDF plus the R2 archive entry plus the email delivery receipt plus the Tally submission record are five pieces of evidence pointing at the same agreement.
It's not the same as a cryptographic signing event with a signer certificate or a TSA-backed timestamp. If your contract category requires non-repudiation in the technical sense — the signer literally cannot deny signing — you need a real e-sign workflow with the signer's certificate (DocuSign, Adobe Sign, or a niche provider like SignWell). The pattern in this post sits one layer up: it's the artifact-generation layer that produces a defensible contract PDF on every form submit, which is enough for the long-tail of "every B2B SaaS deal" but not enough for the kind of contract a real-estate transaction or a regulated-industry vendor agreement needs.
The clean separation: Tally captures intent, the Worker emits the artifact, the R2 archive proves storage, the Resend log proves delivery. If you later need to add a real e-sign step, the artifact this Worker produces is exactly what you'd feed into a DocuSign envelope as the document under signature.
The cost math
Customer contracts scale with deals, which scale with growth. At 2,000 contracts per year across a multi-product portfolio — MSAs, DPAs, renewal order forms, SOWs, NDAs — here's how the substrate matters:
Manual: salesperson templates in Word and emails for signature: ~20 minutes of ops time per contract (template prep, customer back-and-forth, signed-PDF storage). At $40/hr loaded ops cost, 2,000 × 20 min = ~667 hours = ~$27,000/yr in ops drag, plus two-to-five days of latency per deal close that pushes invoice recognition into the next billing cycle.
DocuSign / Adobe Sign / Dropbox Sign: $30-45/user/month for the ops seat doing the envelope work. A 5-seat ops team runs $1,800-$2,700/yr; a 15-seat team runs $5,400-$8,100/yr. Excellent product if you actually need the e-sign workflow — most B2B SaaS contracts don't, the click-through in Tally already established acceptance.
DocRaptor / PDFShift / PDFMonkey: $0.05–$0.20/doc × 2,000 = $100-$400/yr. Cheap by SaaS standards, priced from a substrate that didn't anticipate edge-deployed apps; the per-document floor doesn't track the substrate's true unit economics.
PDFops (post-beta): priced from the substrate's unit economics, lands materially below the incumbents at per-doc pricing. During beta: 100 requests per IP per month, free, no signup.
Update 2026-11-09: the $0.05-$0.20 per document range above is out of date. Current published prices are lower: DocRaptor's Max plan works out to about 3.7 cents per document at 4,000 documents a month, PDFShift about 1 cent or less, and PDFMonkey about 0.5 cent (prices read 2026-11-09). See the comparisons.
The point isn't that PDFops produces nicer contracts. It's that the substrate-level pricing makes per-deal PDF generation cheap enough that you stop reserving "auto-emit contract on form submit" for big customers and turn it on for every deal — and the two-day signature-latency tax goes away with it.
When this pattern doesn't fit
You need a real e-sign workflow with signer certificates. Real-estate deals, regulated-industry vendor agreements, anything where "the signer cannot deny signing" is load-bearing — go to DocuSign / Adobe Sign / SignWell. The Worker pattern produces the artifact; e-sign tools produce the proof of signature. They compose: emit the contract here, feed it into the e-sign envelope as the document under signature.
Your contracts vary substantially per customer, not just by field values. If every customer renegotiates clauses and the contract is essentially a fresh document each time, AcroForm fill gets fragile. Use an HTML-to-PDF rendering path with a templating engine (Handlebars/MJML/EJS into headless Chrome) instead. See the DocRaptor comparison for that side of the tradeoff.
You need multi-party signatures (your countersignature plus a customer signature plus a guarantor plus a witness). The fill-form pattern is a single-pass tool; a multi-party flow needs a workflow engine that gates each step on the previous party's signature. Could be approximated with multiple PDFops calls chained behind a Durable Object — but at that point an off-the-shelf e-sign product is doing the same job with a much better failure-mode story.
You're capturing payment at signature, not just intent. Stripe Checkout's checkout.session.completed webhook is the better trigger; see the Stripe invoice walkthrough for the Workers-shaped pattern. You can chain the two: payment-complete fires Stripe webhook, which kicks the contract emitter Worker the same way Tally would.
Try it
The fill-form endpoint is live and works against any AcroForm PDF — not just contracts. Drop in your MSA template (AcroForm fields named to match your projection) and call fill-form directly:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@msa-template.pdf" \
-F 'fields={"company_name":"Acme Inc","signer_name":"Jamie Lee","signer_title":"CTO","billing_email":"billing@acme.example","plan":"Growth","start_date":"2026-06-01","agreement_version":"2026.05.msa-v4","countersigner_name":"TJ Hayes","countersigner_title":"Founder","countersigned_at":"2026-05-23T14:32:11Z"}' \
-o countersigned-msa.pdf
You'll get the countersigned PDF back. From there it's wiring it into a Worker handler shaped like the function above. The fill-form reference covers the full request schema, error codes, and per-field-type quirks (checkboxes, radios, multi-line text).
Deal-shape contracts that don't fit the Tally pattern, missing AcroForm field types, retention/access requirements that need a different storage primitive — drop a note on the waitlist form. The message field is the fastest way to influence what ships next.
Related
Auto-filling a W-9 from an onboarding webhook — the same webhook-fill shape for tax forms
Audit-trail PDFs from a Next.js Server Action — adding a metadata cover page to the archive
Assembling a KYC packet on Deno Deploy — merging the filled contract with uploaded attachments
← All posts · PDFops home
---
# Snapshot-testing generated PDFs in CI with a hash instead of a diff
Source: https://pdfops.dev/blog/snapshot-testing-pdfs-in-ci
Guide
Snapshot-testing generated PDFs in CI with a hash instead of a diff
2026-07-30 · ~5 min read
A headless-browser renderer stamps a fresh /CreationDate
into every PDF it produces, reorders internal objects between runs,
and can re-hint fonts slightly differently depending on the machine
that ran it. A snapshot test built on "diff these bytes" fails on
every single run against that kind of renderer, whether or not the
invoice actually changed. PDFops fills the same template and field
values into byte-identical output every time, so a hash-based
snapshot test can catch what actually changed: the template, or
the data, instead of drowning in render noise.
Why a raw PDF diff doesn't work
Open two PDFs produced a minute apart by the same rendering
pipeline and run a byte-level diff, and you'll get hits even when
the visible content is identical:
Timestamps. /CreationDate and /ModDate get written at render time, so they differ on every invocation by definition.
Object ordering. The cross-reference table and internal object numbers can shift based on the order the rendering engine happened to write things internally, with no effect on how the page looks.
Font subsetting. A browser-based renderer subsets embedded fonts to the glyphs actually used, and the exact subset hash can vary between two runs of the same renderer version on different infrastructure.
None of that is a bug in the renderer. It's just what "render HTML
to a page" costs you: the output is a fresh artifact each time,
built from a pipeline with several points where non-content bytes
can legitimately differ. A snapshot test needs the opposite
guarantee: same input, same bytes, always.
What determinism changes
POST /api/fill-form only writes into
AcroForm fields that already exist in the template you upload. It
doesn't re-render the page, re-flow layout, or touch anything
outside the fields you named. Send the same template and the same
field values twice and the response bytes match, down to the last
one. That's the whole property a snapshot test needs: hash the
output once, commit the hash, and every later run either matches it
or tells you something real happened: the template changed, the
field values changed, or the request itself is wrong.
The workflow
Keep a fixture template and a fixed set of field values in the
repo, call fill-form with them, hash the response, and
compare against a committed golden hash. This script does the
comparing part:
// scripts/verify-pdf-snapshot.mjs
import { createHash } from 'node:crypto';
import { readFile } from 'node:fs/promises';
const GOLDEN_HASH = (await readFile('fixtures/invoice.sha256', 'utf8')).trim();
const FIELDS = { customer_name: 'Acme Co', total: '$1,250.00' };
const template = await readFile('fixtures/invoice-template.pdf');
const form = new FormData();
form.append('pdf', new Blob([template]), 'invoice-template.pdf');
form.append('fields', JSON.stringify(FIELDS));
const res = await fetch('https://pdfops.dev/api/fill-form', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY },
body: form,
});
if (!res.ok) {
const { error, details } = await res.json();
throw new Error(`fill-form failed (${error}): ${details}`);
}
const bytes = new Uint8Array(await res.arrayBuffer());
const hash = createHash('sha256').update(bytes).digest('hex');
if (hash !== GOLDEN_HASH) {
console.error(`snapshot mismatch\n got: ${hash}\n expected: ${GOLDEN_HASH}`);
process.exit(1);
}
console.log('PDF snapshot matches.');
Wire it into a pull-request workflow the same way you'd wire up any
other check:
# .github/workflows/pdf-snapshot.yml
name: pdf-snapshot
on: [pull_request]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: node scripts/verify-pdf-snapshot.mjs
env:
PDFOPS_API_KEY: ${{ secrets.PDFOPS_API_KEY }}
A pull request that touches the invoice template but leaves the
field values alone now fails this job with a clear reason, instead
of a green check that never looked.
Updating the golden hash on purpose
When the template changes for real, regenerate the fixture hash and
commit it as its own reviewable line, so the person reviewing the
pull request sees exactly what triggered it:
node scripts/verify-pdf-snapshot.mjs --update
git diff fixtures/invoice.sha256
A one-line hash change next to a template edit reads as expected.
The same one-line hash change with no template edit in the diff is
the exact signal a snapshot test exists to raise.
Getting a key for CI
GitHub-hosted runners draw from a shared pool of Azure IP ranges
used by many unrelated jobs at once, and PDFops' anonymous trial
meters by IP address. A CI job running keyless can share its
100-requests-per-month bucket with other repositories' traffic on
the same address, which makes for a confusing rate-limit failure
that has nothing to do with your own test volume.
POST /api/signup with an email gets a
free key delivered to your inbox: 250 requests/month, no card.
curl -X POST https://pdfops.dev/api/signup \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
Store it as a repository secret (PDFOPS_API_KEY in the
workflow above) and the job's quota is yours alone to watch, with
GET /api/usage available if you want to
check it from a script instead of the dashboard.
Related
POST /api/fill-form reference: full field-type mapping and error codes
The case for deterministic PDF filling: the broader argument for why byte-identical output matters
Migrating off wkhtmltopdf on AWS Lambda: swapping a non-deterministic HTML renderer for a fill-form call
← All posts · PDFops home
---
# Invoice PDFs from Stripe webhooks on Cloudflare Workers
Source: https://pdfops.dev/blog/stripe-invoice-pdf-workers
Use Case
Generating invoice PDFs from Stripe webhooks on Cloudflare Workers
2026-05-13 · ~6 min read
Update (July 2026): self-serve API keys and paid tiers are now live — free key (250/mo) and plans from $16/mo at /pricing. Pricing/waitlist references below reflect the beta era this post was written in.
The most common PDF use case across the SaaS businesses I
run, end-to-end on an edge runtime: a Stripe payment
succeeds, an invoice PDF gets filled from a template, the
file lands in object storage, and the customer gets emailed
a link. The whole flow runs on a single Cloudflare Worker
and completes in under 300ms.
The setup
You're running a SaaS. Stripe takes the payment. You want a
PDF invoice in customer hands within seconds, regardless of
whether they're in Lisbon, Lagos, or LA. You don't want to
run a Node backend or spin up Lambda containers with
headless Chrome. (Companion: invoice
PDFs at scale covers the broader pattern + variations.)
The shape of the problem maps to a Stripe webhook handler.
Stripe fires payment_intent.succeeded at your
endpoint within seconds of the charge. The handler has ~10s
before Stripe times out and retries — plenty of room for a
fill-form call and a write to
object storage, if both the handler and the dependencies
are on the edge.
The flow
Stripe → CF Worker: webhook fires, signature verified
Worker → KV: fetch the invoice-template PDF (bundled at build time or stored as a KV binary; ~10-30ms)
Worker → PDFops: POST /api/fill-form with the template + the Stripe data as field values (~100-200ms including network)
Worker → R2: stash the filled PDF for later access (~30-50ms)
Worker → email service: fire-and-forget a transactional email with the R2 download URL (~10ms via webhook to Resend or similar)
Worker → Stripe: 200 OK
End-to-end: ~150-300ms. Stripe is happy, the customer gets the email in the time it takes them to switch tabs.
The Worker
Here's the whole thing — ~50 lines, TypeScript, no abstractions. The Stripe signature verification is omitted for brevity; use stripe.webhooks.constructEventAsync from the official Stripe SDK (it's edge-runtime compatible as of v14).
export interface Env {
INVOICES_KV: KVNamespace;
INVOICES_R2: R2Bucket;
STRIPE_WEBHOOK_SECRET: string;
EMAIL_WEBHOOK_URL: string; // e.g. Resend or your own
}
export default {
async fetch(req: Request, env: Env): Promise {
if (req.method !== 'POST') return new Response('Method not allowed', { status: 405 });
// 1. Verify Stripe signature (see Stripe docs — Workers-compatible)
const body = await req.text();
const event = await verifyStripe(req, body, env.STRIPE_WEBHOOK_SECRET);
if (event.type !== 'payment_intent.succeeded') {
return new Response('OK'); // ignore other event types
}
const intent = event.data.object;
// 2. Fetch the invoice template from KV (binary)
const templatePdf = await env.INVOICES_KV.get('invoice-template', 'arrayBuffer');
if (!templatePdf) return new Response('Template missing', { status: 500 });
// 3. Call PDFops /api/fill-form with template + Stripe data
const fd = new FormData();
fd.append('pdf', new Blob([templatePdf], { type: 'application/pdf' }), 'template.pdf');
fd.append('fields', JSON.stringify({
customer_name: intent.metadata.customer_name ?? 'Customer',
amount: (intent.amount / 100).toFixed(2),
currency: intent.currency.toUpperCase(),
invoice_id: `INV-${intent.id.slice(-8)}`,
date: new Date().toISOString().slice(0, 10),
}));
const pdfResp = await fetch('https://pdfops.dev/api/fill-form', { method: 'POST', body: fd });
if (!pdfResp.ok) {
// Return 500 so Stripe retries the webhook
return new Response(`PDFops error: ${await pdfResp.text()}`, { status: 500 });
}
const filledPdf = await pdfResp.arrayBuffer();
// 4. Stash in R2 with the Stripe payment ID as the object key
const r2Key = `invoices/${intent.id}.pdf`;
await env.INVOICES_R2.put(r2Key, filledPdf, {
httpMetadata: { contentType: 'application/pdf' },
});
// 5. Fire-and-forget email (use ctx.waitUntil for guaranteed delivery).
// The download URL below is guessable from the Stripe payment ID — for
// production, use an R2 presigned URL (S3-compatible API) or an authed
// Worker proxy. See the "auth boundary" paragraph below the code.
const downloadUrl = `https://invoices.your-domain.com/${r2Key}`;
fetch(env.EMAIL_WEBHOOK_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
to: intent.receipt_email,
subject: `Invoice INV-${intent.id.slice(-8)}`,
html: `Your receipt: ${downloadUrl}
`,
}),
}).catch(() => {});
return new Response('OK');
},
};
That's the production-shape. Deploy it to Workers, point Stripe's webhook at the URL, drop your invoice template into KV, and you have a globally-distributed invoice generator paying ~$0 for the compute.
One auth-boundary footgun in the code above: the
R2 object key is just the Stripe payment ID, so the resulting
download URL is enumerable by anyone who can guess Stripe ID
shapes — and they're not secret, they show up in customer
receipts and support tickets. For real traffic, either generate
a short-lived R2 presigned URL via the S3-compatible API (and
email that instead of the bare path), or route downloads
through a separate Worker that authenticates the customer
before streaming the object. The code above keeps the happy-path
visible; the download endpoint is where you put the auth check.
The template
The PDFops /api/fill-form endpoint expects a PDF with AcroForm fields whose names match the JSON keys you send. Build the template once in any PDF editor that supports form fields (Acrobat, Mac Preview, LibreOffice Draw, the pdftk CLI). Field names like customer_name and invoice_id are what the API binds against — the free field inspector lists them for any template you drop in.
Upload the template binary to KV via wrangler kv:key put or whatever your deploy pipeline uses. ~50-200 KB is typical; well under KV's 25MB-per-value limit.
The cost math
At 50,000 invoices per month — a real number for a small but established SaaS — here's how the substrate matters:
Headless Chrome on Lambda: ~$50/mo of compute, plus operational cost (Chrome layer, cold starts, the occasional render-failure rabbit hole).
DocRaptor or similar hosted PDF API: $0.05–$0.20/doc × 50k = $2,500–$10,000/mo. Centralized, so latency from Europe / Asia is mediocre. Their pricing reflects their substrate, not their value.
PDFops (post-beta): priced from the substrate's unit economics, not as a discount on incumbents. Per-document pricing lands when paid tiers open; the substrate (CF Workers + R2, no Chrome, no Lambda cold starts) puts the floor at a different number entirely.
Update 2026-11-09: the $0.05-$0.20 per document range above is out of date. Current published prices are lower: DocRaptor's Max plan works out to about 3.7 cents per document at 4,000 documents a month, PDFShift about 1 cent or less, and PDFMonkey about 0.5 cent (prices read 2026-11-09). See the comparisons.
The wedge isn't that PDFops generates PDFs faster. It's that the hosting substrate it's built on has different unit economics, and that difference passes through to per-document pricing.
When this pattern doesn't fit
You need HTML-to-PDF with rich CSS layout, web fonts, or page breaks driven by content. PDFops fills form fields in pre-designed templates; it doesn't render arbitrary HTML. For that, Puppeteer or a hosted HTML-to-PDF service is still the answer.
You need watermarks, stamps, signatures, or text extraction. Those endpoints are on the roadmap (/api/stamp, /api/sign, /api/extract-text) but not shipped yet. The waitlist is how I'm prioritizing.
Your invoice volume is > 10k/month today and you need it to work this week. The anonymous tier is 100/IP/month during beta; the higher-quota waitlist keys land when paid plans open. Reach out via the form's message field if you need to test at higher volume sooner.
Try it
The two endpoints used in this pattern are live:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","amount":"1250.00","invoice_id":"INV-1001","date":"2026-05-13"}' \
-o filled-invoice.pdf
You'll get an invoice PDF back. From there it's just wiring it into a Stripe webhook handler shaped like the code above.
Questions, missing endpoints, edge-deploy weirdness? Drop a note on the waitlist form — the message field is the fastest way to influence what ships next.
Related
The /api/invoice endpoint reference — generate invoices without building a template first
Free invoice PDF generator — try the invoice flow in the browser
Filling a PDF inside a Cloudflare Worker — the general Worker pattern this post builds on
Monthly PDF bundles on a cron trigger — batching the same invoices into statements
← All posts · PDFops home
---
# The 4.5 MB request limit that breaks a working PDF merge on Vercel
Source: https://pdfops.dev/blog/vercel-request-body-limit-pdf-merge
Guide
The 4.5 MB request limit that breaks a working PDF merge on Vercel
2026-10-08 · ~6 min read
A PDF merge endpoint that works every time on a laptop can start
returning 413 the moment it moves onto Vercel, with no body in the
response to explain why. The input files look reasonable, the
handler code hasn't changed, and the identical request against a
local dev server still succeeds. The cause is a cap on the whole
request body that Vercel enforces before a serverless function's
own code runs at all, so no amount of debugging inside the handler
will find it. The handler never gets invoked.
What actually happens at 4.5 MB
Vercel's Serverless Functions reject any request body over 4.5 MB
(4,718,592 bytes) with a 413 and the status
FUNCTION_PAYLOAD_TOO_LARGE, confirmed against a live
production deployment. That rejection happens at the platform
layer, ahead of the function's own code, so a try/catch
wrapped around the handler's body-parsing logic has nothing to
catch; the request never reaches it. The limit applies to the
whole body regardless of how it's packaged, so a multipart upload
with three PDFs attached counts all three files together against
one shared 4.5 MB ceiling, not against three separate per-file
limits.
Why local testing never catches it
A local dev server rarely enforces any size limit on its own.
Express and Node's built-in http server will accept a
multipart body of pretty much any size by default, so a handler
tested with curl against localhost:3000
swallows a 10 MB upload without complaint. Deploy the same code to
Vercel and the identical curl command against the
production URL comes back 413 before the handler's first line runs.
The gap between working in dev and failing in prod comes from a
platform behavior that only exists once the request leaves
localhost, so a local test suite built around the dev server will
pass cleanly right up until the first real deploy with a big enough
file.
Size the request before you send it
Since the rejection carries no detail about which file or how far
over the limit the request was, the cheaper fix is a client-side
check that runs before the request goes out at all, so a caller
gets a specific error instead of an opaque 413:
const MAX_REQUEST_BYTES = 4.5 * 1024 * 1024;
function assertFitsRequestLimit(files) {
const total = files.reduce((sum, f) => sum + f.size, 0);
if (total >= MAX_REQUEST_BYTES) {
throw new Error(
`request would be ${(total / 1024 / 1024).toFixed(1)} MB; ` +
`the platform rejects anything at or above 4.5 MB`,
);
}
}
That check needs to run against the exact bytes going over the
wire, including multipart boundaries and any other form fields
riding along with the files, since those count toward the same
4.5 MB ceiling too.
Chaining calls instead of raising the limit
There's no project setting on Vercel that raises this particular
cap; it's fixed at the platform level for Serverless Functions on
every plan. For a merge of more than a handful of PDFs, the
practical fix is to stop trying to fit the whole job into one
request and chain calls instead: merge the first batch that fits
under the limit, feed that single merged result back in as one
more input alongside the next batch, and keep going until every
file has been folded in.
async function mergeAll(apiKey, pdfBuffers, maxBytes = 4 * 1024 * 1024) {
let merged = null;
let batch = [];
let batchBytes = 0;
for (const buf of pdfBuffers) {
if (batch.length && batchBytes + buf.length > maxBytes) {
merged = await mergeBatch(apiKey, merged ? [merged, ...batch] : batch);
batch = [];
batchBytes = 0;
}
batch.push(buf);
batchBytes += buf.length;
}
return mergeBatch(apiKey, merged ? [merged, ...batch] : batch);
}
async function mergeBatch(apiKey, buffers) {
const form = new FormData();
for (const buf of buffers) {
form.append("pdf", new Blob([buf]), "input.pdf");
}
const res = await fetch("https://pdfops.dev/api/merge", {
method: "POST",
headers: { "X-API-Key": apiKey },
body: form,
});
if (!res.ok) throw new Error(`merge batch failed: ${res.status}`);
return Buffer.from(await res.arrayBuffer());
}
Each call stays well under the per-request ceiling because the
batch size is capped before it's sent, and the running merged
result only ever travels as one file per step instead of growing
the whole input set into a single oversized request.
How PDFops surfaces this instead of a bare 413
PDFops' own /api/merge and
/api/fill-form sit on
the same 4.5 MB line Vercel enforces, but reject early with a JSON
body instead of an empty platform 413:
{
"error": "request_too_large",
"details": "request body exceeds 4.5 MB"
}
That check runs as middleware before the body is buffered, so a
caller gets request_too_large with a clear reason
instead of a bare 413 with nothing in the body to act on. The
per-PDF cap sits at 4 MB and the merge endpoint takes up to 20
files, so the same batching approach above applies directly: chain
/api/merge calls for anything that won't fit in one
request.
Try it
A free key from /docs/signup includes
250 calls a month with no card, enough to try a batch of real PDFs
against /api/merge and see the 4.5 MB boundary and the
request_too_large response firsthand.
← All posts · PDFops home
---
# Why I built PDFops — PDFops
Source: https://pdfops.dev/blog/why-pdfops
Essay
Why I built PDFops
2026-05-11 · ~6 min read
Update (July 2026): self-serve API keys and paid tiers are now live — free key (250/mo) and plans from $16/mo at /pricing. Pricing/waitlist references below reflect the beta era this post was written in.
I run several SaaS businesses. Across every one of them, there's
a moment that always comes — usually a few weeks in —
when I need to generate PDFs. Invoices for a billing flow. Filled
forms for an onboarding step. Signed contracts. Inspection reports.
Receipts. It never seems like it'll be a big problem, until I sit
down to do it.
Then it's a big problem. Hosted PDF APIs (DocRaptor, PDFShift,
PDFMonkey) charge $0.05 to $0.20 per document — fine in a
spreadsheet, brutal in a system that generates 50,000 a month.
Self-hosting a PDF library means running a Node or Python backend,
which clashes with the rest of my stack being on modern edge
platforms. Headless Chrome on Lambda works — until it doesn't,
somewhere around the third weird font issue or the first time the
cold-start latency wrecks a checkout flow.
After hitting that wall enough times, I built it once, as a hosted
API. Now I use it across every business. Then I started talking
to other operators and realized I wasn't the only one — the
same PDF-shaped wall sits in front of every multi-product founder I
know. So I cleaned it up and made it self-serve.
What it is, in four bullets
Hosted PDF API. Small PDFs typically come back in a fraction of a second, HTML to PDF included. No region config, no VPC tuning, no warm-pool sizing.
Three endpoints today: POST /api/fill-form (fill PDF form fields), POST /api/merge (merge N PDFs into one), and POST /api/waitlist (sign up for higher tiers).
Free during beta. 100 requests per IP per month, no auth, no signup. If you can type curl, you can use it.
Designed to be roughly 10× cheaper than incumbents when pricing lands post-beta. The unit economics work because the platform PDFops runs on isn't where the incumbents priced their margins from.
Update 2026-11-09: pricing has since launched, and the 10× target holds only against some incumbents. At 4,000 documents a month, Indie ($16) is about 9× cheaper than DocRaptor and about 2× cheaper than PDFShift, and slightly cheaper than PDFMonkey. See the comparisons for the numbers.
Try it
Pull any PDF with form fields off your desktop, swap the field-name JSON below, and run:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
You get a filled PDF back. No auth header. No signup. 100 requests per IP per month are free during beta.
Need to merge a couple of PDFs into one?
curl -X POST https://pdfops.dev/api/merge \
-F "pdf=@cover.pdf" \
-F "pdf=@body.pdf" \
-F "pdf=@appendix.pdf" \
-o combined.pdf
Both endpoints should just work the first time. If they don't, the waitlist form doubles as a bug-report channel until there's a proper issue tracker. Full request/response schemas, error codes, and per-language examples live in the docs.
Why this is cheaper than what you're using
Existing hosted PDF APIs priced their margins on top of a hosting
substrate that's roughly an order of magnitude more expensive than
what's available today. They shipped years before that substrate
existed. Their pricing reflects their costs, not their value, and
nothing about $0.05-0.20 per document is fundamental. Side-by-side
against DocRaptor, PDFShift, and PDFMonkey covers the
incumbent-by-incumbent specifics.
PDFops is built on a newer hosting tier with materially different
unit economics. The savings pass through. Getting a PDF operation
to actually run on that newer tier took longer than I expected.
Once it works, it works.
That's it. The market just hasn't repriced PDF generation against
current hosting costs yet, because the only people positioned to
do it are the ones using it for their own products first.
What's not there yet
This is an MVP. I'm publishing the thinnest useful version on purpose, so I can find out what to build next from people who actually use it instead of guessing.
More endpoints: /stamp, /watermark, /sign, /extract-text, /redact. Vote on the waitlist form for which one matters most for your use case.
Pricing tiers. Right now everything is free, capped at 100 requests per IP per month. Soon it'll be free + paid, with the free tier sized to cover real side-project usage.
A dashboard. Currently API-only. You get back PDFs; you don't get a UI to look at quota or recent calls. The waitlist form measures whether that matters.
Waitlist
If you'd use a paid tier — more requests, more endpoints, a
dashboard, support —
join the waitlist. A few quick questions
help me figure out what to build next and which features actually
justify their build cost. The waitlist is the only way features
get prioritized; nothing on the roadmap above is committed until
I see real demand.
Related
Getting started with PDFops — first API call in 30 seconds
The playground — fill and merge in the browser, no signup
Use cases — invoices, contracts, and reports end to end
← All posts · PDFops home
---
# PDFops vs Anthropic's PDF skill: a tool call or generated code for every form
Source: https://pdfops.dev/vs/anthropic-pdf-skill
Comparison
PDFops vs Anthropic's PDF skill
Anthropic PDF skill alternative: a skill that has the agent write code, against a tool server that does not
Anthropic's PDF skill is a folder of instructions and Python scripts that Claude follows: it reads the instructions, then writes and runs code (pypdf and friends) to fill, merge or split your PDF. PDFops is a tool server: Claude calls pdf_inspect and pdf_fill and gets a PDF back, with no code written for the job. If you searched for an Anthropic PDF skill alternative, the real question is whether you want the agent generating code each time or calling a fixed tool.
Try PDFops in one line
claude mcp add pdfops -- npx -y pdfops-mcp
Or point any MCP client that takes a remote URL at https://pdfops.dev/api/mcp. The first 100 calls per IP each month need no key; a free key (250 per month, no card) comes by email after that. Setup for other clients.
Facts checked 2026-11-29. Sources: Anthropic skills repo, skills/pdf, PDFops MCP page, PDFops pricing. Vendor claims are the vendor's own words; we have not tested them.
Quick verdict
Choose the Anthropic skill if you already work in Claude with code execution, want everything free and local, need OCR on scanned PDFs, or want scripts you can read and edit. It adds no vendor, no quota and no upload.
Choose PDFops if you want the same job to run the same way every time: pdf_inspect returns the form's real field names and types, pdf_fill takes exactly those, and merge, split, stamp and invoice are single calls. It also works in any MCP client, including ones with no code sandbox, and from n8n, Zapier or plain HTTP.
Many people use both. PDFops ships its own pdf-workflows Agent Skill (served over MCP since 0.7.0) that tells the model which PDFops tool to call in what order, so the two are not exclusive.
Side-by-side
PDFopsAnthropic's PDF skill
What it isA tool server (24 MCP tools) plus REST API; also ships a pdf-workflows skillAn Agent Skill: SKILL.md, FORMS.md and scripts that Claude follows
How a form gets filledpdf_inspect lists fields, then pdf_fill with those names; no generated codeThe agent runs the skill's field-check and field-extraction scripts, then writes code to fill the form
Where it runsHosted: each call sends the PDF to the PDFops API (processed in memory, not stored)Wherever the agent executes code (the host's sandbox or your machine)
Needs a code sandboxNo: any MCP client, REST caller, n8n or ZapierYes: the skill's work is running scripts
PriceFree: 100 calls/IP/month with no key, 250/month with a free key. Indie $16/mo (4,000), Pro $79/mo (25,000)No charge from the skill itself; you pay for the host and tokens
Tokens and varianceOne tool call per operation; fill, merge, page ops and invoices return byte-identical output for identical inputThe agent writes code per job, so cost and output can vary run to run
OCR on scansNone: a scan has no extractable textListed in the skill's description
Flat PDFs (no fields)pdf_detect_fields finds the blanks, pdf_add_fields makes them fillable, then pdf_fillHandled by a separate path in FORMS.md
File sizePDF input up to 4 MB per PDFWhatever your sandbox handles
LicenceMIT for the open-source MCP server (pdfops-mcp); hosted API is a paid serviceApache License 2.0 per the LICENSE.txt header in the skill folder
Where Anthropic's PDF skill is the better choice
Cost and lock-in. It is free, has no quota and no account, and the scripts are plain code you can inspect and fork.
Nothing leaves your environment. The skill itself makes no call to a third-party PDF service; the data stays wherever your agent runs code.
OCR. Scanned PDFs are in scope for the skill. PDFops has no OCR.
Open-ended work. When the job is unusual (redraw a page, parse a strange layout), code written on the spot can do things a fixed tool list cannot.
Where PDFops is the better choice
Fewer moving parts per task. A typed tool call replaces a generate, run, debug loop, which matters when the agent runs unattended or on a schedule.
Works outside a code sandbox. Any MCP client, an n8n workflow, a Zapier step or a curl command can call the same operations.
Exact field contract. pdf_inspect returns names, types and options for each AcroForm field, so a fill cannot quietly miss a field or a checkbox value.
Repeatable output. Fill, merge, split and invoice calls return the same bytes for the same input, so a hash works as a cache key or a CI check.
Frequently asked
Is Anthropic's PDF skill an MCP server?
No. It is an Agent Skill: instructions and scripts the agent follows, executed in whatever code environment the host provides. An MCP server exposes tools the agent calls. PDFops is the second kind, and also ships a skill (pdf-workflows) that points the model at its tools.
Can I use the skill and PDFops together?
Yes. Use the skill for open-ended or OCR work and PDFops for the repeatable operations (fill by field name, merge, split, stamp, invoice). Nothing conflicts, because the skill reads and writes local files and PDFops tools take a file path or URL.
Does PDFops need code execution in the client?
No. The tools run on the PDFops side. The local server (npx pdfops-mcp) reads and writes files inside a folder you allow, and the hosted endpoint takes https URLs or inline PDF data, so no sandbox is needed.
Is PDFops cheaper than the skill?
No, the skill adds no charge of its own. PDFops has a free tier (100 calls per IP per month without a key, 250 per month with a free key). The case for PDFops is fewer tokens spent on generated code and the same result each run, not a lower sticker price.
Move when ready
The free tier is 250 requests a month with an emailed key and no card, at /pricing. Indie ($16/mo, 4,000 requests) and Pro ($79/mo, 25,000) are live when you outgrow it. You can also try a form in the playground or the Form-Field Inspector.
← PDFops home · All comparisons · PDFops MCP server · Why deterministic
---
# PDFops vs Anvil — PDF fill & merge API comparison
Source: https://pdfops.dev/vs/anvil
Comparison
PDFops vs Anvil
An Anvil alternative for deterministic PDF fill + merge
Anvil is the most mature PDF-filling API on the market — a
seven-year-old, venture-backed document-automation suite with AI
field-detection, e-signature, and no-code workflows. PDFops is a
much narrower API: fill AcroForm fields, merge and edit
PDFs, extract text and write e-invoices, deterministically. This page is the honest
split — where Anvil's breadth wins, and where a thin
tool wins on substrate and price.
The honest framing
If you need to detect fields on flat or scanned PDFs, collect signatures, build multi-step webform-to-PDF-to-sign workflows, or lean on official SDKs and a polished dashboard — Anvil is the better product, and it isn't close. It has years of surface area PDFops does not try to match.
If you already have AcroForm templates (or can detect and add fields once), and what you actually need is data-in / filled-PDF-out at low latency and low cost, the calculus flips. Anvil runs every call through its hosted cloud and meters each programmatic fill at $0.10 per document. PDFops fills with no headless browser, deterministically, merges in the same primitive, and costs roughly $0.004 per call ($16/mo for 4,000 on Indie), about 25× less per fill at standard rates.
One structural difference worth naming. Anvil is, by design, a cloud middleman: every fill is a round-trip to app.useanvil.com, with no self-host option. PDFops runs on Vercel's Node runtime in one region (iad1, US East), and an embeddable, in-function library — the version where the fill runs inside your own Worker with no third-party round-trip — is the next step on the roadmap.
Side-by-side
PDFopsAnvil
PrimitiveAcroForm fill, merge, page and stamp operations, text extraction, HTML, text and image to PDF, e-invoices (fill and merge are deterministic)Full document-automation suite (fill, generate, e-sign, workflows)
Per-fill price~$0.004/call (Indie, $16/mo for 4,000)$0.10/PDF (bulk discounts at high volume)
Paid plansIndie $16/mo (4,000 calls), Pro $79/mo (25,000) — liveAI Pack $99/mo, Product Pack $425/mo
Hosting substrateVercel Node runtime, one region (iad1, US East); fills need no headless browserAnvil cloud only (no self-host)
DeterminismDeterministic, audit-safe by constructionDeterministic fill + optional AI detection
PDF mergeYes (core endpoint)Yes
Flat / scanned field detectionPartly — flat PDFs with drawn blanks (lines, boxes, underscores, checkboxes), by geometry rules; not scans or undrawn blanksYes — Document AI (computer vision)
E-signatureNoYes (Etch)
No-code workflows / webformsNoYes
Official SDKsHTTP API, plus a TypeScript SDK, a Python client, an MCP server and an n8n node; no .NETNode, Python, .NET + React UI
Free tier250/mo with a free key (no card); 100 req/IP/month keylessDashboard only — metered API needs a card
MaturityEarly-stage (launched 2026)7 years, ~$15M raised, established
Best forTemplate fill + merge at scale, cost- and latency-sensitiveTeams needing detection, e-sign, workflows, or a full platform
Anvil pricing verified at useanvil.com/pricing as of 2026-11-09 ($0.10 per API fill; bulk discounts start at 25,000+ fills, rate not published). PDFops pricing is live at /pricing.
If the narrow tool fits, try it in 30 seconds
Drop a form PDF into the Form-Field Inspector to see its AcroForm fields and the exact call. The fill shape is one HTTP request:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
No API key or signup needed for the first 100 calls per IP each month — or skip the terminal and run the same call in the playground. The endpoint reference is in the fill-form docs (full API surface at /docs), and the deterministic-vs-AI argument is in this essay.
Frequently asked
Is PDFops a drop-in replacement for Anvil?
No — Anvil is a broad platform; PDFops is a much narrower PDF API. Anvil does flat-PDF field detection, e-sign, and workflows; PDFops fills AcroForm fields, merges, edits and extracts, with fills deterministic. If you need the platform features, Anvil. If you have templates and want determinism, and ~25× lower per-call cost, PDFops.
How much cheaper is PDFops per call?
Anvil meters fills at $0.10/PDF on its paid plans ($99–$425/mo), with high-volume bulk discounts. PDFops Indie is $16/mo for 4,000 calls, ~$0.004/call, roughly 25× cheaper at standard rates, because filling with no headless browser is dramatically cheaper to run. Read at useanvil.com/pricing on 2026-11-09 (bulk discounts start at 25,000+ fills, rate not published).
Does PDFops detect fields on flat or scanned PDFs?
Partly. For a flat PDF whose blanks are drawn as lines, boxes, underscores or checkboxes, yes: POST /api/detect-fields finds them with fixed geometry rules (no vision model), names them from nearby labels, and with format=pdf returns the fillable PDF in one request. It does not find a blank that is only empty space, and PDFops has no OCR or vision model, so a scanned page has nothing to detect. Review the result, and add what it missed with the free make-fillable tool. Anvil's Document AI tags fields on flat PDFs and scans via computer vision; Anvil wins for arbitrary un-tagged PDFs at scale.
Does PDFops do e-signature or workflows?
No. Anvil has Etch e-sign, Webforms, and no-code Workflows; PDFops deliberately doesn't. PDFops is a PDF API, not a platform. If e-sign or workflows are core, Anvil (or a dedicated e-sign API) is the right pick.
Where does the PDFops call run in production?
Anywhere — it's an HTTP API. Your calling code runs on Cloudflare Workers, Vercel Edge, Deno Deploy, Bun, Lambda, or a Node backend; PDFops itself runs on Vercel's Node runtime in one region (iad1, US East). Per-language migration guides: Python, Node.js, JavaScript. The in-function embeddable library (fill runs inside your own Worker, no round-trip) is on the roadmap.
Move when ready
If the deterministic fill + merge primitive matches your usage, grab a free API key (250 req/mo) at /pricing — email in, key out, no card. Indie ($16/mo, 4,000 calls) and Pro ($79/mo, 25,000) are live when you outgrow it.
← PDFops home · All comparisons · Why deterministic
---
# anymd alternative: PDF MCP for filling and merging | PDFops
Source: https://pdfops.dev/vs/anymd
Comparison
An anymd alternative for filling, merging and creating PDFs
PDFops vs anymd (SylphxAI, formerly pdf-reader-mcp), checked 2026-11-29: a reader and a writer
anymd (SylphxAI, formerly pdf-reader-mcp) is a local Rust MCP server that converts PDFs, Office files, images and more into Markdown so an agent can read them. PDFops does the other half: it fills forms, merges, splits, stamps and creates PDFs. They are different jobs, and many agents want both.
Try PDFops in one line, no key or signup: claude mcp add pdfops -- npx -y pdfops-mcp, or point any MCP client at the hosted endpoint https://pdfops.dev/api/mcp. The first 100 calls per IP per month need no key; a free key (250 requests a month, no card) comes after that.
Quick verdict
Choose anymd to read, search and outline documents: PDF with OCR for scanned pages, Word, PowerPoint, Excel, EPUB, images, audio and video, all converted to Markdown on your own machine. PDFops has no OCR and no document-to-Markdown conversion.
Choose PDFops when the agent must produce or change a PDF: fill an AcroForm by exact field name, merge, split, rotate, watermark, number pages, stamp, or build an invoice. anymd does not list any of those.
Use both for read-then-write jobs: anymd reads the source document, PDFops fills the form or assembles the output. They do not conflict.
Side by side
PDFopsanymd
Core jobEdit and create PDFsConvert documents to Markdown for reading
Tools24 tools: inspect and fill AcroForms, detect and add fields, merge, split, extract and delete pages, rotate, watermark, page numbers, stamps and barcodes, text and table extraction, HTML, image and text to PDF, Factur-X invoices, protect and unlockFour tools: outline, read, search, inspect. The cite_check, video_timeline and render_frame operations of inspect are Pro-only
Installclaude mcp add pdfops -- npx -y pdfops-mcp or hosted https://pdfops.dev/api/mcpclaude mcp add anymd -- npx -y @sylphx/anymd, or npx -y @sylphx/anymd setup to wire up every MCP client on the machine
Auth for first callNone for the first 100 calls per IP per monthNone for document processing; sign-in is only for buying Pro
Where it runsHosted API; files are sent to PDFopsOn your machine; the README says nothing is uploaded (URLs you pass are fetched)
OCR and Office inputNo OCR, no Office conversionOCR for image-only PDF pages and images; Word, PowerPoint, Excel, EPUB, HTML
Fill, merge, split, createYesNot listed
PriceFree: 100 keyless requests per IP per month, then 250 a month with a free key. Indie $16 a month for 4,000, Pro $79 for 25,000. Hard stop (HTTP 429) at quota, no overageCore free and MIT licensed; Pro is a one-time US$29 purchase
Facts checked 2026-11-29. anymd facts from its GitHub README. PDFops facts from /mcp and /pricing. Vendor claims are the vendor's own words; we have not tested their products.
Where anymd is the better choice
You need to read PDFs, especially scanned ones: it offers OCR after an opt-in local setup, and PDFops has none.
The files must not leave your machine. anymd runs locally; PDFops is a hosted API.
Your inputs are not only PDFs: Word, PowerPoint, Excel, EPUB, images, audio and video all go to Markdown.
You want no quota at all. anymd's core has no request cap and a one-time Pro price instead of a subscription.
Running both in one agent
Add each server once; the client lists both toolsets. A typical job: ask anymd to read an application or contract, then ask PDFops to inspect the blank form for its field names and fill it with the values the agent extracted. See the PDFops MCP page for the client configs.
Frequently asked
What is the best anymd alternative?
It depends on the job. anymd reads documents into Markdown; if you need the agent to fill, merge, split or create PDFs, PDFops does that and anymd does not list it. If you need a different reader, jztan/pdf-mcp is another local one, with OCR through Tesseract.
Is PDFops a replacement for anymd?
No. PDFops cannot read scanned documents (no OCR) or convert Word, Excel or EPUB files. It writes and edits PDFs. Most agents that handle documents benefit from one reader and one writer.
Is anymd the same as pdf-reader-mcp?
anymd is the new name of SylphxAI's pdf-reader-mcp, according to its README. The npm package to install is @sylphx/anymd.
Does anymd upload my files?
Its README says it runs on your machine and nothing is uploaded, apart from URLs you ask it to fetch and opt-in OCR or model downloads. PDFops is a hosted API, so each call sends the PDF to PDFops, which returns the result in the response.
← PDFops home · All comparisons · PDFops MCP server · Pricing
---
# PDFops vs DocRaptor — hosted PDF API comparison
Source: https://pdfops.dev/vs/docraptor
Comparison
PDFops vs DocRaptor
A DocRaptor alternative for template-based PDF form-fill and merge
DocRaptor is a hosted HTML-to-PDF API built on PrinceXML,
priced from $15/mo (125 docs, 12¢/doc effective) up to
$1,000/mo (40,000 docs, 2.5¢/doc). It's a fundamentally
different verb than PDFops: DocRaptor has no
fill-form endpoint and no merge endpoint — its API
only accepts document_content (HTML/XML) or
document_url and always emits a new PDF. This
page is for developers who picked DocRaptor for
template-driven invoice / receipt / contract / form
generation and are asking whether the form-fill primitive
fits better.
The honest framing
If you need to render arbitrary HTML to PDF — with CSS, web fonts, multi-page layout, headers/footers driven by content — DocRaptor still fits better. PDFops does render an HTML string to PDF (/api/html-to-pdf, in a headless browser on our side, with no URL input and no JavaScript, 5 requests per call, output not byte-identical between runs), but it is not a Prince-based typesetter, and a document you already have as HTML is the one case where that endpoint competes with DocRaptor.
If your usage is template-driven (you author a PDF template once, then fill it with per-customer data on each request — invoices, receipts, contracts, government forms, statements), the wedge flips. AcroForm templates + an HTTP API call is a cleaner abstraction than rendering HTML for every document, and the substrate cost is dramatically lower.
One stagnation signal worth knowing. DocRaptor's last public changelog entry is dated September 5, 2023 — over two and a half years ago. They're still shipping Prince 15.1; Prince 16 has been generally available since October 2024. No edge runtime, no form-fill endpoint, no merge endpoint has been announced in that window. [source: docraptor.com/documentation/changelog]
Side-by-side
PDFopsDocRaptor
PrimitiveAcroForm fill-form, merge and other operations on existing PDFs, plus HTML, text and image to PDFHTML → PDF only (always emits a new PDF)
AcroForm fill-formYes (core endpoint)No — API only accepts document_content or document_url
PDF mergeYes (core endpoint)No — compose merged HTML, then render
Per-document price~$0.004 (Indie, $16/mo, 4,000 req) → ~$0.003 (Pro, $79/mo, 25,000 req)12¢ (Basic, $15/mo, 125 docs) → 2.5¢ (Silver, $1,000/mo, 40k docs)
Free tier250/mo with a free key (no card); 100 req/month/IP keyless5 test docs/mo, watermarked, no overage allowed
Auth modelX-API-Key (free key, emailed); keyless anonymous calls allowed for trialAPI key required
Hosting substrateVercel Node runtime (one region, iad1)AWS-hosted (no region selection published)
Rendering enginepdf-lib (V8-isolate-compatible); HTML to PDF uses a headless browser in a separate servicePrinceXML 15.1 (Prince 16 released Oct 2024 — unupgraded)
Last public changelogContinuous — see /blogSep 2023 — no entries since
SLANone yet; enterprise via hello@pdfops.devTier-dependent
Best forTemplate-fill + merge at scaleHTML rendering with rich CSS / typography
Pricing verified at docraptor.com/plans as of 2026-11-09. Heroku addon pricing is ~25–30% higher and is not quoted here.
Try the migration in 30 seconds
If you've got a PDF template with AcroForm fields (or want one — grab a sample invoice-template.pdf with customer_name + total fields), the call shape is:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
You get a filled PDF back. No API key or signup needed for the first 100 calls per IP each month — or run the same call in the browser via the playground. The full reference for the endpoint is in the fill-form docs.
Frequently asked
Is PDFops a drop-in replacement for DocRaptor?
No — different primitives. DocRaptor renders HTML to PDF; PDFops fills AcroForm fields in PDF templates you author. If your DocRaptor usage is template-driven and you can move to AcroForm templates, PDFops fits. If you need arbitrary HTML rendering with Prince, DocRaptor is still the answer; PDFops renders HTML strings only, with a headless browser.
How much cheaper is PDFops per document?
DocRaptor's Max plan is $149/mo for 5,000 documents, about $0.037 per document at 4,000 documents a month (prices read 2026-11-09). PDFops: Indie is $16/mo for 4,000 requests (~$0.004/doc), Pro is $79/mo for 25,000 (~$0.003/doc), so roughly 9× cheaper per document at 4,000 documents a month. Possible because PDFops fills run with no rendering pass, and that lower cost passes through to the per-document price.
What's the migration story?
For invoice / receipt / contract / form generation from a fixed template: (1) Author an AcroForm version of your template in Acrobat, Mac Preview, LibreOffice Draw, or pdftk — the free form-field inspector confirms the field names came out as intended. (2) Replace your DocRaptor SDK call with a multipart POST to /api/fill-form sending the template + a JSON object of field-name → value. (3) The response is the filled PDF. The Stripe-webhook-to-invoice walkthrough is in the blog.
Does PDFops offer an SLA?
Not yet. For enterprise volume with SLA, email hello@pdfops.dev. Production usage should design for the API as best-effort and treat 5xx as retryable.
Where does the curl go in production?
Anywhere. PDFops is an HTTP API — your calling code can run on Cloudflare Workers, Vercel Edge, Deno Deploy, Bun, AWS Lambda, your own Node backend, or a desktop curl. Per-language walkthroughs: Python, Node.js, JavaScript. You can call it from an edge-deployed function or any other backend.
Move when ready
If the template-fill primitive matches your usage, grab a free API key (250 req/mo) at /pricing — email in, key out, no card. Indie ($16/mo, 4,000 req) and Pro ($79/mo, 25,000 req) are live when you outgrow it.
← PDFops home · Blog · Docs
---
# PDFops vs Foxit PDF MCP: a first fill with no developer-portal signup
Source: https://pdfops.dev/vs/foxit
Comparison
PDFops vs Foxit PDF MCP
Foxit PDF API alternative for MCP clients: credentials and credit plans, against a keyless first call
Foxit publishes an MCP server that wraps its hosted PDF Services API: more than 35 operations covering Office and HTML conversion, OCR, compression, comparison and form data import and export. It needs a Client ID and Client Secret from the Foxit Developer Portal before the first call. PDFops covers a narrower set (form fill, merge, split, stamps, text and table extraction, invoices) and lets you make the first 100 calls each month without any key. If you are looking for a Foxit PDF API alternative for an agent, this page says which job each one suits.
Try PDFops in one line
claude mcp add pdfops -- npx -y pdfops-mcp
Or point any MCP client that takes a remote URL at https://pdfops.dev/api/mcp. The first 100 calls per IP each month need no key; a free key (250 per month, no card) comes by email after that. Setup for other clients.
Facts checked 2026-11-29. Sources: foxitsoftware/foxit-pdf-api-mcp-server, Foxit PDF API pricing, PDFops MCP page, PDFops pricing. Vendor claims are the vendor's own words; we have not tested them.
Quick verdict
Choose Foxit if you need conversion between PDF and Word, Excel or PowerPoint, OCR, compression or document comparison, or you want a large PDF vendor behind the API.
Choose PDFops if the job is filling AcroForms by field name, merging and splitting, stamping, generating invoices or extracting tables, and you want to start without creating an account.
Both are hosted: the MCP process may run on your machine, but documents go to the vendor's cloud for processing. Neither is a local-only tool.
Side-by-side
PDFopsFoxit PDF MCP
What it isMCP server (npx -y pdfops-mcp) plus a hosted endpoint at pdfops.dev/api/mcp, backed by the PDFops APILocal MCP server (stdio, optional HTTP stream) wrapping the hosted Foxit PDF Services API
Credentials for a first callNone for the first 100 calls per IP per month; a free key (250/month) is emailed, no cardClient ID and Client Secret from the Foxit Developer Portal
Operations24 tools: inspect, fill, merge, split, extract and delete pages, rotate, watermark, page numbers, stamps (text, image, barcode, QR), text and table extraction, find text, HTML, text and image to PDF, invoices, protect, unlock, metadata35+ per its README: create from Word, Excel, PowerPoint, HTML, URL, text, images; convert PDF to Word, Excel, PPT, HTML, text, images; split, merge, compress, flatten, watermark; passwords; compare; OCR; redact
Form fillingpdf_inspect lists field names, types and options; pdf_fill fills by name; flat PDFs via pdf_detect_fields and pdf_add_fieldsExport and import form data as JSON
Office conversionNoYes, both directions
OCRNoYes (pdf_ocr in the TypeScript server)
PricingFree: 250 requests/month. Indie $16/mo (4,000), Pro $79/mo (25,000). One request per call whatever the page count; hard stop at quota, no overageDeveloper plan: 500 credits a year per its pricing page. Startup $1,750/yr for 5,000 credits; Business $4,500/yr for 15,000. Most operations cost 1 credit; credits do not carry over
Where files goSent to the PDFops API, processed in memory, not storedUploaded to Foxit's cloud for processing
DeterminismFill, merge, page operations and invoices return byte-identical output for identical inputNo claim found
Other surfacesREST API, n8n node, Zapier app, Python and TypeScript SDKsPython and TypeScript MCP servers
Where Foxit PDF MCP is the better choice
Conversion. PDF to and from Word, Excel, PowerPoint, HTML and images is a Foxit strength. PDFops has no Office conversion.
OCR and comparison. Foxit's TypeScript server exposes pdf_ocr and pdf_compare; PDFops has neither.
Vendor depth. Foxit is an established PDF company with a larger operation list behind one API.
Redaction. A redact tool is in Foxit's server; PDFops does not redact.
Where PDFops is the better choice
No signup for the first call. claude mcp add pdfops -- npx -y pdfops-mcp works immediately, which matters when an agent is evaluating tools unattended.
Form fill by exact field name. Inspect first, then fill with the names it returned, including checkboxes, radios and dropdowns.
Flat pricing. A 20-page merge is one request, whatever the page count (HTML to PDF costs five), and a failed fill is not counted.
Repeatable output for fill, merge and page operations, useful for caching and CI checks.
Frequently asked
Does the Foxit PDF MCP server need an API key?
Yes. Its README says to sign up at the Foxit Developer Portal for a Client ID and Client Secret and set them as environment variables. PDFops needs no key for the first 100 calls per IP each month.
Is Foxit's MCP server local?
The server process runs on your machine, but it calls the hosted Foxit PDF Services API and uploads documents there. PDFops is hosted in the same sense: the PDF goes to the PDFops API for each call.
Which one fills PDF forms?
Both can. Foxit's tools export and import form data as JSON. PDFops adds a field inspector that returns names, types and options and a fill tool that takes those names, plus detection for flat PDFs with no fields.
Which should I pick for Word or Excel conversion?
Foxit. PDFops does not convert Office documents.
Move when ready
The free tier is 250 requests a month with an emailed key and no card, at /pricing. Indie ($16/mo, 4,000 requests) and Pro ($79/mo, 25,000) are live when you outgrow it. You can also try a form in the playground or the Form-Field Inspector.
← PDFops home · All comparisons · PDFops MCP server · PDFops vs PDF.co
---
# PDFops vs iLovePDF MCP: fill forms and stamp pages, not just compress and merge
Source: https://pdfops.dev/vs/ilovepdf
Comparison
PDFops vs iLovePDF MCP
iLovePDF MCP alternative: a consumer PDF brand's tools in an agent, against a form-fill and page-operation server
iLovePDF announced an official MCP server on 2026-11-06. It exposes the consumer toolset an agent can use on your files: compress, merge, split, OCR, PDF to JPG, image to PDF, Office to PDF, watermark, page numbers and (on the hosted connector) PDF to Markdown. Form filling is not on its tool list. PDFops is the reverse in emphasis: it fills AcroForms by field name, edits and stamps pages and generates invoices, but has no OCR or Office conversion. This page is for anyone searching for an iLovePDF MCP alternative for form-heavy work.
Try PDFops in one line
claude mcp add pdfops -- npx -y pdfops-mcp
Or point any MCP client that takes a remote URL at https://pdfops.dev/api/mcp. The first 100 calls per IP each month need no key; a free key (250 per month, no card) comes by email after that. Setup for other clients.
Facts checked 2026-11-29. Sources: iLovePDF announcement (2026-11-06), ilovepdf/ilovepdf-mcp, PDFops MCP page, PDFops pricing. Vendor claims are the vendor's own words; we have not tested them.
Quick verdict
Choose iLovePDF if you need OCR, compression, Office to PDF or PDF to image from an agent, or you already have an iLovePDF account and want the hosted connector.
Choose PDFops if you need to inspect and fill forms, stamp text, images, barcodes or QR codes, extract tables, build invoices or detect fields on flat PDFs, and want to start with no account.
The overlap is small (merge, split, watermark, page numbers), so for a mixed workflow the honest answer is that some people would connect both.
Side-by-side
PDFopsiLovePDF MCP
What it isMCP server via npx, hosted Streamable-HTTP endpoint at pdfops.dev/api/mcp, REST APIOfficial hosted connector (https://mcp.ilovepdf.com/mcp) and a local @ilovepdf/mcp package
Account for a first callNone for the first 100 calls per IP per month; free key by email, no cardHosted connector: sign in with an iLovePDF account. Local package: a public key from iloveapi.com
Tools24: inspect, fill, merge, split, page extract and delete, rotate, watermark, page numbers, stamps, text and table extraction, find text, HTML, text and image to PDF, invoices, protect, unlock, metadata, field detection10 on the hosted connector (9 locally): compress, merge, split, PDF to JPG, image to PDF, Office to PDF, watermark, page numbers, OCR, PDF to Markdown
Form fillingpdf_inspect then pdf_fill by field name, plus flat-PDF field detectionNot in either tool list
OCRNoYes
Office to PDFNoYes (Word, Excel, PowerPoint)
CompressionNoYes
Where files goSent to the PDFops API, processed in memory, not storedSent to iLovePDF for processing; the vendor says the hosted connector keeps short-lived session and task details, not file content, and download links expire after 2 hours
PriceFree: 250 requests/month. Indie $16/mo (4,000), Pro $79/mo (25,000). Hard stop at quotaFree accounts get a daily number of free tasks (the number is not stated); Premium is unlimited
Protect and unlockpdf_protect and pdf_unlockNot in the tool lists
Where iLovePDF MCP is the better choice
OCR and compression. Two of the most requested PDF jobs, both missing from PDFops.
Office to PDF and PDF to JPG. Conversion is the iLovePDF brand's core, and the MCP tools reflect it.
Brand and account reach. Many people already have an iLovePDF account, and the hosted connector uses it.
Daily free tasks on a consumer account, which can be enough for light personal use.
Where PDFops is the better choice
Forms. Inspect, fill by exact name, and create fields on a flat PDF. This is the main gap in the iLovePDF toolset.
No account to try it. The first 100 calls per IP each month need no key, which suits an agent trying tools unattended.
Stamps and extraction. Text, image, barcode and QR stamps, plus text and table extraction to CSV or xlsx.
Automation surfaces. The same operations are available in n8n, Zapier and over REST.
Frequently asked
Does the iLovePDF MCP server fill PDF forms?
Not according to its announcement and repository: the tool lists cover compress, merge, split, PDF to JPG, image to PDF, Office to PDF, watermark, page numbers, OCR and (hosted only) PDF to Markdown. PDFops fills AcroForms by field name.
Does iLovePDF MCP need an account?
The hosted connector asks you to sign in with an iLovePDF account. The local npm package needs a public key from iloveapi.com. PDFops needs neither for the first 100 calls per IP per month.
Does PDFops do OCR or Office conversion?
No. Scanned PDFs have no extractable text in PDFops, and it does not convert Word, Excel or PowerPoint. Use iLovePDF or another tool for those jobs.
Can I connect both?
Yes. They are separate MCP servers with little overlap, so an agent can use iLovePDF for OCR and conversion and PDFops for forms, stamps and invoices.
Move when ready
The free tier is 250 requests a month with an emailed key and no card, at /pricing. Indie ($16/mo, 4,000 requests) and Pro ($79/mo, 25,000) are live when you outgrow it. You can also try a form in the playground or the Form-Field Inspector.
← PDFops home · All comparisons · PDFops MCP server · PDFops vs Foxit PDF MCP
---
# Compare PDFops to incumbents — PDFops
Source: https://pdfops.dev/vs
Compare
PDFops vs the incumbents
The incumbents render HTML in headless Chrome and bill by
document size or compute time. PDFops fills, merges and edits real PDFs
with no browser for those operations and no per-MB render
tax, and renders HTML strings too, in a separate headless-browser
service (no URL input, no JavaScript). Side-by-side
against the three hosted PDF APIs most often considered for
template-driven document generation — DocRaptor, PDFShift,
PDFMonkey. Every pricing number, substrate claim, and feature-gap
is cited to the vendor's own pricing page or docs as of
2026-05-19 (prices re-read 2026-11-09).
The shared wedge
All three incumbents render HTML to PDF.
DocRaptor uses PrinceXML; PDFShift uses headless Chromium;
PDFMonkey uses HTML + Liquid templating piped through
Chromium. None of them accepts an existing PDF + a JSON of
field values and returns the filled PDF.
PDFops does the opposite operation. It
takes a PDF you authored (in Acrobat, Mac Preview,
LibreOffice Draw, or pdftk) with AcroForm
fields baked in, plus a JSON map of field-name → value,
and returns the filled PDF. Plus /api/merge
for combining N PDFs into one. Neither of those two is a primitive
in any incumbent. PDFops also splits, stamps, extracts and finds text,
adds form fields and attachments, makes PDFs from images, Markdown and CSV,
writes Factur-X e-invoices, and renders HTML strings to PDF.
The price gap (about 9× against DocRaptor at 4,000
documents a month, about 2× against PDFShift, small against
PDFMonkey) isn't "we render HTML cheaper
than they do" — it's "we don't need to render HTML at all
for the template-fill case, so the per-document cost falls
to the cost of filling a PDF with no browser."
At a glance
PDFops
DocRaptor
PDFShift
PDFMonkey
Primitive
AcroForm fill + merge, other PDF operations, HTML string to PDF
HTML → PDF (Prince 15.1)
HTML → PDF (Chromium)
HTML + Liquid → PDF (Chromium)
Fill an existing PDF
Yes
No
No
No (emits empty forms only)
Merge PDFs
Yes
No
No
No
Free tier
250/mo keyed (no card); 100 req/IP/month keyless
5 test docs/mo, watermarked
50 credits/mo, 2 MB cap
20 docs/mo, 1-day retention
Lowest paid tier
$16/mo Indie (4,000 req, ~$0.004/doc)
$15/mo (125 docs, 12¢/doc)
$9/mo Startup
€5/mo (300 docs, ~€0.017/doc)
Best per-doc rate
~$0.003 at $79/mo Pro (25,000 req)
2.5¢ at $1,000/mo Silver
$0.0040 at $99/mo Business
€0.005 at €300/mo Premium
Hosting
Vercel Node runtime (one region, iad1)
AWS (no region selection)
Chromium containers (single region)
Chromium pipeline + S3
Last public update
Continuously
Sep 2023
SDKs archived Dec 2020
May 2025 (Engine v5)
Which comparison should you read?
If you're paying for DocRaptor or shopping for an HTML-to-PDF alternative: read PDFops vs DocRaptor. The killer specific is their dead changelog — no entry since September 2023, still on Prince 15.1 while Prince 16 has been out for 7+ months.
If you're using PDFShift or evaluating Chromium-based PDF APIs: read PDFops vs PDFShift. Credit-system pricing breakdown ($0.0040–$0.0096/credit, $0.03 overage); 50-doc free tier; the archived-SDK signal (their PHP/Node/Python repos haven't been touched since December 2020).
If you're on PDFMonkey or evaluating dashboard-led template editors: read PDFops vs PDFMonkey. Important correction inside: their "PDF Forms" feature emits empty fillable AcroForms; it doesn't fill them. The migration story is "rebuild your HTML+Liquid templates as AcroForm PDFs," not "rename your fields."
Deep-dives
2026-07-30
PDFops vs pdf-lib
pdf-lib: ~10.25M downloads/week, effectively unmaintained since 2021, ~279 open issues. Honest split: maintained forks (@cantoo/pdf-lib, @pdfme/pdf-lib, LibPDF) if you need in-process, or PDFops's hosted deterministic API if your job is narrower.
2026-06-09
PDFops vs Anvil
The closest direct competitor: a mature PDF-filling platform with AI field-detection, e-sign, and workflows — cloud-only, metered at $0.10/PDF. PDFops is the deterministic fill + merge primitive at ~25× lower per-call cost. Honest about where Anvil's breadth still wins.
2026-05-19
PDFops vs DocRaptor
HTML→PDF on PrinceXML 15.1. Generation-only API — no fill-form, no merge. $15/mo (125 docs, 12¢/doc) → $1,000/mo (40k docs, 2.5¢/doc). Dead public changelog since Sep 2023.
2026-05-19
PDFops vs PDFShift
HTML→PDF on Chromium. Credit-based pricing ($0.0040–$0.0096) with $0.03/credit overage. 50-doc/mo free tier. ~1.5s avg render. SDK repos archived since Dec 2020.
2026-05-19
PDFops vs PDFMonkey
HTML + Liquid templating with a dashboard editor. €5/mo (300 docs) → €300/mo (60k docs); overage only above €60/mo. Their "PDF Forms" feature emits empty AcroForms — different operation from PDFops's fill.
2026-11-12
PDFops vs PDF.co
The incumbent charges credits per page (21 to fill a form, 2 to merge). PDFops charges one request per fill or merge call (an HTML render counts 5), so a 2-page fill is 42 credits on PDF.co against 1 request here: about 6x cheaper, with the arithmetic.
2026-11-29
PDFops vs Anthropic's PDF skill
Free, local and in Claude already, with OCR, against a typed tool server that fills by field name without generated code. PDFops ships its own skill too.
2026-11-29
PDFops vs Foxit PDF MCP
Foxit's 35+ operation server covers Office conversion, OCR and comparison and needs portal credentials. PDFops fills, merges and stamps with 100 keyless calls a month.
2026-11-29
PDFops vs PDF Tools MCP
The closest local rival on form fill: runs on your machine for Claude Desktop, with signing and a viewer. PDFops is the hosted option for agents and automation.
2026-11-29
PDFops vs PaperPilot
A local Rust toolkit with about 100 tools, batch fill, OCR and redaction against a smaller hosted server with a fixed per-request price.
2026-11-29
PDFops vs iLovePDF MCP
iLovePDF's official MCP server (2026-11-06) does compress, OCR and Office to PDF, not forms. PDFops fills AcroForms with no account.
2026-11-29
PDFops vs anymd
anymd (SylphxAI): reads PDFs, Office files and images into Markdown locally. PDFops fills, merges and creates PDFs; they are complementary, and many agents want both.
2026-11-29
PDFops vs jztan/pdf-mcp
jztan/pdf-mcp: local PDF reader and search server with OCR. PDFops edits and creates PDFs instead; install both for read-then-write jobs.
2026-11-29
PDFops vs Nutrient
Nutrient hosted MCP signs in with an account and adds signing, redaction, OCR and Office conversion; its local server is archived. PDFops needs no key for the first 100 calls and covers form filling.
2026-11-29
PDFops vs KDAN PDF MCP
KDAN's free hosted connector compresses, redacts and compares PDFs. PDFops fills, merges, splits and creates them.
Choosing a PDF MCP server
Not every PDF MCP server does the same job. Best PDF MCP servers in 2026 sorts them into readers, form fillers, hosted APIs and skills, with one table that includes the rows where PDFops loses.
How each comparison is structured
Each /vs/ page leads with an honest framing block — when the incumbent still fits better (HTML rendering, rich CSS, templated layouts), then when PDFops fits (fixed-layout AcroForm templates, merge-heavy flows, edge-deployed callers). The side-by-side table covers primitive, pricing, hosting substrate, free tier, SLA, and best-for. A migration-shaped curl example shows what the move actually looks like. The FAQ closes with 5 entries each: pricing math, primitive-fit, migration story, SLA posture, and one vendor-specific question.
Want the API contract before deciding? See the docs section — full reference for /api/fill-form (5 supported field types, 14-row error code table), /api/merge (multipart ordering semantics, page-level page-copy behavior), /api/signup (self-serve key), and /api/usage (quota check). Or skip the reading: the playground runs fill and merge in the browser, and the live tier numbers are at /pricing.
← PDFops home · Docs · Use Cases · Blog
---
# jztan/pdf-mcp alternative: PDF MCP that fills and merges | PDFops
Source: https://pdfops.dev/vs/jztan-pdf-mcp
Comparison
A jztan/pdf-mcp alternative for filling, merging and creating PDFs
PDFops vs jztan/pdf-mcp, checked 2026-11-29: a local reader and a hosted writer
jztan/pdf-mcp is a local Python MCP server that reads, searches and renders PDFs for an agent, with OCR for scanned pages. PDFops is a hosted PDF API and MCP server that changes and creates PDFs: forms, merges, splits, stamps, invoices. The two overlap very little, and the honest answer for many agents is to install both.
Try PDFops in one line, no key or signup: claude mcp add pdfops -- npx -y pdfops-mcp, or point any MCP client at the hosted endpoint https://pdfops.dev/api/mcp. The first 100 calls per IP per month need no key; a free key (250 requests a month, no card) comes after that.
Quick verdict
Choose jztan/pdf-mcp to read PDFs into an agent's context: page reads, hybrid keyword and semantic search, table of contents, tables, images, chart extraction, folder-wide search and OCR on scanned pages. It runs locally, so files stay on your machine. PDFops has no OCR or semantic search.
Choose PDFops when the agent must fill an AcroForm, merge or split files, rotate or delete pages, watermark, number pages or generate an invoice. jztan/pdf-mcp does not list form filling or merging.
Use both when the job is read then write: search and read the source with pdf-mcp, then fill or assemble the output with PDFops.
Side by side
PDFopsjztan/pdf-mcp
Core jobEdit and create PDFsRead, search and render PDFs for an agent
Tools24 tools: inspect and fill AcroForms, detect and add fields, merge, split, extract and delete pages, rotate, watermark, page numbers, stamps and barcodes, text and table extraction, HTML, image and text to PDF, Factur-X invoices, protect and unlock13 tools: pdf_info, pdf_search, pdf_read_pages, pdf_read_all, pdf_get_toc, pdf_render_pages, pdf_extract_chart, three corpus tools, two cache tools, server_info
Installclaude mcp add pdfops -- npx -y pdfops-mcp or hosted https://pdfops.dev/api/mcpuv tool install pdf-mcp then claude mcp add pdf-mcp -- pdf-mcp; Python 3.11 to 3.14; a Claude Desktop .mcpb bundle also exists
Auth for first callNone for the first 100 calls per IP per monthNone documented; it is a local program
Where it runsHosted API; files are sent to PDFopsLocal; you give it file paths and nothing is uploaded
OCRNoYes, through Tesseract, downloaded on the first scanned page (English only by default)
Fill, merge, split, createYesNot listed
PriceFree: 100 keyless requests per IP per month, then 250 a month with a free key. Indie $16 a month for 4,000, Pro $79 for 25,000. Hard stop (HTTP 429) at quota, no overageFree, MIT licensed
Facts checked 2026-11-29. jztan/pdf-mcp facts from its GitHub README. PDFops facts from /mcp and /pricing. Vendor claims are the vendor's own words; we have not tested their products.
Where jztan/pdf-mcp is the better choice
You need OCR, search or page rendering over PDFs you already hold. PDFops cannot read scanned files.
The files are sensitive and must stay on your machine. pdf-mcp is local; PDFops uploads each file for the call.
You want no quota, and offline use once its first-run downloads (about 250 MB) are done.
You work across a folder of documents: it has folder-wide warm, overview and search tools, with caching.
Running both in one agent
Both servers register side by side in one client. Ask pdf-mcp to find and read the relevant pages, then ask PDFops to fill a form or merge the result. Client configs for PDFops are on the MCP page.
Frequently asked
What is the best jztan/pdf-mcp alternative?
For reading and searching PDFs locally, other readers such as anymd are the closest swaps. For filling forms, merging, splitting or creating PDFs, which pdf-mcp does not list, PDFops is the alternative.
Can jztan/pdf-mcp fill PDF forms?
Its README lists reading, searching, rendering and caching tools and does not mention form filling or merging. PDFops fills AcroForms by exact field name and can list a form's fields first.
Does PDFops do OCR like pdf-mcp?
No. PDFops has no OCR; scanned PDFs have no extractable text there. pdf-mcp uses Tesseract for scanned pages.
Which one keeps my files private?
pdf-mcp runs locally and does not upload files. PDFops is a hosted API and receives each file you send; it returns the result in the response.
← PDFops home · All comparisons · PDFops MCP server · Pricing
---
# KDAN PDF MCP alternative: fill and merge PDFs from an agent | PDFops
Source: https://pdfops.dev/vs/kdan
Comparison
A KDAN PDF MCP alternative for filling, merging and creating PDFs
PDFops vs KDAN PDF MCP, checked 2026-11-29
KDAN PDF MCP is a hosted connector from KDAN that you add to Claude or ChatGPT by pasting a URL. Its README describes compressing, removing pages, password protection, true redaction and comparing two versions, and says it is free and unlimited. PDFops overlaps on page removal and password protection, and adds form filling, merging, splitting, stamping and invoices, with a keyless first call.
Try PDFops in one line, no key or signup: claude mcp add pdfops -- npx -y pdfops-mcp, or point any MCP client at the hosted endpoint https://pdfops.dev/api/mcp. The first 100 calls per IP per month need no key; a free key (250 requests a month, no card) comes after that.
Quick verdict
Choose KDAN for redaction where the content is permanently removed, comparing two versions of a PDF, and compression, at no cost: its README says no usage caps and no credit card. PDFops has no redaction, compare or compress.
Choose PDFops to fill AcroForms by exact field name, merge, split, extract or rotate pages, watermark, number pages, stamp, or generate Factur-X invoices, with a stdio server as well as a hosted one.
Both can be added in a few seconds. KDAN is chat-attachment style; PDFops works on https URLs and base64 data, and as a local stdio server.
Side by side
PDFopsKDAN PDF MCP
Core jobEdit and create PDFsCompress, remove pages, passwords, redact, compare
Tools24 tools: inspect and fill AcroForms, detect and add fields, merge, split, extract and delete pages, rotate, watermark, page numbers, stamps and barcodes, text and table extraction, HTML, image and text to PDF, Factur-X invoices, protect and unlockCapabilities listed in its README: compress, remove pages, add or change passwords, redact, compare versions, preview, download links. A per-tool schema is not published on the page
Installclaude mcp add pdfops -- npx -y pdfops-mcp or hosted https://pdfops.dev/api/mcpPaste https://mcp.kdandoc.com/mcp as a connector in Claude (Settings, Connectors) or ChatGPT (Plugins); ChatGPT may need a paid plan
Auth for first callNone for the first 100 calls per IP per monthREADME says both "No account needed" and that Claude walks you through an authorization flow; we have not tested which applies
PricingFree: 100 keyless requests per IP per month, then 250 a month with a free key. Indie $16 a month for 4,000, Pro $79 for 25,000. Hard stop (HTTP 429) at quota, no overageFree and unlimited, with no upsell, per the vendor
Fill forms, merge, splitYesNot listed
Where files goHosted API; files are sent to PDFops and the PDF comes back in the responseHosted; the README does not say where files are processed or stored. MIT licence per its GitHub repository
Facts checked 2026-11-29. KDAN facts from the KDAN-PDF/KDAN-PDF-MCP README. PDFops facts from /mcp and /pricing. Vendor claims are the vendor's own words; we have not tested their products.
Where KDAN PDF MCP is the better choice
The price must be zero with no quota: KDAN states free and unlimited, while PDFops has a free tier with a hard cap.
You need true redaction, version comparison or compression. PDFops has none of them.
You work inside the Claude or ChatGPT chat and want to attach a file and ask in plain words, without any client config.
Using both
The two do not overlap enough to conflict: add KDAN for redaction and compression, PDFops for filling and assembly. PDFops client configs are on the MCP page.
Frequently asked
What is the best KDAN PDF MCP alternative?
If you need compression, redaction or comparison, there is no like-for-like swap in PDFops. If you need to fill forms, merge, split or create PDFs from an agent, PDFops.
Is KDAN PDF MCP really free?
Its README says free and unlimited with no credit card, no usage caps and no upsell. That is the vendor's claim; we have not tested it. PDFops is free up to 250 requests a month with a key, and 100 keyless requests per IP before that.
Does KDAN PDF MCP need an account?
Its README says no account is needed, and also describes an authorization flow when you connect. We have not verified which applies on first use. PDFops needs no key or account for the first 100 calls per IP per month.
Can KDAN PDF MCP merge or fill PDFs?
Merging and form filling are not listed in its README. PDFops does both.
← PDFops home · All comparisons · PDFops MCP server · Pricing
---
# Nutrient MCP alternative: PDF MCP with no signup | PDFops
Source: https://pdfops.dev/vs/nutrient
Comparison
A Nutrient MCP alternative that works before you sign up
PDFops vs Nutrient (formerly PSPDFKit) MCP, checked 2026-11-29
Nutrient's MCP server is hosted at mcp.nutrient.io and signs you in with a Nutrient account. Its earlier local server, nutrient-dws-mcp-server, is archived and the Nutrient page says the local server is no longer supported. PDFops needs no key or account for its first 100 calls a month, and covers form filling, which Nutrient's MCP page does not list.
Try PDFops in one line, no key or signup: claude mcp add pdfops -- npx -y pdfops-mcp, or point any MCP client at the hosted endpoint https://pdfops.dev/api/mcp. The first 100 calls per IP per month need no key; a free key (250 requests a month, no card) comes after that.
Quick verdict
Choose Nutrient for signing, AI-assisted redaction, OCR, Office to PDF conversion, PDF/A and PDF/UA output, and AI field extraction with citations, on files up to 25 MB. PDFops has none of those.
Choose PDFops to fill AcroForms by exact field name, merge, split, stamp, number pages or build invoices, with no account for the first call and a flat price per request.
If you built on the archived local @nutrient-sdk/dws-mcp-server, it will not receive fixes; moving to Nutrient's hosted server or to PDFops are the two supported paths.
Side by side
PDFopsNutrient
Core jobEdit and create PDFsDocument processing, extraction, signing and redaction
Tools24 tools: inspect and fill AcroForms, detect and add fields, merge, split, extract and delete pages, rotate, watermark, page numbers, stamps and barcodes, text and table extraction, HTML, image and text to PDF, Factur-X invoices, protect and unlockExtract fields, parse to Markdown, classify, convert and edit (Office to PDF, OCR, merge, rotate, watermark, PDF/A, PDF/UA), sign, redact, check balance. Form filling is not listed
Installclaude mcp add pdfops -- npx -y pdfops-mcp or hosted https://pdfops.dev/api/mcpAdd the remote server https://mcp.nutrient.io/mcp; the old local server is archived
Auth for first callNone for the first 100 calls per IP per monthSign in with a Nutrient account in the browser; no API key in config files
PricingFree: 100 keyless requests per IP per month, then 250 a month with a free key. Indie $16 a month for 4,000, Pro $79 for 25,000. Hard stop (HTTP 429) at quota, no overageUses your Nutrient account's rates; on the unified free plan, $5 of monthly usage covers the Data Extraction and Processor APIs, with Processor output watermarked until you add a wallet or upgrade. No separate MCP fee
File size4 MB per PDFUp to 25 MB per file
Limits that matterNo OCR, no Office conversion, no signing, no XFA forms. PDFs up to 4 MB. Files are uploaded to PDFops for each callHosted; files are processed by Nutrient
Facts checked 2026-11-29. Nutrient facts from nutrient.io/mcp-server-pdf-automation-llm; the archived server is PSPDFKit/nutrient-dws-mcp-server. PDFops facts from /mcp and /pricing. Vendor claims are the vendor's own words; we have not tested their products.
Where Nutrient is the better choice
You need digital signatures or AI redaction. PDFops has neither.
Your documents are scanned or arrive as Office files: Nutrient lists OCR and Office to PDF conversion.
You need PDF/A or PDF/UA output, or classification and field extraction with citations and confidence levels.
Your files are larger than 4 MB; Nutrient accepts up to 25 MB per file.
You want a long-established vendor behind the product.
Trying PDFops first
Because the first 100 calls per IP per month need no key, you can test a fill or merge before creating any account: run the install line above, then ask your agent to inspect a PDF. The playground does the same in a browser. Live prices are at /pricing.
Frequently asked
What is the best Nutrient MCP alternative?
If you need signing, redaction, OCR or Office conversion, there is no like-for-like swap in PDFops. If you need form filling, merging, splitting or invoices from an agent with no account for the first call, PDFops.
Is Nutrient's local MCP server still supported?
Nutrient's page says the local MCP server is no longer supported, and GitHub shows the PSPDFKit/nutrient-dws-mcp-server repository as archived. The supported route is the hosted server at mcp.nutrient.io.
Does Nutrient's MCP server need an API key?
Not in config files. Per Nutrient, you sign in with your Nutrient account in the browser. PDFops needs no key at all for the first 100 calls per IP per month; after that it issues a free key with 250 requests a month.
Can Nutrient's MCP server fill PDF forms?
Form filling is not listed on its MCP page. PDFops lists the form's fields with pdf_inspect and fills them by name with pdf_fill.
← PDFops home · All comparisons · PDFops MCP server · Pricing
---
# PDFops vs PaperPilot: batch form filling, local binary or hosted call
Source: https://pdfops.dev/vs/paperpilot
Comparison
PDFops vs PaperPilot
PaperPilot alternative: a local Rust toolkit with batch fill, against a smaller hosted server for agents and automation
PaperPilot is a Rust PDF toolkit that runs as an MCP server, a CLI, a desktop app and a browser WASM build, with files kept on your machine. Its README lists about 100 tools, including OCR, redaction, signatures and a batch fill that turns each CSV or JSON row into a flattened PDF. PDFops is smaller and hosted. If you are comparing it as a PaperPilot alternative, the question is whether you want a large local toolkit or a small hosted one that any client can call.
Try PDFops in one line
claude mcp add pdfops -- npx -y pdfops-mcp
Or point any MCP client that takes a remote URL at https://pdfops.dev/api/mcp. The first 100 calls per IP each month need no key; a free key (250 per month, no card) comes by email after that. Setup for other clients.
Facts checked 2026-11-29. Sources: KrushnaVardhanReddy/PaperPilot, PDFops MCP page, PDFops pricing. Vendor claims are the vendor's own words; we have not tested them.
Quick verdict
Choose PaperPilot if you want PDFs processed locally, need OCR, redaction or digital signatures, or want batch fill built in as a command.
Choose PDFops if you want nothing to install on the machine making the call (a hosted endpoint, REST or an n8n or Zapier step), a short list of tools an agent can pick from, and a fixed per-request price.
PaperPilot is new (its repository was created on 2026-09-28) and moving fast, so check its current README before relying on any single tool.
Side-by-side
PDFopsPaperPilot
What it isMCP server via npx, hosted Streamable-HTTP endpoint, REST API, n8n node, Zapier app, SDKsRust toolkit: MCP server, CLI, desktop app, browser WASM, local REST API
Where files are processedPDFops API: sent per call, processed in memory, not storedLocally ("Files never leave your machine" per its README)
Installclaude mcp add pdfops -- npx -y pdfops-mcp, or the hosted URLHomebrew, curl installer, or npx -y @usepaperpilot/mcp
Tool count24About 100 per the README
Form fillingpdf_inspect, pdf_fill, pdf_detect_fields, pdf_add_fields; one call per row for bulkpdf_read_form, pdf_fill_form, batch_fill (one flattened PDF per CSV/JSON row, with a SHA-256 receipt), form field creation
OCRNoYes (PP-OCRv4 models run locally)
Redaction and signingNeitherRedaction with PII scan; digital signatures and timestamps
Hosted endpointhttps://pdfops.dev/api/mcp and pdfops.dev/api/*Not described in its README; a local REST API on localhost
PriceFree: 100 calls/IP/month keyless, 250/month with a free key. Indie $16/mo, Pro $79/moFree (Apache-2.0 per its README badge)
Output repeatabilityFill, merge, page operations and invoices return byte-identical output for identical inputReceipts with SHA-256 hashes for batch fill
Where PaperPilot is the better choice
Breadth. About 100 tools in one local install, including OCR, redaction with PII scanning, signatures, Bates stamping and image tools.
Local by default. Nothing is uploaded, so there is no per-call limit and no third party in the data path.
Batch fill as a feature. A built-in command turns a CSV into a folder of filled PDFs with an audit receipt.
Several surfaces. CLI, desktop app and a browser build alongside the MCP server.
Where PDFops is the better choice
A short tool list. 24 tools is easier for a model to choose between than 100, which keeps tool selection predictable in an agent.
Nothing to install or update on the calling machine when you use the hosted endpoint or REST, which suits servers, serverless functions and no-code tools.
Flat per-request pricing with a hard stop at quota and no overage.
Invoices. JSON to invoice PDF, including a Factur-X (EN 16931) mode.
Frequently asked
Does PaperPilot upload my files?
Its README says it is pure Rust, runs locally, and files never leave your machine, with no cloud calls. That is the vendor's claim; we have not audited it. PDFops sends the PDF to its API for each call.
Can PaperPilot fill many PDFs from a spreadsheet?
Yes. Its README describes a batch fill that writes one flattened PDF per CSV or JSON row, with a receipt. In PDFops you call fill once per row, from an agent, a script or a workflow.
Does PDFops have OCR or redaction?
No. If you need either, PaperPilot is the better fit of the two.
Why would I use PDFops instead of a local tool?
When there is no machine to install on (a serverless function, an n8n cloud workflow, a hosted agent), or when you want a small, fixed tool list and a per-request price rather than a large local toolkit.
Move when ready
The free tier is 250 requests a month with an emailed key and no card, at /pricing. Indie ($16/mo, 4,000 requests) and Pro ($79/mo, 25,000) are live when you outgrow it. You can also try a form in the playground or the Form-Field Inspector.
← PDFops home · All comparisons · PDFops MCP server · PDFops vs PDF Tools MCP
---
# PDF.co alternative for form filling, merging and splitting | PDFops
Source: https://pdfops.dev/vs/pdf-co
Comparison
A PDF.co alternative for form filling, merging and splitting
PDFops vs PDF.co, as of 2026-11-22: one request per call against per-page credits
PDF.co sells credits, and most operations cost credits per page: a
2-page form fill is 42 of them. PDFops charges one request per call
whatever the page count, so the same fill costs about a sixth as
much, a 15-page merge about a fifth, and a 1,000-page split about a
thirtieth. No async jobs to poll, no expiring download links, and a
hard quota instead of a credit balance to watch.
Quick verdict
Choose PDFops to fill forms, read a form's fields, merge, split, watermark or number pages, especially on multi-page documents, where per-page credits multiply the bill. The PDF comes back in the response, the quota is hard (HTTP 429) so there are no surprise charges, and AI agents can use it through an MCP server.
Choose PDF.co if you need OCR or file-format conversion. PDFops has no OCR, no PDF to image and no Office conversion; it covers forms, page operations, stamping, text extraction, HTML, image and text to PDF, and e-invoices.
How each one charges
PDF.co sells credits, and each operation costs a number of credits per page processed. Its credits-per-function table lists, per page: fill form fields or add text 21, merge 2, split 2, rotate 7, delete pages 5, add or remove security 3, compress 35, info 7, HTML to PDF 9. Reading form fields is 8 credits per call. Its pricing page also carries a credit calculator and FAQ entries about charges for checking an async job.
PDFops counts requests. Every PDF endpoint is one request per call, whatever the number of pages or files, except HTML to PDF, which is 5 requests per render. A call that fails is not counted, apart from a failed HTML render once its renderer has been reached. When a key reaches its quota the API answers HTTP 429 until the monthly reset, so a bill cannot grow past the plan.
Side by side
PDFopsPDF.co
What it doesFill, merge, split, rotate, delete and extract pages, watermark, page numbers, stamps and barcodes, form-field creation, attachments, text and table extraction, text search, HTML, image, Markdown and CSV to PDF, Factur-X e-invoices. No PDF to image, OCR or Office conversionIncludes OCR and file-format conversion, as noted above; see PDF.co's own function list
Unit of billingOne request per call, any size within limitsCredits, mostly per page processed; some operations per call
Entry planFree: 250 requests a month, no card. Indie $16 a month for 4,000Basic $9.99 a month for 16,500 credits ($8.99 a month billed annually)
Next planPro $79 a month for 25,000Personal $22.49 a month billed annually for 37,000 credits
Over quotaHTTP 429 until reset; no overageAPI calls pause when credits run out; optional Smart Credit Refill on a subscription, or credit packs
Async job pollingNone: the PDF is the responseEach status check (job/check) costs 2 credits, per PDF.co's pricing FAQ
Output link lifetimeNo link; nothing is stored60 minutes on Basic through Business 1, 1,440 minutes from Business 2
Free useFree forever: 250 requests a month with a free key, plus 100 keyless requests per IPPricing page shows a "Get Started for Free" button and free-trial FAQ entries but states no trial length or credit amount (checked 2026-11-29); we dropped the earlier 10,000-credit figure as unverifiable
AI agentspdfops-mcp: inspect, fill, merge and more on the agent's own files, plus a hosted MCP endpointA local MCP server, pdfco-mcp, needing a PDF.co API key; see the MCP section below
PDF.co facts from pdf.co/pricing and developer.pdf.co/api/credits-per-api-function, plus developer.pdf.co/api/mcp/overview for the MCP server, fetched 2026-11-22. The $9.99 monthly figure for Basic is as shown by PDF.co; the other prices are the "billed annually" per-month figures as PDF.co shows them. PDFops facts from /pricing.
What it costs per job
Four common jobs priced on both sides. Cost per job is plan price divided by how many of that job the plan covers. PDF.co credits are per page processed, so the 15-page merge counts all 15 pages.
JobPDF.co creditsPDF.co Basic ($9.99, 16,500)PDF.co Personal ($22.49, 37,000)PDFops Indie ($16, 4,000)PDFops Pro ($79, 25,000)
2-page form fill2 pages x 21 = 4216,500 / 42 = 392 fills, $0.0254 each37,000 / 42 = 880 fills, $0.0255 each1 request: 4,000 fills, $0.0040 each1 request: 25,000 fills, $0.0032 each
15-page merge (3 files x 5 pages)15 pages x 2 = 3016,500 / 30 = 550 merges, $0.0182 each37,000 / 30 = 1,233 merges, $0.0182 each1 request: 4,000 merges, $0.0040 each1 request: 25,000 merges, $0.0032 each
Split a 1,000-page PDF into single pages1,000 pages x 2 = 2,00016,500 / 2,000 = 8 splits, $1.21 each37,000 / 2,000 = 18 splits, $1.22 each10 requests (100 parts per call): 400 splits, $0.040 each10 requests: 2,500 splits, $0.032 each
List a form's fields8 per call16,500 / 8 = 2,062 calls, $0.0048 each37,000 / 8 = 4,625 calls, $0.0049 each1 request: 4,000 calls, $0.0040 each1 request: 25,000 calls, $0.0032 each
Per-page credits are what make the difference: PDFops is about 6 times cheaper per form fill and about 4.5 times cheaper for the 15-page merge, and the gap grows with every page you add. The 1,000-page split shows it at the extreme: about $1.21 on PDF.co against $0.04 on PDFops.
PDFops accepts PDFs up to 4 MB (the 1,000-page example is a 0.9 MB text PDF). PDF.co's credit counts are its sync-mode estimates. Per-job costs are rounded; PDF.co's $8.99 annual rate for Basic would lower its Basic figures by about 10 percent.
MCP server: pdfops-mcp vs pdfco-mcp
If you arrived from a search for a PDF MCP server, here is the agent side of the comparison, checked 2026-11-29.
PDFops (pdfops-mcp)PDF.co (pdfco-mcp)
Installclaude mcp add pdfops -- npx -y pdfops-mcp, or hosted https://pdfops.dev/api/mcpuvx pdfco-mcp, a local stdio server run with uv and Python 3.10 or later
Auth for the first callNone: the first 100 calls per IP per month need no key; then a free key, 250 requests a monthA PDF.co API key in the X_API_KEY environment variable, from your PDF.co dashboard
Where it worksLocal stdio and a hosted Streamable-HTTP endpoint for remote MCP clientsLocal MCP clients: Claude Desktop, Claude Code, Cursor, VS Code, Codex. Its docs say these setups do not connect to Claude.ai web or mobile or to ChatGPT web, and that a PDF.co-hosted connection is not included
Tools24: inspect and fill AcroForms, detect and add fields, merge, split, page operations, watermark, stamps and barcodes, text and table extraction, HTML, image and text to PDF, Factur-X invoices, protect and unlock38 per its docs, including OCR, PDF to text, JSON, CSV, Excel and images, Office, HTML and URL to PDF, form fields, AI invoice parsing, Factur-X embedding, file upload and async job waiting
Pricing modelOne request per call; Free 250, Indie $16 for 4,000, Pro $79 for 25,000; hard stop at quotaProcessing uses your PDF.co account's credits, per page for most operations; plans from Basic at $8.99 a month billed annually for 16,500 credits
PDF.co's MCP server is the broader of the two: OCR, conversion in both directions and invoice parsing are tools there and not in PDFops. PDFops is the cheaper way to fill and merge, takes no key for a first try, and also runs as a hosted endpoint. PDF.co MCP facts from developer.pdf.co/api/mcp/overview, the pdfco-mcp repository and pdf.co/pricing, checked 2026-11-29; the $8.99 figure is PDF.co's annual-billing rate.
Moving a form fill over
PDFops fills fields by name: send the PDF and a JSON object of values, and the filled PDF comes back in the response. First list the field names with /api/inspect or the field inspector, then send the values.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
That call runs with no key or signup; the sample invoice-template.pdf has both fields. The same thing in the browser: the playground. Endpoint details are in the fill-form docs and merge docs, and live prices are at /pricing.
Frequently asked
Is there a PDF.co MCP alternative that needs no API key?
PDFops: its MCP server answers the first 100 calls per IP per month with no key, locally through npx -y pdfops-mcp or hosted at https://pdfops.dev/api/mcp. PDF.co's pdfco-mcp needs a PDF.co API key before the first call, and has more tools, including OCR and conversion, that PDFops lacks.
What is the best PDF.co alternative?
For filling PDF forms, listing their fields, merging and splitting, PDFops: one request per call whatever the page count, so a 2-page form fill costs about $0.004 against about $0.025 on PDF.co, with a hard monthly quota instead of per-page credits. PDFops covers forms, page operations, stamping, text extraction, HTML, image and text to PDF, and e-invoices; it has no OCR, PDF to image or Office conversion, so if you need those, PDF.co covers them.
How does PDF.co pricing compare to PDFops?
As of 2026-11-22. PDF.co charges credits per page for most operations: 21 credits per page to fill a form, 2 per page to merge or split, 8 per call to read form fields. Plans: Basic $9.99 a month for 16,500 credits, Personal $22.49 a month billed annually for 37,000. PDFops charges one request per call: Indie $16 for 4,000, Pro $79 for 25,000. A 2-page form fill costs 42 PDF.co credits, so Basic covers 392 of them a month against 4,000 requests on Indie.
Does PDF.co charge for checking an async job?
PDF.co's pricing page carries a credit calculator and FAQ entries about the job/check endpoint, including why job/check charges are sometimes higher. Polling an async job therefore has its own cost on PDF.co. PDFops returns the PDF in the HTTP response, so there is no job to poll and no polling charge.
How long do PDF.co output links last?
PDF.co's pricing page lists a 60-minute output link expiry on Basic through Business 1 and 1,440 minutes from Business 2. PDFops stores nothing: the PDF is the response body, so there is no link to expire, and keeping the file is up to you.
← PDFops home · All comparisons · Pricing · Docs
---
# PDFops vs pdf-lib — hosted PDF API vs an unmaintained JS library
Source: https://pdfops.dev/vs/pdf-lib
Comparison
PDFops vs pdf-lib
pdf-lib is unmaintained — the honest split between a maintained fork and a hosted, deterministic API
pdf-lib is one of the most-downloaded PDF libraries in the
JavaScript ecosystem — ~10.25M downloads/week on
npm — and it has been effectively unmaintained since
2021, with roughly 279 issues sitting open. That's
a confusing combination: massive adoption, dead upstream. This page
is the honest answer to "pdf-lib is unmaintained, what
now" — real maintained forks if you need to stay
in-process, and where a hosted, deterministic PDFops API fits a
narrower job instead.
The honest framing
pdf-lib's download count is a legacy signal, not a maintenance signal. The library (MIT, free, in-process) was the default recommendation for years, and most of that traffic is projects that adopted it while it was active or are still on it because the PDF spec hasn't moved and the code still runs. The repo itself hasn't shipped a real release since 2021, and ~279 open issues — bugs, edge-cases, feature requests — sit without maintainer response.
That doesn't make pdf-lib broken for every use case; it means new bugs, security reports, and PDF edge-cases you hit won't get fixed upstream. Whether that matters depends on what you're doing with it.
PDFops isn't a pdf-lib replacement the way a fork is — it's a different shape entirely. In-process library vs. hosted API is a real trade-off, not a strict upgrade in either direction. A library keeps everything in your process: no network dependency, no third party in the trust chain, full control. A hosted API keeps a PDF-manipulation library and its font/parser edge cases out of your bundle and your maintenance burden, at the cost of a network round-trip and trusting someone else's runtime. If you need arbitrary in-process PDF construction, pick a maintained library — see below. If your job is narrower — fill an AcroForm template, merge PDFs, or generate an invoice, deterministically, from an edge or serverless function — that's what PDFops does.
If you just need a maintained pdf-lib
Not every pdf-lib user needs to change shape. If the in-process library model is right for your app and you just want it kept alive, these are the honest options — evaluated purely as pdf-lib alternatives, not as arguments against them:
@cantoo/pdf-lib (~388k downloads/week) — the most-downloaded active fork, close to a drop-in replacement for the original API. It's also what PDFops itself runs on internally: our fill, merge, and invoice engines are built on @cantoo/pdf-lib under the hood.
@pdfme/pdf-lib (~209k downloads/week) — maintained by the pdfme project, used inside their own PDF-generation tooling.
LibPDF by Documenso (~98k downloads/week) — a newer, clean-room successor rather than a fork, built to move past pdf-lib's internals instead of patching around them.
Any of the three is a reasonable answer if an in-process library is still what you need. None of them need PDFops to be a fit — they solve a different problem than the one PDFops solves.
Side-by-side
PDFopspdf-lib
PrimitiveHosted HTTP API: fill-form, merge, inspect, invoice, page operations, stamps, text extraction, HTML, text and image to PDFIn-process JS library: build & manipulate PDFs in your own code
ShapeNetwork call, returns PDF bytesnpm install, runs inside your process
License / accessFree tier + paid API keysMIT, free
Weekly npm downloadsn/a — not an npm package~10.25M/week
MaintenanceActively developedEffectively unmaintained since 2021
Open issues—~279 open, no maintainer response
DeterminismByte-identical output (same sha256), incl. flatten=trueNot guaranteed — depends on your code
Cold-start / bundle costZero — no PDF lib in your function1MB+ added to your edge/serverless bundle
Font & parser maintenancePDFops's responsibilityYours — and pdf-lib's own bugs go unfixed
Network dependencyYes — HTTP round-tripNo — runs in-process
Free tier250/mo with a free key (no card); 100 req/IP/month keylessFree (MIT), unlimited local use
SDK / ecosystempdfops-sdk (TS), pdfops-mcp (MCP server), n8n-nodes-pdfopsRaw library API only
Best forDeterministic fill/merge/invoice from edge or serverless, zero maintenance burdenArbitrary in-process PDF construction, no network dependency
pdf-lib and fork download/issue figures per npm and GitHub as of 2026-07-30. PDFops pricing is live at /pricing.
If the hosted primitive fits, try it in 30 seconds
Drop a form PDF into the Form-Field Inspector to see its AcroForm fields and the exact call. The fill shape is one HTTP request:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-F "flatten=true" \
-o filled.pdf
No API key needed for the first 100 calls per IP each month — or skip the terminal and run the same call in the playground. flatten=true bakes the values into the page content and drops the AcroForm; output is still byte-identical for identical input (same sha256), so you can hash-compare in CI or use it as a cache key. Full parameter reference in the fill-form docs (full API surface at /docs); the pdfops-sdk npm package, the pdfops-mcp MCP server, and the n8n-nodes-pdfops n8n node wrap the same endpoints if you'd rather not hand-roll the HTTP calls.
Frequently asked
Is pdf-lib actually unmaintained?
Yes, functionally. ~10.25M downloads/week on npm, but no real release since 2021 and ~279 open issues with no maintainer response. The download count is a legacy-adoption signal, not a vote of active support — new bugs and PDF edge-cases go unaddressed upstream.
What should I use instead of pdf-lib for in-process work?
If you just need it maintained: @cantoo/pdf-lib (~388k downloads/week) and @pdfme/pdf-lib (~209k downloads/week) are the established maintained forks, largely API-compatible with the original. Documenso's LibPDF (~98k downloads/week) is a newer clean-room successor. All three are legitimate answers if an in-process library is what you need.
Is PDFops a drop-in replacement for pdf-lib?
No. pdf-lib and its forks run in-process, no network call; PDFops is a hosted HTTP API. If you need in-process PDF construction, a library (see above) is still the right shape. PDFops fits a narrower job — fill AcroForm fields, merge, split and stamp PDFs, extract text, generate invoices, mostly deterministically (HTML to PDF is the exception) — from a function that doesn't want a PDF library in its bundle.
Why use a hosted API instead of an in-process library?
Zero cold-start-size cost (no 1MB+ library in your function bundle) and no font/parser maintenance on your side. In exchange: a network round-trip, and trusting PDFops's runtime instead of code you can read. Worth it for template-fill and merge jobs from edge functions; not for heavy in-process document construction.
Does PDFops guarantee byte-identical output?
Yes — identical input to /api/fill-form or /api/merge produces the same sha256 output every time, including with flatten=true. No wall-clock timestamps or non-deterministic metadata get stamped in. pdf-lib and its forks don't guarantee this natively; it depends on how you use them.
Move when ready
If the deterministic fill + merge primitive matches your usage, grab a free API key (250 req/mo) at /pricing — email in, key out, no card. Indie ($16/mo, 4,000 calls) and Pro ($79/mo, 25,000) are live when you outgrow it.
← PDFops home · All comparisons · Why deterministic
---
# PDFops vs PDF Tools MCP: a hosted fill tool that works outside Claude Desktop
Source: https://pdfops.dev/vs/pdf-tools-mcp
Comparison
PDFops vs PDF Tools (Open Document Alliance)
PDF Tools MCP alternative: local-first desktop tool against a hosted endpoint that automation can call
PDF Tools from the Open Document Alliance is the closest local rival on form filling: it reads, fills, signs, merges and splits PDFs on your own machine, with a viewer, saved profiles and bulk fill from CSV. PDFops does fill, merge and split too, but as a hosted service your agent or workflow calls. If you are searching for a PDF Tools MCP alternative, the split is local desktop tool against hosted tool.
Try PDFops in one line
claude mcp add pdfops -- npx -y pdfops-mcp
Or point any MCP client that takes a remote URL at https://pdfops.dev/api/mcp. The first 100 calls per IP each month need no key; a free key (250 per month, no card) comes by email after that. Setup for other clients.
Facts checked 2026-11-29. Sources: Open-Document-Alliance/PDF-Tools, PDFops MCP page, PDFops pricing. Vendor claims are the vendor's own words; we have not tested them.
Quick verdict
Choose PDF Tools if your PDFs must stay on your machine, you work in Claude Desktop or another local MCP host, or you need signing zones, a visual viewer and saved profiles.
Choose PDFops if the caller is not a desktop app: a hosted agent, an n8n or Zapier workflow, a script or an API integration. The hosted endpoint is https://pdfops.dev/api/mcp, and the REST API takes the same operations.
PDF Tools states that it does not yet include a remote connector for web-hosted Claude. If you need to use a PDF tool from there, that gap decides it.
Side-by-side
PDFopsPDF Tools (Open Document Alliance)
What it isMCP server via npx, hosted Streamable-HTTP endpoint, REST API, n8n node, Zapier app, SDKsLocal MCP server and Claude Desktop extension (.mcpb); also a ChatGPT and Codex agent plugin
Where files are processedPDFops API: each call sends the PDF, processed in memory, not storedOn your machine: it "reads, renders, edits, and saves files on your machine instead of uploading them"
Form fillingpdf_inspect and pdf_fill by field name; flat PDFs via pdf_detect_fields and pdf_add_fields; a loop or n8n workflow for bulkfill_pdf, read_pdf_fields, bulk_fill_from_csv, reusable profiles
SigningNo e-signature workflow; adds signature fields and stamps a signature image (pdf_edit)Signature and date zone detection, local signatures, optional Lumin e-signing
Merge, split, reorderMerge, split, extract, delete and rotate pages; no visual editorYes, including a visual page organiser
ViewerNoneInteractive viewer with form sidebar
Remote or hosted useHosted MCP endpoint and REST APINo remote connector yet per its README
Works from automation toolsn8n community node, Zapier app, HTTPNo remote connector or HTTP API described
PriceFree: 100 calls/IP/month keyless, 250/month with a free key. Indie $16/mo, Pro $79/moFree (MIT)
Output repeatabilityFill, merge, page operations and invoices return byte-identical output for identical inputNo claim found
Where PDF Tools (Open Document Alliance) is the better choice
Privacy by design. Local file operations mean the PDF is not sent to a PDF service. (Text returned to the model is still subject to your host's data terms, which the project says itself.)
Signing. Zone detection, saved signatures and an optional e-signing hand-off. PDFops has none of that.
Interactive tools. The viewer, visual page management and reusable profiles suit a person working alongside the agent.
Cost. Free and MIT licensed, with no quota.
Where PDFops is the better choice
Not tied to a desktop host. A hosted endpoint means the same tools work from an agent platform, a scheduled job or a no-code workflow.
Unattended runs. A tool call with typed fields and a repeatable result fits cron and n8n better than a viewer-centred flow.
Keyless start. 100 calls per IP per month with no account, then a free key by email.
Invoices and stamps. JSON to invoice PDF (with a Factur-X mode), text, image, barcode and QR stamps.
Frequently asked
Does PDF Tools upload my PDFs?
Its README says it reads, renders, edits and saves files on your machine instead of uploading them to a separate PDF service, with an optional Lumin e-signing step that does send the prepared PDF out after you confirm. It also notes text returned to your MCP host is governed by that host's data terms.
Can I use PDF Tools from claude.ai in the browser?
Its README says it does not yet include a remote connector for Claude Cowork or web-hosted Claude. PDFops offers a hosted MCP endpoint at https://pdfops.dev/api/mcp for hosts that accept a remote MCP URL.
Which is better for bulk form filling?
PDF Tools has a built-in bulk fill from CSV. With PDFops you call fill once per row (an agent, a script or an n8n loop), which is more setup but runs on a server with no desktop app.
Does PDFops sign documents?
Not as an e-signature workflow. It can add signature fields and stamp a signature image at an exact position with pdf_edit, but it does not apply cryptographic signatures. PDF Tools has signing zones and local signatures.
Move when ready
The free tier is 250 requests a month with an emailed key and no card, at /pricing. Indie ($16/mo, 4,000 requests) and Pro ($79/mo, 25,000) are live when you outgrow it. You can also try a form in the playground or the Form-Field Inspector.
← PDFops home · All comparisons · PDFops MCP server · PDF API for n8n
---
# PDFMonkey alternative for form filling, merging and JSON invoices | PDFops
Source: https://pdfops.dev/vs/pdfmonkey
Comparison
A PDFMonkey alternative for fixed-layout PDFs
PDFops vs PDFMonkey: when an HTML template renderer is more than the job needs, and when it is exactly right
PDFMonkey turns HTML and Liquid templates into PDFs, with a template
dashboard, a Chrome renderer and plans from €5 a month. PDFops does a
narrower job: it fills PDF forms you already have, merges PDFs, and
draws a standard invoice from JSON, with no template to design, no
browser, and a free tier of 250 requests a month. If your PDFMonkey
templates are really fixed layouts with a few variables, PDFops is
the simpler tool. If they use real templating logic, stay where you are.
Quick verdict
Stay on PDFMonkey if your documents are designed in HTML and CSS and use Liquid loops, conditionals, snippets, charts or custom JavaScript, if non-developers edit templates in its dashboard, or if you rely on pay-as-you-go overage and hosted download links.
Use PDFops if the job is data into a fixed layout: filling a form you already have (tax forms, contracts, onboarding packets), merging PDFs, or a standard invoice from JSON with no template at all. It is stateless, returns the PDF in the response, and gives the same bytes for the same input.
They do different things
PDFMonkey is a document generator. You design a template in its dashboard in HTML, CSS and Liquid, send a JSON payload, and a Chrome-based renderer produces the PDF, which is stored and served through a signed URL valid for one hour. Its PDF Forms feature turns markers in the template into empty fillable fields.
PDFops is a set of PDF operations behind one HTTP API. /api/fill-form puts values into the fields of a PDF you already have, /api/merge joins PDFs, /api/inspect lists a form's fields, and /api/invoice draws a complete invoice from JSON in one built-in layout. The PDF comes back as the response body; nothing is stored.
So the overlap is narrow but common: fixed-layout business documents, invoices above all, where PDFMonkey's templating power goes unused.
Side by side
PDFopsPDFMonkey
Core operationFill existing AcroForm PDFs, merge PDFs, list fields, built-in invoice, page operations, stamps, text extraction, and HTML, text or image to PDFRender HTML + Liquid templates to PDF (or image)
Fill a PDF form you already haveYes, the core endpointNo. PDF Forms emits empty fillable fields from a template
Merge PDFsYesNo merge endpoint in the documents API
Invoice from JSONYes, no template needed; one fixed US Letter layoutYes, from a template you design (any layout)
Template designAny AcroForm editor (Acrobat, Preview, LibreOffice), or the free make-fillable toolWeb dashboard with HTML, CSS, Liquid and live preview
Templating logicNone. Field name to valueLiquid tags, snippets, custom filters, custom JavaScript
DeliveryPDF in the HTTP response; nothing storedStored document; signed download URL valid 1 hour; sync or async with webhooks
Same input, same bytesYes, byte-identical, except HTML to PDFNot documented
Rendererpdf-lib on Vercel Edge; HTML to PDF uses a headless browser in a separate serviceChrome-based
Free usage100 keyless requests/IP/month; 250/month with a free key, no card20 documents/month; 30-day trial with 300
Paid plansIndie $16/mo (4,000), Pro $79/mo (25,000)Starter €5 (300), Pro €15 (3,000), Pro+ €60 (5,000), Premium €300 (60,000)
Over quotaHTTP 429 until the monthly reset; no overagePay-as-you-go €0.008 to €0.005/doc on paid plans, or €5 per 1,000 Boost Pack
AI agents (MCP)pdfops-mcp: inspect, fill, merge, invoice, stamp, extract text, HTML to PDF and more on the agent's own filesOfficial MCP server: generate from your templates, manage templates
Clients and integrationsPython (pip install pdfops), TypeScript (pdfops-sdk), n8n community nodeRuby and Node.js SDKs; Zapier, Make, n8n, Workato, Bubble
PDFMonkey facts from pdfmonkey.io/pricing (page marked "Last updated: September 2026"), its documents API reference and PDF Forms docs, checked 2026-09-24. Prices exclude VAT; PDFMonkey bills in euros, PDFops in US dollars.
What it costs per document
Monthly volumePDFopsPDFMonkey
20$0 (keyless or free key)€0 (Free)
250$0 (free key)€5 (Starter)
3,000$16 (Indie)€15 (Pro)
25,000$79 (Pro)€125 (Pro plus 22 Boost Packs), €169 (Pro €15 plus 22,000 pay-as-you-go at €0.007), or €300 (Premium)
At low volume the free tiers decide it. In the low thousands the two are within a few euros of each other. At tens of thousands PDFops is cheaper, but a PDFops key stops at its quota while PDFMonkey keeps generating on pay-as-you-go, which matters if a billing run must never fail.
Moving invoices over
Most PDFMonkey accounts that could move are generating invoices. There are two routes:
No template. If a clean standard layout is acceptable, send your invoice data straight to /api/invoice. The payload is from, to, items and optional number, dates, currency, tax rate and notes; the full request and real response are on JSON to invoice PDF.
Your own design. Export one rendered PDFMonkey invoice, add fillable fields where the variables go (in Acrobat, or the free make-fillable tool), confirm the names with the field inspector, then send values to /api/fill-form. Line-item loops become a fixed number of rows, and formatting such as dates and currency moves into your code.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
That call runs with no key or signup; the sample invoice-template.pdf has both fields. The same thing in the browser: the playground.
Frequently asked
What is the best PDFMonkey alternative?
It depends on which half of PDFMonkey you use. If you design documents in HTML and CSS with Liquid logic, you want another HTML-template renderer. If what you actually do is put data into a fixed layout, such as invoices, receipts, contracts or government forms, PDFops is a lighter fit: it fills an existing fillable PDF, merges PDFs and draws a standard invoice from JSON, with no template dashboard and no browser on those paths (HTML to PDF is a separate endpoint that does use one).
Is PDFops a drop-in replacement for PDFMonkey?
No. PDFMonkey renders HTML plus Liquid to a new PDF. PDFops fills an AcroForm PDF you already have, merges PDFs, and draws one built-in invoice layout from JSON. Moving over means rebuilding each template once as a fillable PDF, or switching invoices to /api/invoice if its fixed layout is acceptable. Templates with loops, conditionals, charts or custom JavaScript should stay on PDFMonkey.
How does pricing compare?
Checked 2026-11-09. PDFMonkey: Free 20 documents a month, Starter €5 for 300, Pro €15 for 3,000, Pro+ €60 for 5,000, Premium €300 for 60,000, with optional pay-as-you-go overage on every paid plan (€0.008 to €0.005 a document) or €5 Boost Packs of 1,000. PDFops: 100 keyless requests per IP a month, a free key with 250, Indie $16 for 4,000 and Pro $79 for 25,000. At a few thousand documents a month the two cost about the same; the gaps are the free tier (250 against 20) and overage, which PDFops does not offer: a key stops with HTTP 429 at its quota.
Does PDFMonkey have an MCP server?
Yes. PDFMonkey publishes an official MCP server (pdfmonkey-mcp-server) for generating documents from your PDFMonkey templates and managing templates. PDFops has pdfops-mcp, which works on PDFs the agent already has: inspect a form's fields, fill it, merge files, or draw an invoice. They answer different agent requests.
Can PDFMonkey fill an existing PDF form?
No. Its PDF Forms feature goes the other way: markers in an HTML template become empty fillable fields in the generated PDF, for someone to fill later. Filling a form you already have, such as a W-9 or a supplier's application, is the core PDFops operation.
Where are my documents stored?
PDFMonkey stores each generated document and gives you a signed download URL valid for one hour, with retention from 1 day (Free, Starter) to unlimited (Pro+, Premium). PDFops stores nothing: the PDF is the HTTP response body, and keeping it is up to you.
← PDFops home · All comparisons · JSON to invoice PDF · Docs
---
# PDFops vs PDFShift — hosted PDF API comparison
Source: https://pdfops.dev/vs/pdfshift
Comparison
PDFops vs PDFShift
A PDFShift alternative for template-based PDF form-fill and merge
PDFShift is a hosted HTML-to-PDF API built on Chromium, with
credit-based pricing from $0.0040/doc at $99/mo
(Business, 25,000 credits) down to $0.0096/doc at $24/mo
(Boost, 2,500 credits), plus a 50-doc/mo free tier
and $0.03/credit overage. PDFops is a hosted form-fill +
merge API with a free keyed tier (250
requests/month) and paid tiers from $16/mo — plus 100
keyless requests per IP per month to try it with no signup
at all. PDFShift cannot fill
AcroForm fields or merge PDFs — the API renders
HTML only, regardless of tier. This page is for the case
where template-fill is the actual need and HTML rendering
was just how you happened to get there.
The honest framing
If you need to render web pages by URL, or pages that depend on JavaScript, PDFShift still fits better. PDFops renders HTML strings you send it (no URL input, no JavaScript, 50 pages at most), which covers invoices, reports and emails whose HTML you already have.
If your usage is template-fill (invoices, receipts, contracts, government forms — anything where the layout is fixed and the variation is the data), the wedge flips. You're paying Chromium-rendering prices to rebuild a layout you already have as a PDF. PDFops fills the existing PDF directly — no rendering pass.
One platform-maturity signal worth knowing. PDFShift's first-party SDK repositories (PHP/Node.js/Python on github.com/pdfshift) have been archived since December 2020 — five years without SDK updates. Their docs migrated to Mintlify in late 2025 but no new endpoints or substrate changes have been announced. Stable, but not actively evolving.
Side-by-side
PDFopsPDFShift
PrimitiveAcroForm fill-form, merge and other operations on existing PDFs, plus HTML, text and image to PDFHTML → PDF / PNG / JPEG / WEBP only
AcroForm fill-formYes (core endpoint)No — confirmed in their FAQ and docs
PDF mergeYes (core endpoint)No — no PDF manipulation endpoints
Pricing modelSubscription tiers: Indie $16/mo (4,000 req), Pro $79/mo (25,000 req)Credit system, 1 credit = 1 PDF up to 5 MB (larger files consume multiple credits)
Per-document price~$0.004 (Indie) → ~$0.003 (Pro)$0.0096 (Boost, $24/mo, 2.5k credits) → $0.0040 (Business, $99/mo, 25k credits); overage $0.03/credit
Free tier250/mo with a free key (no card); 100 req/month/IP keyless50 credits/mo, 15 MB file cap, 30s timeout, no overage allowed
Auth modelX-API-Key (free key, emailed); keyless anonymous calls allowed for trialAPI key required
Hosting substrateVercel Node runtime, one region (iad1, US East); HTML to PDF runs in a separate headless-browser serviceChromium in containers, single-region, AWS S3 for output storage
Response latency (typical)A fraction of a second for small PDFs; HTML to PDF under a second for a small page (our measurement, 2026-11-22)~1.5s avg render time (3rd-party benchmark)
Per-request timeout20s per PDF operation (HTML to PDF render: 15s)30s free / 100s paid (gated by tier)
ConcurrencyNo parallel cap published50 parallel conversions/account
First-party SDKsHTTP-native (no SDK needed; curl/fetch)PHP/Node/Python repos archived Dec 2020
SLANone yet; enterprise via hello@pdfops.dev"99.9% uptime" claimed, no formal SLA published
Best forTemplate-fill + merge at scaleHTML rendering of arbitrary markup
Pricing verified at pdfshift.io/pricing and FAQ; SDK status from github.com/pdfshift; pricing read 2026-11-09.
Try the migration in 30 seconds
If you've got a PDF template with AcroForm fields (or want one — grab a sample invoice-template.pdf), the call shape is:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf
You get a filled PDF back. No API key or signup needed for the first 100 calls per IP each month — or run the same call in the browser via the playground. The full reference for the endpoint is in the fill-form docs, with per-language versions of the call in the Python, Node.js, and JavaScript guides.
Frequently asked
Is PDFops a drop-in replacement for PDFShift?
Different primitives. PDFShift renders HTML to PDF; PDFops fills AcroForm fields. If your usage is HTML-driven, PDFShift still fits. If you can move to AcroForm templates, PDFops is cheaper.
How much cheaper is PDFops per document?
PDFShift's credit plans work out to about $0.0098 per document at 4,000 documents a month (Growth, $39 for 5,000 credits) and about $0.0040 at 25,000 (Business, $99 for 25,000 credits), prices read 2026-11-09. PDFops: Indie is $16/mo for 4,000 requests (~$0.004/doc) and Pro is $79/mo for 25,000 (~$0.003/doc) so roughly 2× cheaper at 4,000 documents a month and about 1.25× cheaper at 25,000. Possible for fills and merges because PDFops runs them with no headless browser rather than headless-Chromium-in-a-container, and that lower cost passes through. This comparison is for fills and merges. HTML to PDF is a separate endpoint that uses a headless browser and counts 5 requests per render: at Indie ($16 for 4,000 requests) that is $0.02 per render, more than PDFShift's $0.0098 per document at 4,000 a month, so PDFops is not cheaper for HTML rendering.
Does PDFops support webhooks and async generation like PDFShift?
PDFops is synchronous, so there is no need for async at typical document sizes. Your code can run inside a webhook handler and return the filled PDF inline. For batches larger than what fits in a single HTTP request, run the call inside a cron-triggered worker (the monthly-bundles walkthrough shows the pattern).
Can PDFops handle our PDFShift volume?
The anonymous tier is capped at 100/month/IP. For higher volume, get a free API key (250 req/mo) — then Indie ($16/mo, 4,000 req) and Pro ($79/mo, 25,000 req) are live. Above that, email hello@pdfops.dev.
What about HTML rendering — can PDFops do that too?
Yes, for HTML you send as a string. POST /api/html-to-pdf renders it with a headless browser in an isolated service: CSS layout, images and web fonts, A4 or Letter. It has no URL input and runs no JavaScript, and external resources load over https only, so pages that depend on a URL or on JavaScript still fit PDFShift better. Each render counts 5 requests of your quota, which is $0.02 per render at Indie, so it is not cheaper than PDFShift for HTML.
Move when ready
If the template-fill primitive matches your usage, grab a free API key (250 req/mo) at /pricing — email in, key out, no card. Indie ($16/mo, 4,000 req) and Pro ($79/mo, 25,000 req) are live when you outgrow it.
← PDFops home · Blog · Docs
---
# POST /api/add-fields — PDFops API reference
Source: https://pdfops.dev/docs/add-fields
Endpoint reference
POST /api/add-fields
Create fillable form fields in an existing PDF: text boxes, multiline text, checkboxes, radio groups, dropdowns and signature boxes, each at a page and position you give. Returns the PDF with standard AcroForm fields as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/add-fields. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
fieldsString (JSON array)YesThe fields to create. For a flat PDF, /api/detect-fields returns entries you can send here as they are (label and confidence are ignored). Up to 200 entries and 256 KB, and up to 200 widgets in total (a radio option counts as one). See Fields.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request, however many fields it adds. Check consumption with GET /api/usage.
Coordinates
Positions are in PDF points, 72 to the inch, measured from the bottom-left corner of the page as a viewer shows it, the same frame and 1-based page numbers as /api/edit. A US Letter page is 612 × 792 points and A4 is 595 × 842. If a page is rotated, or has a crop box, the origin is still the bottom-left of what you see, so you never have to undo the rotation yourself; the text inside a field stays upright. A PDF viewer's measuring tool shows where a blank line sits; measure from the bottom edge, not the top.
x and y are the field's bottom-left corner, and width and height extend right and up. The whole rectangle must lie inside the page. A field with a border (the default) draws it half a point outside the rectangle on each side, so a bordered text, checkbox, radio or dropdown field flush against a page edge is out of bounds; set border to false or move it in by a point. A signature box draws its border inside its rectangle, so it can sit flush.
Fields
Every entry has type, name and page. Every type except radio also has x, y, width and height. Nothing is added unless every entry is valid.
Keys every type takes
KeyTypeDefaultDescription
typeStringRequiredtext, checkbox, radio, dropdown or signature.
nameStringRequired1 to 200 characters, no dot, not blank, no control characters. Unique within the request and in the PDF. See Names.
pageIntegerRequired1-based page number.
x, y, width, heightNumberRequired (not for radio)The rectangle in points. Each side is at least 4 points.
requiredBooleanfalseSets the field's Required flag. Viewers that honour it ask for a value; this API does not enforce it.
read_onlyBooleanfalseSets the field's ReadOnly flag. /api/fill-form still fills it.
borderBooleantrueDraw a black outline 1 point wide. false draws none.
backgroundBooleanfalsetrue paints an opaque white background; by default there is none, so the page artwork under the field stays visible.
Text fields: "type": "text"
KeyTypeDefaultDescription
multilineBooleanfalseAllow several lines. A single-line field takes no line break.
max_lengthIntegerNo limit1 to 65,535 characters. /api/fill-form rejects a longer value.
defaultStringEmptyThe starting value, drawn in the field. Up to 65,536 characters (131,072 across all defaults in the request), no longer than max_length, and a line break only if multiline is true. Standard fonts cover the WinAnsi set: € and “ ” are accepted, Ł and CJK characters fail with unsupported_characters.
font_sizeNumber or "auto"See Font size1 to 200 points, or "auto". Read Font size before using "auto".
Checkboxes: "type": "checkbox"
KeyTypeDefaultDescription
checkedBooleanfalseStart ticked.
Radio groups: "type": "radio"
One entry makes one group named name, with one button per option; only one can be selected. The entry has no rectangle of its own: each option has its own.
KeyTypeDefaultDescription
optionsArrayRequired1 to 100 objects {"value", "x", "y", "width", "height"}. value is 1 to 200 characters, unique in the group, not "Off", and never drawn, so it need not be WinAnsi. Each option's rectangle follows the same rules and the same coordinates as any field, and may be on the group's page only.
defaultStringNone selectedOne of the option values, selected to start.
Dropdowns: "type": "dropdown"
KeyTypeDefaultDescription
optionsArray of stringsRequired1 to 100 non-empty, unique strings with no line break. WinAnsi characters only (é, €, œ are accepted; Ł and CJK characters fail with unsupported_characters).
defaultStringNone selectedOne of the options.
font_sizeNumber or "auto"See Font size1 to 200 points, or "auto". See Font size.
Signature boxes: "type": "signature"
Takes only the keys every type takes. It creates an empty signature field for a signing tool to use later; see Behavioral notes.
Font size
font_size is a number of points from 1 to 200, or the string "auto". It only changes text and dropdown fields; checkboxes, radio groups and signature boxes accept a valid value and ignore it.
Omitted (the default): text, multiline text and dropdown fields get a fixed size: 12 points, or the largest size at which one line fits the field's height if that is smaller, and at least 4 points. The stored size for a box 300, 70, 24, 14 and 8 points high is 12, 12, 12, 9 and 4. Because it is fixed, text draws predictably when the field is filled.
A number: exactly that size, fixed.
"auto": the field is stored with size 0, and the size is chosen when the field is filled with /api/fill-form, as described next.
What "auto" does today, as observed on this API: when a blank auto field is filled, the text is sized to the box in both directions. A long value shrinks (a long sentence in a 260 × 70 point single-line field came out at 13 points) and a short one is enlarged (Hi in a 260 × 70 point field is drawn at 60 points). That size is then saved into the field on its first fill, so if you fill the already-filled output again with a longer value, it keeps the 60-point size and the value is clipped. For predictable text, leave font_size out or set a number.
In a fixed-size field, a value longer than the box is clipped, not shrunk: a multiline field shows the lines that fit and cuts off the rest at the bottom. No characters are dropped; /api/fill-form stores a multiline value with line breaks added where it wraps. If your fillers send long text, make the box taller or set a smaller number.
Names
A name is how /api/fill-form and /api/inspect refer to the field. It is 1 to 200 characters, with no dot, no control characters and not only spaces. A dot is refused because it would make a parent field and a child field. Names must be unique within the request, and must not collide with a field already in the PDF.
Collisions are judged on the Unicode-normalised (NFC) name. A new name collides with an existing field of the same name, and with the first part of an existing dotted name: if the PDF already has form1.name, the name form1 is taken. Either returns duplicate_field. The existing form is read as /api/inspect reads it: a PDF whose form has more than 2,000 fields once yours are added is refused with too_many_fields.
Response
On success: 200 OK, Content-Type: application/pdf, body is the PDF with the new fields. Existing fields, their values and the page content are kept.
If the input had a hybrid AcroForm/XFA layer, the XFA layer is not preserved on save, and the response carries an x-pdfops-warning header that starts with xfa-layer-dropped, the same header /api/fill-form sends.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF), or its existing form could not be read well enough to extend it.
encrypted_pdf400The PDF needs a password we were not given. Send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_fields400fields is missing, not valid JSON, not a non-empty array, over 256 KB, or an entry has an unknown type, a bad name or value, a side under 4 points, bad options, a default that is too long or not allowed, or a rectangle outside the page. details names the entry and key, such as fields[2].width.
too_many_fields400More than 200 entries, more than 200 widgets in total, or the PDF's form would pass 2,000 fields.
duplicate_field400A name is used twice in the request, or already exists in the PDF.
invalid_pages400An entry's page is past the end of the document.
unsupported_characters400A text default or a dropdown option has a character the standard fonts cannot draw. details names the first one.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. Get a fresh key at /pricing.
rate_limited429The anonymous per-IP limit (100/month) or your key's monthly quota is used up. Retry-After gives seconds until next calendar month.
Example
Add a name box, a multi-line notes box and a checkbox to a one-page agreement. The checkbox is 14 points square; the notes box is 300 × 70 points.
curl -X POST https://pdfops.dev/api/add-fields \
-F "pdf=@agreement.pdf" \
-F 'fields=[
{"type":"text","name":"full_name","page":1,"x":160,"y":695,"width":240,"height":20},
{"type":"text","name":"notes","page":1,"x":160,"y":580,"width":300,"height":70,"multiline":true,"max_length":500},
{"type":"checkbox","name":"agree","page":1,"x":160,"y":518,"width":14,"height":14}
]' \
-o fillable.pdf
Keyless calls work: 100 requests per IP per month with no key. With a key, add -H "X-API-Key: pdfops_live_..." to any request here; it raises your quota to your tier's. Get a free key at pdfops.dev/pricing.
A radio group is one entry whose options each carry a rectangle. Here plan has three buttons in a row, with basic selected:
curl -X POST https://pdfops.dev/api/add-fields \
-F "pdf=@agreement.pdf" \
-F 'fields=[
{"type":"radio","name":"plan","page":1,"options":[
{"value":"basic","x":160,"y":478,"width":14,"height":14},
{"value":"pro","x":240,"y":478,"width":14,"height":14},
{"value":"team","x":320,"y":478,"width":14,"height":14}
],"default":"basic"}
]' \
-o fillable.pdf
A dropdown takes a list of strings:
curl -X POST https://pdfops.dev/api/add-fields \
-F "pdf=@agreement.pdf" \
-F 'fields=[
{"type":"dropdown","name":"country","page":1,"x":160,"y":425,"width":160,"height":20,
"options":["Canada","Germany","Poland","United States"],"default":"Canada"}
]' \
-o fillable.pdf
A signature box is an empty field with an outline, 240 × 50 points here:
curl -X POST https://pdfops.dev/api/add-fields \
-F "pdf=@agreement.pdf" \
-F 'fields=[
{"type":"signature","name":"signer","page":1,"x":160,"y":340,"width":240,"height":50}
]' \
-o fillable.pdf
Recipe: add fields, then fill them
A flat PDF has nothing for /api/fill-form to fill. Add the fields first, then fill them by name. Two calls, 2 requests:
To have the positions found for you on a flat PDF, send it to /api/detect-fields with format=pdf: one request that detects the fields drawn as lines, boxes, underscores and checkboxes, adds them and returns the fillable PDF. Review the result.
# 1. Add the fields
curl -X POST https://pdfops.dev/api/add-fields \
-F "pdf=@agreement.pdf" \
-F 'fields=[
{"type":"text","name":"full_name","page":1,"x":160,"y":695,"width":240,"height":20},
{"type":"text","name":"notes","page":1,"x":160,"y":580,"width":300,"height":70,"multiline":true},
{"type":"checkbox","name":"agree","page":1,"x":160,"y":518,"width":14,"height":14},
{"type":"radio","name":"plan","page":1,"options":[
{"value":"basic","x":160,"y":478,"width":14,"height":14},
{"value":"pro","x":240,"y":478,"width":14,"height":14},
{"value":"team","x":320,"y":478,"width":14,"height":14}
]},
{"type":"dropdown","name":"country","page":1,"x":160,"y":425,"width":160,"height":20,
"options":["Canada","Germany","Poland","United States"]},
{"type":"signature","name":"signer","page":1,"x":160,"y":340,"width":240,"height":50}
]' \
-o fillable.pdf
# 2. Fill them
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@fillable.pdf" \
-F 'fields={"full_name":"Jordan Lee","notes":"Net 30 terms.\nSecond line of notes.","agree":"true","plan":"pro","country":"Poland"}' \
-o filled.pdf
The signature box is left untouched by the fill, and the fill output keeps it as an empty field. Sending a value for it, such as "signer":"x", returns 400 unsupported_field_type. With flatten=true the empty outline is baked into the page along with every other field.
Not sure what a PDF's fields are called? /api/inspect lists the names, types and options, including the ones you just added. Signature boxes show up there as unsupported.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('agreement.pdf')], { type: 'application/pdf' }), 'agreement.pdf');
fd.append('fields', JSON.stringify([
{ type: 'text', name: 'full_name', page: 1, x: 160, y: 695, width: 240, height: 20 },
{ type: 'checkbox', name: 'agree', page: 1, x: 160, y: 518, width: 14, height: 14 },
]));
// The key is optional: send the header only when you have one.
const headers = process.env.PDFOPS_API_KEY ? { 'X-API-Key': process.env.PDFOPS_API_KEY } : {};
const res = await fetch('https://pdfops.dev/api/add-fields', { method: 'POST', headers, body: fd });
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops add-fields failed: ${err.error}: ${err.details}`);
}
await writeFile('fillable.pdf', Buffer.from(await res.arrayBuffer()));
Python — requests
import json, os, requests
fields = [
{"type": "text", "name": "full_name", "page": 1, "x": 160, "y": 695, "width": 240, "height": 20},
{"type": "checkbox", "name": "agree", "page": 1, "x": 160, "y": 518, "width": 14, "height": 14},
]
# The key is optional: send the header only when you have one.
headers = {"X-API-Key": os.environ["PDFOPS_API_KEY"]} if os.environ.get("PDFOPS_API_KEY") else {}
with open("agreement.pdf", "rb") as pdf:
res = requests.post(
"https://pdfops.dev/api/add-fields",
headers=headers,
files={"pdf": pdf},
data={"fields": json.dumps(fields)},
)
res.raise_for_status()
open("fillable.pdf", "wb").write(res.content)
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_add_fields tool, with pdf_path, fields and an optional password. The fields entries are the same objects as above, and the tool returns the PDF inline. Fill the result with pdf_fill. See PDFops for AI agents.
Behavioral notes
The signature type is an empty signature field, not an e-signature. It is a box a signing tool can later sign into. Nothing is signed here, no certificate is added, and /api/fill-form cannot fill it. For a visible signature image on the page use /api/edit; that is not a digital signature either.
The fields are standard AcroForm fields. There is no JavaScript, no calculated values and no validation script; max_length and the dropdown's option list are the only constraints.
Standard fonts only. Fields use Helvetica, and text defaults and dropdown options must be in the WinAnsi set (€, “, — and œ work; Ł and CJK characters fail). Radio option values are never drawn, so they can be any text.
Appearance. Each new field is saved with its own appearance, so a default value, a tick or a selected button shows without a viewer recalculating anything. A viewer may still redraw a field itself, so text size can differ between viewers, most in auto-sized fields. We check rendering with poppler.
The page content is not changed. Fields are added on top of the page, and fields already in the PDF are kept as they are.
The output is deterministic. The same input gives the same bytes: the modification date and producer are pinned, and an existing creation date is kept.
Limits: 4 MB per PDF, 2,000 pages, 200 fields and 200 widgets per request, 100 options per radio group or dropdown, 256 KB of fields, 2,000 fields in the finished form, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I make a PDF fillable with an API?
Send the PDF and a fields list. Each entry gives a type, a unique name, a page and a rectangle (x, y, width, height) in points from the bottom-left of the page. The response is the same PDF with standard AcroForm fields at those positions, which /api/fill-form and PDF viewers that support form filling can fill.
Does the signature field sign the document?
No. The signature type creates an empty signature field for a signing tool to use later. Nothing is signed and no certificate is added. To draw a visible signature image on the page, use /api/edit, which is also not a cryptographic signature.
How do I fill the fields I just added?
Send the output to /api/fill-form with an object that maps each field name to a string. A checkbox takes "true" or "false", a radio group takes one of the option values you created, and a dropdown takes one of its options.
Why is my long text cut off in a multiline field?
A field you create without font_size has a fixed size (12 pt, or smaller in a short box), so a value longer than the box is clipped at the bottom, not shrunk. Make the box taller or set a smaller font_size. Setting font_size to "auto" instead sizes the text when the field is first filled and then keeps that size, so a later, longer value can still be clipped.
Why was my field name rejected?
A name must be 1 to 200 characters with no dot, and it cannot match a field already in the PDF. Dots would make a parent and child field, and a name that matches the first part of an existing dotted name, such as form1 next to form1.name, is refused too. The error is duplicate_field or invalid_fields, and details names the entry.
Related: Fill form fields · Inspect a form · Stamp text and images.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/attach (PDFops API reference)
Source: https://pdfops.dev/docs/attach
Endpoint reference
POST /api/attach
Embed files in a PDF: an XML invoice, a spreadsheet, the source of a report. Each file gets a name, a MIME type, a description and a PDF/A-3 relationship. Returns the PDF as application/pdf.
A PDF can carry other files inside it. They are called attachments or embedded files. /api/attach adds them and sets the relationship value that e-invoice formats need. Listing and extracting attachments is not available in this API yet. Files you attached can be read with standard tools, for example qpdf --list-attachments file.pdf, qpdf --show-attachment=KEY file.pdf (KEY as printed by the list command), or pdfdetach -list file.pdf and pdfdetach -saveall file.pdf.
Request
Method: POST. URL: https://pdfops.dev/api/attach. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF to add to, up to 4 MB and 2,000 pages.
fileFile, repeatedYes1 to 10 files to embed, one file field each, up to 3 MB combined. The PDF and the files together must stay under 4.5 MB, Vercel's platform request limit. A text value in a file field is refused. An empty file is allowed.
optionsString (JSON array)NoSettings per file. Entry i applies to file number i. See Options. Send the field once, as text.
passwordStringNoOpens a PDF that needs a user password. The output is not encrypted.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key.
Options
Every key is optional. An unknown key is refused.
KeyTypeDefaultDescription
nameStringThe uploaded file name1 to 255 characters and at most 255 UTF-8 bytes (pdfdetach -saveall cannot write a longer file name). No / or \, no control characters, no unpaired surrogate. Must differ from every name already in the PDF and from the other files in the request.
mime_typeStringThe part's content typetype/subtype, for example text/xml. No parameters and no #. A content type on the part is used when it is valid and ignored when it is not.
descriptionStringNoneFree text stored with the file, at most 1,000 characters.
relationshipString"Unspecified"The PDF/A-3 AFRelationship: Alternative, Data, Source, Supplement or Unspecified.
Response
On success: 200 OK, Content-Type: application/pdf, body is the PDF with the files embedded. Page content, form fields and existing attachments are kept. Nothing is added unless every file is valid.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Limits
LimitValueWhen it is passed
PDF size, pages4 MB, 2,000 pagespdf_too_large, too_many_pages
Whole request4.5 MB413 request_too_large
Files per request10, 3 MB combinedtoo_many_files, files_too_large
Attachments in the PDF after the add200 distinct files with a file behind themtoo_many_attachments
Description1,000 charactersinvalid_description
Entries in the list of embedded files2,000 entries (with or without a file behind them) and 2 MB of keysname_tree_too_large
Nodes and slots visited in that list, however much is shared10,000name_tree_too_large
Reading the names already in the PDFA fixed budget that every distinct name or string read is charged against by its length: about half a second of work, thousands of 2,000-character namesattachments_too_complex
The add reads the existing names in the list of embedded files (each key and each entry's /UF and /F) to refuse a duplicate and to count what is there, so it has to read all of them, which is why these limits refuse instead of skipping. File-attachment annotations on pages and files that are only in the document's associated-files list are not read.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF), or its list of embedded files is malformed in a way an add cannot keep, such as two separate arrays that each end in a stray element.
encrypted_pdf400The PDF needs a password we were not given. Send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
missing_files400No file field.
too_many_files400More than 10 file fields.
files_too_large400The file fields total more than 3 MB.
invalid_file400A file field holds a text value, not a file upload.
invalid_options400options is repeated, is a file, is not a JSON array, has more entries than files, or an entry has an unknown key or a value that is not a string.
invalid_name400A name is empty, over 255 characters or 255 UTF-8 bytes, has /, \, a control character or an unpaired surrogate.
invalid_mime_type400A mime_type is not type/subtype (no parameters, no #).
invalid_description400A description is over 1,000 characters or has an unpaired surrogate.
invalid_relationship400A relationship is not one of the five allowed values.
duplicate_name400A name is used twice in the request, or already exists in the PDF as an entry's key or as its /UF or /F name.
too_many_attachments400The PDF's attachments plus the new files would pass 200.
name_tree_too_large400The PDF's list of embedded files has over 2,000 entries, over 10,000 nodes and slots, or over 2 MB of keys. Attach rewrites that list and will not.
attachments_too_complex400Reading the names already in the PDF needs more than the work budget, or an existing name could not be read in full (its escapes outran the scan bound), so a duplicate cannot be ruled out.
save_failed500PDF serialization failed. Retryable.
internal_error500The output came out far larger than the input plus the files, and it was discarded.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. Get a fresh key at /pricing.
rate_limited429The anonymous per-IP limit (100/month) or your key's monthly quota is used up. Retry-After gives seconds until next calendar month.
Example
Embed an XML file with the relationship Alternative:
curl -X POST https://pdfops.dev/api/attach \
-F "pdf=@invoice.pdf" \
-F "file=@invoice.xml;type=text/xml" \
-F 'options=[{"name":"invoice.xml","description":"Invoice data","relationship":"Alternative"}]' \
-o invoice-with-data.pdf
Embed two files. The first entry in options goes with the first file; the second file takes its name and type from the upload:
curl -X POST https://pdfops.dev/api/attach \
-F "pdf=@report.pdf" \
-F "file=@data.csv;type=text/csv" \
-F "file=@notes.txt;type=text/plain" \
-F 'options=[{"relationship":"Data"}]' \
-o report-with-files.pdf
Check the result with a standard tool:
qpdf --list-attachments invoice-with-data.pdf
qpdf --show-attachment=invoice.xml invoice-with-data.pdf
Keyless calls work: 100 requests per IP per month with no key. With a key, add -H "X-API-Key: pdfops_live_..." to any request here; it raises your quota to your tier's. Get a free key at pdfops.dev/pricing.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's.
JavaScript (Node.js 22+), built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('invoice.pdf')], { type: 'application/pdf' }), 'invoice.pdf');
fd.append('file', new Blob([await readFile('invoice.xml')], { type: 'text/xml' }), 'invoice.xml');
fd.append('options', JSON.stringify([{ name: 'invoice.xml', relationship: 'Alternative' }]));
// The key is optional: send the header only when you have one.
const headers = process.env.PDFOPS_API_KEY ? { 'X-API-Key': process.env.PDFOPS_API_KEY } : {};
const res = await fetch('https://pdfops.dev/api/attach', { method: 'POST', headers, body: fd });
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops attach failed: ${err.error}: ${err.details}`);
}
await writeFile('invoice-with-data.pdf', Buffer.from(await res.arrayBuffer()));
Python, requests
import json, os, requests
options = [{"name": "invoice.xml", "relationship": "Alternative"}]
# The key is optional: send the header only when you have one.
headers = {"X-API-Key": os.environ["PDFOPS_API_KEY"]} if os.environ.get("PDFOPS_API_KEY") else {}
with open("invoice.pdf", "rb") as pdf, open("invoice.xml", "rb") as xml:
res = requests.post(
"https://pdfops.dev/api/attach",
headers=headers,
files=[
("pdf", ("invoice.pdf", pdf, "application/pdf")),
("file", ("invoice.xml", xml, "text/xml")),
],
data={"options": json.dumps(options)},
)
res.raise_for_status()
open("invoice-with-data.pdf", "wb").write(res.content)
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_add_attachment tool. It takes pdf_path and files, a list of { source, name, mime_type, description, relationship } where source is an https:// URL or a data: URI, and an optional password. The name defaults to the last part of an https:// URL path. The tool returns the PDF inline. Calls count like REST calls. See Remote (hosted) MCP.
Behavioral notes
A signed PDF stops validating after an add. The whole file is saved again, which invalidates an existing digital signature. /api/inspect lists a signature field but does not say whether it is signed, so check in a PDF viewer before adding to a signed document.
The list of embedded files is rewritten, and no existing key is touched. The file is written as a standard embedded file with a file specification and added to the document's associated-files list so the relationship is visible to PDF/A-3 tools. A list that was split into several nodes becomes one flat list and a stored /Limits is dropped. Existing keys keep their bytes and order; each new key goes in before the first existing key that sorts after it, and the old list nodes that nothing else uses are removed, so many small adds do not grow the file. Entries that are not a (string key, value) pair, and one stray last element, are kept but moved to the end of the list. A name tree node or /EmbeddedFiles entry that is really a page tree, a page or the catalog is refused with invalid_pdf.
Names and keys. Each file keeps its full name in the file specification, so viewers show it as written. The key the list files it under is plain ASCII: the name itself when that is printable ASCII, otherwise the name with every other character replaced by _ and a hash of the full name before the extension. The keys come back in the x-pdfops-attachment-keys response header, a JSON array of {name, key} (the name cut to 40 characters). To extract with qpdf, use the key that qpdf --list-attachments file.pdf prints:
qpdf --list-attachments file.pdf
qpdf --show-attachment=KEY file.pdf > out.bin
pdfdetach -list file.pdf shows the real names. One limit to know about: qpdf --show-attachment finds a key by binary search on decoded text. In a PDF whose existing keys are not in that order (keys with PDFDocEncoding characters such as an en dash, a bullet or accented capitals like Ž, or UTF-16 keys that mix emoji with private-use or fullwidth characters), adding a file can make qpdf miss keys it found before, and miss the new one. qpdf --add-attachment has the same effect on such files. Every file is still in the PDF: qpdf --list-attachments and pdfdetach show and save all of them. With plain ASCII, Latin-1 or ordinary UTF-16 keys this does not happen. Some libraries (pdf-lib, PyMuPDF) show the key in place of the name; for a non-ASCII name that is the ASCII form above.
No attachment dates are written. The modification date and producer are pinned and an existing creation date is kept. Each attached file comes back byte for byte when extracted; the bytes of the PDF around it can differ between runtime versions, so do not hash the output.
What /api/attach does not do. It does not create page-level attachment annotations, does not convert a file, and does not make a PDF/A-3 document by itself: it embeds the file and sets the relationship. Whether the whole document conforms is up to its other contents.
Limits: 4 MB per PDF, 2,000 pages, 10 files and 3 MB of files per add, 200 attachments in the finished PDF, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I attach a file to a PDF with an API?
Send the PDF in a pdf field and the file in a file field to /api/attach. Optional settings (name, mime_type, description, relationship) go in an options field as a JSON array, one object per file. The response is the PDF with the file embedded. Page content, form fields and existing attachments are kept. The whole file is saved again, so a digital signature the PDF already had will no longer validate.
What does the relationship value mean?
It is the PDF/A-3 AFRelationship name that says how the file relates to the document: Alternative, Data, Source, Supplement or Unspecified. E-invoice formats such as Factur-X use Alternative for the XML invoice. The default is Unspecified.
How do I read the files I attached?
This API does not list or extract attachments yet. Standard tools do: qpdf --list-attachments and qpdf --show-attachment=KEY file.pdf (KEY as printed by the list command), or pdfdetach -list and pdfdetach -saveall file.pdf.
Why was a name refused when I added a file?
A name must be 1 to 255 characters (and at most 255 UTF-8 bytes) with no slash, backslash or control characters, and it cannot match a name already in the PDF or another file in the same request. The error is invalid_name or duplicate_name, and details names the file.
Related: Read metadata · Merge PDFs · Encrypt a PDF.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/delete-pages — PDFops API reference
Source: https://pdfops.dev/docs/delete-pages
Endpoint reference
POST /api/delete-pages
Remove pages from a PDF. The pages you list are dropped, and the rest stay in their original order. Returns the shortened PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/delete-pages. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesThe PDF to work on, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
pagesStringYesThe pages to remove, such as 2,4-6,9- (see Page lists). A page listed twice is removed once.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Page lists
The pages value is a comma list of items: N (one page), A-B (an inclusive range) or A- (page A through the last page). Pages are 1-based. Spaces around items and around the dash are ignored. last and negative numbers are not supported. A page past the end of the PDF, a reversed range, an empty item or an empty value fails with invalid_pages.
Response
On success: 200 OK, Content-Type: application/pdf, body is the PDF without the listed pages.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_pages400pages is missing, empty, malformed or out of range. details says which item failed. Pages listed more than once count once.
no_pages_left400The list would delete every page. At least one page must remain.
copy_failed500The remaining pages could not be copied. Retryable.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/delete-pages \
-F "pdf=@report.pdf" \
-F "pages=2,4-6" \
-o trimmed.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('report.pdf')], { type: 'application/pdf' }), 'report.pdf');
fd.append('pages', '2,4-6');
const res = await fetch('https://pdfops.dev/api/delete-pages', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops delete-pages failed: ${err.error}: ${err.details}`);
}
await writeFile('trimmed.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
Remaining pages keep their order. To reorder, use /api/extract-pages.
You cannot delete every page. That returns no_pages_left.
The output is deterministic. Dates are set to the Unix epoch and the producer to pdfops.dev. Pages are copied into a new document, so the AcroForm, outline and attachments do not carry over.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I delete the last pages without knowing the page count?
Use an open range: pages=9- removes page 9 through the last page. If the PDF has fewer than 9 pages the request fails with invalid_pages.
What if the list covers the whole PDF?
The request fails with no_pages_left and nothing is returned.
Related: Keep chosen pages instead · Cut one PDF into several · Rotate pages.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/detect-fields (PDFops API reference)
Source: https://pdfops.dev/docs/detect-fields
Endpoint reference
POST /api/detect-fields
Suggest fillable fields for a flat PDF. It finds the blanks that are drawn on the page as lines, boxes, underscores and checkboxes, and returns them as text and checkbox fields you can review and send to /api/add-fields.
A flat PDF has no form fields: the blanks are just drawing. This endpoint reads the page's vector drawing and text layer, and works out where a person would write. Each result has a name taken from the nearest printed label, a position, a size and a confidence from 0 to 1. It uses fixed geometry rules, not a model, so the same file always gives the same answer. It detects fields that are drawn. A blank that is only empty space, a scanned page (a picture, with no drawing or text to read), or a shaded area with no outline has nothing to detect. Treat the result as a list of suggestions to review, not a finished form.
Request
Method: POST. URL: https://pdfops.dev/api/detect-fields. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
pagesStringNoPages to analyse, 1-based: 1-3,5,8-. Default: every page, up to max_pages.
max_pagesIntegerNo1 to 100, default 40. At most this many of the selected pages are analysed; the rest are reported through nextPage and nextPages (continue as described under truncated).
min_confidenceNumberNo0 to 1, default 0.4. Fields below it are dropped. The default drops only the weakest candidates (unlabelled shapes score about 0.3 to 0.4); 0.6 gives slightly higher precision and about a quarter fewer checkboxes (see What it finds).
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
formatStringNojson (default) returns the suggestions. pdf detects and adds the fields in the same request and returns the fillable PDF; see Detect and add in one call.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/json. This is a real answer for a one-page membership form, trimmed to two of its eight fields:
{
"pages": [
{
"page": 1,
"width": 612,
"height": 792,
"fields": 8
}
],
"count": 8,
"truncated": false,
"fields": [
{
"type": "text",
"name": "Full name",
"page": 1,
"x": 115,
"y": 688,
"width": 285,
"height": 14,
"label": "Full name",
"confidence": 0.85
},
{
"type": "text",
"name": "Date of birth",
"page": 1,
"x": 130,
"y": 658,
"width": 130,
"height": 14,
"label": "Date of birth",
"confidence": 0.85
},
...
]
}
KeyDescription
countNumber of fields returned.
pages[]One entry per page returned: page, width and height in points as displayed, and fields, how many of the returned fields are on it.
fields[].typetext for a rule, a box or a run of underscores; checkbox for a small square or circle.
fields[].nameFrom the nearest printed label (for a text field: inside the box, to its left, above it or below it; for a checkbox: to its left or right), or field p1 3 style when there is none. Unique in the response, about 60 characters at most, no dot, and not the name of a field already in the PDF.
fields[].page, x, y, width, heightThe rectangle, in the frame described under Coordinates.
fields[].labelThe printed label the name came from, empty when none was found. Not an /api/add-fields key; it is ignored there.
fields[].confidence0 to 1. Higher when a label is attached and the shape is clear. Not an /api/add-fields key; it is ignored there.
truncatedtrue when the answer is incomplete: more selected pages than max_pages, more than 200 fields (the most /api/add-fields takes), or the call stopped at its time or work limit before it read every page. Pages are returned whole, except that a first page that alone has more than 200 fields returns its 200 most confident ones. Continuation, the one rule: add the returned fields to the PDF (JSON mode: POST them to /api/add-fields; format=pdf already did), then send the resulting PDF again with pages set to nextPages (X-PDFops-Next-Pages); repeat until truncated is false. Each round finds new fields only because the PDF now holds the earlier ones. Sending the original PDF again repeats the same names and is not supported.
nextPage, nextPagesOnly when truncated: nextPage is the first page not done, and nextPages is exactly the pages not done as a page spec such as 5,9 or 4-7: pages beyond max_pages, pages the call stopped before, and a page that alone was cut at 200 fields (it stays in until it yields nothing new). A sparse selection stays sparse (nextPage followed by a dash would not). Send the PDF with the fields added back with pages set to nextPages.
pagesSkippedOnly when present: pages that were not analysed. { "page": 3, "reason": "too_complex" }: the page holds more drawn shapes or text than the per-page limits (more than 3,000 rectangles, 8,000 rules of one direction or 6,000 text segments; a single line of text longer than 1,000,000 characters; or a line of underscores or dots that splits into more than 300,000 pieces across the page; the largest page of our 38-form test set had 637 rectangles and 1,414 rules); sending it again gives the same answer, so it is not in nextPages. { "page": 4, "reason": "deadline" }: the call stopped at its time or work limit (about 8 seconds of work) before reaching the page; it is in nextPages and nothing was lost.
notePresent whenever there is something to say besides the fields: nothing was found (count 0), pages were skipped, detected fields were dropped because they would not fit inside the page, or the answer is truncated, in which case it states how to continue.
No fields found is a 200 with count: 0 and a note, not an error. On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "..." }.
Coordinates
Each field is already in the frame /api/add-fields reads, which is also the frame of /api/edit and /api/find-text: PDF points, 72 to the inch, measured from the bottom-left corner of the page as a viewer shows it (after any page rotation and crop). x and y are the field's bottom-left corner. Every rectangle lies inside the page and each side is at least 4 points, so each entry is a valid element of the fields array of /api/add-fields as it is.
Detect and add in one call
Send format=pdf and the endpoint detects the fields, adds them with the same code as /api/add-fields, and returns the fillable PDF. It is one request and counts as one. pages, max_pages, min_confidence and password work as above. Nothing is reviewed in between, so use it when you will check the result afterwards, or when any suggested field is better than none. For a review step first, use the recipe below.
The examples on this page use the one-page sample form at pdfops.dev/sample-flat-form.pdf; download it first with curl -sO https://pdfops.dev/sample-flat-form.pdf.
curl -sO https://pdfops.dev/sample-flat-form.pdf
curl -s -D headers.txt -X POST https://pdfops.dev/api/detect-fields \
-H "X-API-Key: $PDFOPS_API_KEY" \
-F "pdf=@sample-flat-form.pdf" -F format=pdf -o fillable.pdf
cat headers.txt | grep -i '^x-pdfops'
x-pdfops-field-names: ["Full name","Date of birth","Address","Phone","Individual","Family","Signature","Date"]
x-pdfops-fields: 8
Then fill a field by name with /api/fill-form:
curl -s -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@fillable.pdf" -F 'fields={"Full name":"Ada Lovelace","Individual":"true"}' -o filled.pdf
On success: 200 OK, Content-Type: application/pdf, with these headers:
HeaderDescription
X-PDFops-FieldsHow many fields were added.
X-PDFops-Field-NamesTheir names as a JSON array, in page then top-to-bottom order. Cut at 4 KB: a final "..." entry means more names were added than are listed.
X-PDFops-Truncatedtrue only when something was left out. Nothing is dropped silently.
X-PDFops-Truncated-ByWith it: pages (more selected pages than max_pages), fields (more than 200 fields: whole pages after the cap are left out, and a page that alone has more than 200 keeps its 200 most confident fields), deadline (the call stopped at its time or work limit before reading every page), or several, comma separated.
X-PDFops-Next-PagesWith it: the pages not done, as a page spec (a page cut at 200 fields stays in). The returned PDF already holds the fields found; send it back with pages set to this value and repeat until X-PDFops-Truncated is absent. Names already in the PDF are never suggested again, and a field that is already there is not found a second time. The returned PDF is the input plus the new fields, so it must still fit the 4 MB upload limit to be sent back; a file near that limit cannot be continued. It answers no_fields (with truncated and nextPages in the body) when a round finds nothing new but pages are left.
X-PDFops-Pages-SkippedOnly when present: pages not analysed because they hold more drawn shapes or text than the per-page limits (too_complex). Pages stopped by the time limit are in X-PDFops-Next-Pages instead.
X-PDFops-Fields-DroppedOnly when present: how many detected fields were left out because no placement inside the page keeps both sides at the 4 pt minimum /api/add-fields accepts within 0.6 pt of where the field was detected (a bigger move means the page's boxes disagree about where the page is). The JSON answer says the same in note.
No fields found is an error here: 400 with { "error": "no_fields", "details": "..." } (the body also has truncated, nextPage and nextPages, and pagesSkipped when it applies). You never get back an unchanged PDF that looks like a result. A failed request does not count against your quota. The same errors as the JSON mode apply, plus the errors of /api/add-fields that can still occur (for example a form that is already near the 2,000-field limit).
curl -s -X POST https://pdfops.dev/api/detect-fields -F "pdf=@blank-page.pdf" -F format=pdf
{"error":"no_fields","details":"No fields were found. This looks for blanks that are drawn as lines, boxes, underscores or checkboxes; a form whose blanks are bare space or a scanned image has none to find. No PDF was produced.","truncated":false,"nextPage":null,"nextPages":null}
Recipe: detect, review, add, fill
Detect the fields, look the list over (the first jq line prints one row per field), add the ones you keep, then fill the result. Dropping or renaming entries is a one-line edit with jq:
# 1. detect (keyless calls work; add -H "X-API-Key: ..." for your quota)
curl -s -X POST https://pdfops.dev/api/detect-fields -F "pdf=@sample-flat-form.pdf" -o detected.json
jq -r '.fields[] | [.page, .type, .name, .confidence] | @tsv' detected.json
# 2. add the fields (drop the ones you do not want first, for example by confidence)
jq -c '[.fields[] | select(.confidence >= 0.6)]' detected.json > keep.json
curl -s -X POST https://pdfops.dev/api/add-fields \
-F "pdf=@sample-flat-form.pdf" -F "fields= f.confidence >= 0.6);
fd = new FormData();
fd.append('pdf', pdf, 'sample-flat-form.pdf');
fd.append('fields', JSON.stringify(keep));
const res = await fetch('https://pdfops.dev/api/add-fields', { method: 'POST', headers, body: fd });
if (!res.ok) throw new Error(`PDFops add-fields failed: ${(await res.json()).error}`);
await writeFile('fillable.pdf', Buffer.from(await res.arrayBuffer()));
Python with requests
import json, os, requests
headers = {"X-API-Key": os.environ.get("PDFOPS_API_KEY", "")} # optional
with open("sample-flat-form.pdf", "rb") as pdf:
res = requests.post("https://pdfops.dev/api/detect-fields", headers=headers, files={"pdf": pdf})
res.raise_for_status()
fields = res.json()["fields"]
# review: keep the confident ones, then add them (label and confidence are ignored)
keep = [f for f in fields if f["confidence"] >= 0.6]
with open("sample-flat-form.pdf", "rb") as pdf:
res = requests.post(
"https://pdfops.dev/api/add-fields",
headers=headers,
files={"pdf": pdf},
data={"fields": json.dumps(keep)},
)
res.raise_for_status()
open("fillable.pdf", "wb").write(res.content)
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the read-only pdf_detect_fields tool, and pdf_add_fields takes detect: true to do detect and add in one tool call (one request, the format=pdf call above). For a flat PDF with no fillable fields the pattern is: detect, review, then add and fill. Call pdf_detect_fields, drop or rename what is wrong, pass the rest to pdf_add_fields as fields, then fill the result with pdf_fill. The local server (npx -y pdfops-mcp, since 0.6.0) has the same two tools. See the MCP server page.
The clients wrap both forms: detectFields, detectFieldsPdf and makeFillable in pdfops-sdk 0.8.0 for Node; detect_fields, detect_fields_pdf and make_fillable in the Python client pdfops 0.5.0. makeFillable / make_fillable repeats the format=pdf call while the result is truncated, one metered call per round.
Behavioral notes
Read-only in JSON mode. The PDF is not changed and nothing is stored. With format=pdf you get a new PDF back; the one you sent is not changed.
Deterministic. Fixed geometry rules and no model: the same file gives the same fields every time.
Review the result. It finds fields that are drawn as lines, boxes, underscores and checkboxes, and some detections are not blanks.
Limits: 4 MB per PDF, 100 pages and 200 fields per call, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I make a flat PDF fillable with an API?
POST the PDF to https://pdfops.dev/api/detect-fields. It returns the blanks drawn on the page as text and checkbox fields with names from nearby labels. Review them, then send the ones you keep to /api/add-fields as fields.
Does it find every field on a form?
No. It finds blanks that are drawn as lines, boxes, underscores and checkboxes. It does not find a field that has nothing drawn, so review the result before relying on it. A blank that is only empty space, or a scanned page, has nothing to detect.
Does it use a model?
No. It applies fixed geometry rules to the page's drawing and text, so it is deterministic, fast (a median of 67 ms per form) and counts as one request.
Can I send the response straight to add-fields?
Yes. Each entry in fields uses the same property names and coordinate frame as the fields input of /api/add-fields. The extra keys label and confidence are ignored there.
What happens on a scanned PDF?
A scanned page is a picture, with no drawn lines and no text to read, so the answer is count: 0 with a note. There is no OCR.
Related: Add fillable fields · List form fields · Fill a form · Make a PDF fillable in the browser.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/edit — PDFops API reference
Source: https://pdfops.dev/docs/edit
Endpoint reference
POST /api/edit
Add text, a logo, a signature image, a QR code or barcode, or a stamp to exact positions on the pages of an existing PDF. Send a list of items; each one is drawn upright on the page you name, at the point you give. Returns the edited PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/edit. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
itemsString (JSON array)YesThe stamps to draw, in order: later items draw on top. Up to 100 items and 64 KB. See Items.
image fieldsFile (PNG or JPEG)Only for image itemsOne file field per image, under any name you choose; an image item points at it by that name. Up to 2 MB each and 10 distinct image fields per request. PNG images are limited by decoded size, counted across all PNGs in one request: up to 10 million pixels at 8-bit colour, with or without transparency (a 4K screenshot fits); 16-bit images up to about 7 million, or about 5.8 million with transparency. Use smaller dimensions, 8-bit colour or a JPEG, which has no such limit. Animated PNGs are not accepted.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request, however many items it draws. Check consumption with GET /api/usage.
Coordinates
Positions are in PDF points, 72 to the inch, measured from the bottom-left corner of the page as a viewer shows it. A US Letter page is 612 × 792 points and A4 is 595 × 842. If a page is rotated, or has a crop box, the origin is still the bottom-left of what you see, so you never have to undo the rotation yourself. A PDF viewer's measuring tool shows where a blank line or signature box sits; measure from the bottom edge, not the top.
Items
Every item has type, page (1-based), x and y.
Text items: "type": "text"
KeyTypeDefaultDescription
x, yNumberRequiredThe left end of the first line's baseline.
textStringRequired1 to 2,000 characters. A newline starts a new line. Standard fonts cover the Latin-1 range only; other characters fail with unsupported_characters.
sizeNumber12Font size in points, 4 to 200.
fontStringHelveticaHelvetica, Helvetica-Bold, Helvetica-Oblique, Times-Roman, Times-Bold or Courier.
colorString000000Hex colour with 3 or 6 digits, such as cc0000. A leading hash is optional.
maxWidthNumberNoneWrap words so no line is wider than this many points.
lineHeightNumber1.2Line spacing as a multiple of size, 0.5 to 5. Later lines go below the first.
rotationNumber0Degrees counter-clockwise as the viewer sees it, -360 to 360.
opacityNumber10.05 to 1.
Image items: "type": "image"
KeyTypeDefaultDescription
x, yNumberRequiredThe image's bottom-left corner.
imageStringRequiredThe name of the file field holding the PNG or JPEG. Several items can reuse one image; it is stored in the PDF once.
width, heightNumberIntrinsic sizeSize in points. Give one and the other follows the image's aspect ratio. Give neither and each pixel becomes one point.
opacityNumber10.05 to 1.
PNG transparency is kept, so a signature scanned onto a transparent background sits on the line without a white box around it.
Barcode items: "type": "barcode"
The barcode is generated from value and drawn as vector shapes, not a picture, so it stays sharp and scans at any zoom or print size. Up to 25 barcode items per request.
KeyTypeDefaultDescription
x, yNumberRequiredThe barcode's bottom-left corner.
formatStringRequired2D: qrcode, datamatrix, azteccode, pdf417. Linear: code128, code39, ean13, ean8, upca, itf14, interleaved2of5, gs1-128.
valueStringRequired1 to 3,000 characters to encode. The format's own rules apply: ean13 takes 12 or 13 digits (the check digit is added or verified), gs1-128 takes bracketed application identifiers such as (01)09506000134352(17)261231. QR codes take any text, including URLs and non-Latin characters.
width, heightNumberSee descriptionSize in points. For qrcode, datamatrix and azteccode, give one and the other keeps the shape; give neither and it is 72 points (one inch) wide. For the others, a side you leave out keeps its natural size: one point per bar module, one inch tall. Setting only height never makes bars thinner.
includeTextBooleanfalsePrint the human-readable digits under a linear barcode.
errorCorrectionStringMqrcode only: L, M, Q or H. Use H if you will print a logo over the middle.
colorString000000Bar colour as hex. Keep it dark: scanners need contrast.
backgroundStringNoneOptional hex fill behind the barcode, such as ffffff on a coloured page. No quiet zone is added, so leave a clear margin around the code.
opacityNumber10.05 to 1.
Response
On success: 200 OK, Content-Type: application/pdf, body is the edited PDF.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }. Nothing is drawn unless every item is valid.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_items400items is missing, not valid JSON, not an array, over 64 KB, or an item has an unknown type or a bad value, including a barcode value its format cannot encode (the reason is in details). details names the item index and key, such as items[2].size.
too_many_items400More than 100 items, more than 10 distinct image fields, or more than 25 barcode items.
unsupported_characters400A text item has a character the standard fonts cannot draw. details names the first one.
invalid_pages400An item's page is past the end of the document.
invalid_image400An image field is missing, not a file, over 2 MB, a PNG too large to decode (see the image fields row), an animated, truncated or corrupt PNG, or not a PNG or JPEG.
save_failed500PDF serialization failed. Retryable.
internal_error500PNG validation was unavailable on the server. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. Get a fresh key at /pricing.
rate_limited429The anonymous per-IP limit (100/month) or your key's monthly quota is used up. Retry-After gives seconds until next calendar month.
Example
Sign the last line of a one-page agreement and date it: a signature image on the line, the signer's name under it, and the date to the right.
curl -X POST https://pdfops.dev/api/edit \
-F "pdf=@agreement.pdf" \
-F "signature=@signature.png" \
-F 'items=[
{"type":"image","page":1,"x":72,"y":110,"width":160,"image":"signature"},
{"type":"text","page":1,"x":72,"y":96,"text":"Jordan Lee, Operations Lead","size":10},
{"type":"text","page":1,"x":400,"y":112,"text":"2026-11-13","size":11,"font":"Courier"}
]' \
-o signed.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('agreement.pdf')], { type: 'application/pdf' }), 'agreement.pdf');
fd.append('signature', new Blob([await readFile('signature.png')], { type: 'image/png' }), 'signature.png');
fd.append('items', JSON.stringify([
{ type: 'image', page: 1, x: 72, y: 110, width: 160, image: 'signature' },
{ type: 'text', page: 1, x: 72, y: 96, text: 'Jordan Lee, Operations Lead', size: 10 },
]));
const res = await fetch('https://pdfops.dev/api/edit', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops edit failed: ${err.error}: ${err.details}`);
}
await writeFile('signed.pdf', Buffer.from(await res.arrayBuffer()));
Python — requests
import json, os, requests
items = [
{"type": "image", "page": 1, "x": 72, "y": 110, "width": 160, "image": "signature"},
{"type": "text", "page": 1, "x": 72, "y": 96, "text": "Jordan Lee, Operations Lead", "size": 10},
]
with open("agreement.pdf", "rb") as pdf, open("signature.png", "rb") as sig:
res = requests.post(
"https://pdfops.dev/api/edit",
headers={"X-API-Key": os.environ.get("PDFOPS_API_KEY", "")}, # optional
files={"pdf": pdf, "signature": sig},
data={"items": json.dumps(items)},
)
res.raise_for_status()
open("signed.pdf", "wb").write(res.content)
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_edit tool. Each image item takes the image itself as an https:// URL or a data:image/png;base64,… URI instead of a field name, and the tool returns the edited PDF inline. See PDFops for AI agents.
Behavioral notes
Stamps are drawn on top of the page. They do not fill or change form fields; use /api/fill-form for fillable forms.
A signature image is not a digital signature. The page shows the signature, but no cryptographic signature or certificate is added.
Barcodes are generated, not read. This endpoint draws barcodes; it does not scan existing ones.
Standard fonts only. No custom fonts and no characters beyond Latin-1.
The output is deterministic. The same input gives the same bytes: the modification date and producer are pinned, and an existing creation date is kept.
Limits: 4 MB per PDF, 2 MB per image, 100 items, 10 images, 25 barcodes, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I add a signature to a PDF with an API?
Upload the signature as a PNG with a transparent background, then send an image item with the page and the point where the signature line starts, and a width in points. Add text items for the printed name and date. The result is a visible signature, not a cryptographic digital signature.
How do I find the x and y position on the page?
Coordinates are points from the bottom-left of the page as displayed, 72 to the inch. On a US Letter page (612 × 792), a line one inch from the bottom and one inch from the left is at x: 72, y: 72. A PDF viewer's measuring tool gives exact positions.
Can I put the same logo on every page?
Yes. Send one image field and one image item per page, all pointing at the same field name. The image is stored in the PDF once, so the file grows by the size of one copy.
How do I add a QR code or barcode to a PDF?
Send a barcode item with the format, the value to encode, the page and the bottom-left point, for example {"type":"barcode","page":1,"x":480,"y":40,"format":"qrcode","value":"https://example.com/invoice/1042","width":72}. No image file is needed. Twelve formats are supported, including QR, Data Matrix, Code 128, EAN-13, UPC-A and GS1-128.
Why was my text rejected with unsupported_characters?
The standard PDF fonts cover the Latin-1 range. A character outside it, such as a CJK character or an emoji, is refused. details names the first bad character.
Related: Add a diagonal watermark · Stamp page numbers · Fill form fields.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/extract-pages — PDFops API reference
Source: https://pdfops.dev/docs/extract-pages
Endpoint reference
POST /api/extract-pages
Build a new PDF from chosen pages of an input PDF. Pages come out in the order you list them, and a page can be listed more than once, so this is also the reorder tool. Returns the new PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/extract-pages. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesThe PDF to work on, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
pagesStringYesPage list such as 1-3,5,8- (see Page lists). The output has exactly these pages, in this order. 3,1,3 gives pages 3, 1, 3.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Page lists
The pages value is a comma list of items: N (one page), A-B (an inclusive range) or A- (page A through the last page). Pages are 1-based. Spaces around items and around the dash are ignored. last and negative numbers are not supported. A page past the end of the PDF, a reversed range, an empty item or an empty value fails with invalid_pages.
Response
On success: 200 OK, Content-Type: application/pdf, body is the new PDF with the selected pages.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_pages400pages is missing, empty, malformed or out of range, or selects more than 2,000 pages in total (duplicates count). details says which item failed.
copy_failed500The selected pages could not be copied. Retryable.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/extract-pages \
-F "pdf=@report.pdf" \
-F "pages=1-3,7" \
-o excerpt.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('report.pdf')], { type: 'application/pdf' }), 'report.pdf');
fd.append('pages', '1-3,7');
const res = await fetch('https://pdfops.dev/api/extract-pages', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops extract-pages failed: ${err.error}: ${err.details}`);
}
await writeFile('excerpt.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
Order and duplicates are kept. pages=3,1,3 returns three pages: 3, 1, 3.
The output is deterministic. The same input and the same pages return the same bytes. Dates are set to the Unix epoch and the producer to pdfops.dev.
Pages are copied into a new document. Page content and page size stay as they were. Document-level extras such as the AcroForm, outline and attachments do not carry over.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
Can I use this to reorder pages?
Yes. List every page in the new order: pages=3,1,2 returns page 3 first, then 1, then 2. Pages you leave out are dropped.
How do I take everything after page 5?
Use an open range: pages=5- means page 5 through the last page.
Related: Remove pages instead · Cut one PDF into several · Join PDFs.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/extract-text — PDFops API reference
Source: https://pdfops.dev/docs/extract-text
Endpoint reference
POST /api/extract-text
Get the text and tables out of a born-digital PDF: reading-order text for each page, every line with its position, and tables as rows of cells. Returns JSON, or plain text with format=text.
Born-digital means the PDF was made by software (an invoice system, a bank, a word processor, a reporting tool), so the text is stored in it. Scanned pages are pictures of text and need OCR, which this endpoint does not do; they come back empty and listed in pagesWithoutText.
Request
Method: POST. URL: https://pdfops.dev/api/extract-text. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
pagesStringNoPages to read, 1-based: 1-3,5,8-. Default: every page. At most 200 pages are returned per call.
formatStringNojson (default) or text.
tables_formatStringNojson (default), csv or xlsx. With csv, each table also carries a csv string; with xlsx, the response is one Excel workbook with a sheet per table. csv applies to format=json only and is ignored with format=text; xlsx needs format=json. See Tables as CSV and Tables as XLSX.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request, however many pages it reads. Check consumption with GET /api/usage.
Response
On success with format=json: 200 OK, Content-Type: application/json.
{
"pageCount": 1,
"pages": [
{
"page": 1,
"width": 612,
"height": 792,
"text": "INVOICE INV-1001\nDate: 2026-11-01\n...",
"lines": [
{ "text": "INVOICE", "x": 54, "y": 728, "width": 106.91, "fontSize": 26 },
{ "text": "USD 1,200.00", "x": 495.19, "y": 538, "width": 62.81, "fontSize": 10 }
],
"tables": [
{
"x": 54, "y": 478, "width": 504, "height": 95,
"rows": [
["DESCRIPTION", "QTY", "UNIT", "AMOUNT"],
["API integration work", "10", "USD 120.00", "USD 1,200.00"],
["Edge deployment", "1", "USD 450.50", "USD 450.50"]
]
}
]
}
],
"pagesWithoutText": [],
"truncated": false
}
KeyDescription
pageCountPages in the whole document, whichever ones you asked for.
pages[].textThe page's text in the order the PDF stores it, which is reading order for almost every document. Lines are joined with \n.
pages[].linesEach run of text on one baseline with no wide gap, with its position. A table row or a two-column layout gives several lines with the same y.
pages[].tablesTables found on the page: rows is an array of rows, each an array of cell strings, every row the same length. Empty cells are "".
pages[].tables[].csvOnly with tables_format=csv: the same table as CSV text. See Tables as CSV.
pagesWithoutTextRequested pages with no text layer, usually scans.
truncatedtrue when more than 200 pages were asked for or the output passed 4 million characters. pages is then the first part; ask for the rest with pages.
With format=text: 200 OK, Content-Type: text/plain, the pages' text separated by a form feed (\f), the same convention as pdftotext. A capped response carries the header X-PDFops-Truncated: true.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Coordinates
Positions are in PDF points, 72 to the inch, measured from the bottom-left corner of the page as a viewer shows it, after any rotation or crop box. x is where the text starts and y is its baseline. That is the frame /api/edit uses, so a label you find here can be written next to with one more call. width and height on each page are its displayed size.
How tables are found
Tables are detected from where the text sits, not from drawn lines, so borderless tables work. Three or more consecutive rows that each split into two or more cells, with the cells lining up in columns, make a table. Left-, right- and centre-aligned columns are all handled, and a header cell that spans two columns lands in one of them without merging them. Known limits:
A cell whose text wraps onto a second line comes back as an extra row.
Two tables side by side come back as one wider table.
Text laid out in two columns is not reported as a table, but a short two-column list of labels and values can be.
Tables as CSV
Send tables_format=csv with format=json and every table gains a csv field next to rows, which is unchanged. The string is RFC 4180 CSV: a cell is quoted when it contains a comma, a double quote, a carriage return or a line feed, quotes inside a cell are doubled, and every record, the last included, ends with \r\n. The default, tables_format=json, leaves the response as described above. With format=text the field is ignored. The csv text counts toward the response's 4 million character cap, so a very large result can stop earlier than without it.
"rows": [["DESCRIPTION", "QTY", "AMOUNT"], ["API integration work", "10", "USD 1,200.00"], ["Support, annual", "1", "=SUM(A1)"]],
"csv": "DESCRIPTION,QTY,AMOUNT\r\nAPI integration work,10,\"USD 1,200.00\"\r\n\"Support, annual\",1,=SUM(A1)\r\n"
Spreadsheet formulas. Cell values are returned exactly as found in the PDF; nothing is added or changed. A cell that begins with =, +, - or @ (or a tab or carriage return) can be run as a formula when the CSV is opened in Excel, Google Sheets or similar. If you open the file in a spreadsheet, sanitise those cells first (for example by prefixing a single quote), or import the column as text.
Tables as XLSX
Send tables_format=xlsx (with format=json, the default) and the response is one Excel workbook instead of JSON: 200 OK, Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, Content-Disposition: attachment; filename="tables.xlsx". Each table found on the pages read is one sheet, named Page 3 Table 1 (page number, then the table's order on that page), in page order. Names are at most 31 characters and unique, so Excel and Google Sheets accept them.
Every cell is text. Values are written exactly as in rows and the CSV output; nothing is converted to a number or a date, so 007 and 1E3 stay as printed. A cell that begins with =, +, - or @ is a text cell, never a formula, so opening the file cannot run anything.
Characters XML cannot hold are dropped (control characters other than tab, line feed and carriage return, and the non-characters U+FFFE and U+FFFF); everything else, emoji included, is kept. A cell over Excel's limit of 32,767 characters is cut there and the response carries X-PDFops-Cells-Truncated: true.
Same limits as JSON. At most 200 pages are read per call and the pages' output counts toward the same 4 million character cap; when either stops the read, or a workbook would pass 1,000 sheets, the file holds the tables found so far and carries X-PDFops-Truncated: true. Ask for the rest with pages. X-PDFops-Truncated-By lists which caps were hit (pages, output, sheets, columns, rows).
Excel's grid. A sheet holds at most 16,384 columns and 1,048,576 rows. Columns past 16,384 in a very wide table are dropped and the response carries X-PDFops-Truncated: true with columns in X-PDFops-Truncated-By; the row limit is a guard that the output cap keeps out of reach.
Underscore escapes are preserved. Spreadsheet files treat text like _x0041_ as an escape for one character; we write such text so it reads back exactly as it was in the PDF.
No tables is an error. If none of the pages read holds a table the answer is 400 no_tables, because a workbook cannot be empty. When the read stopped early (page or output cap) before any table turned up, the same 400 no_tables says so: its body adds truncated: true and nextPage (the page to continue from, or null), and details names the pages value to use.
The same PDF and the same pages give the same bytes.
curl -X POST https://pdfops.dev/api/extract-text \
-F "pdf=@invoice.pdf" -F "tables_format=xlsx" -o tables.xlsx
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Send it as the password form field.
decompressed_too_large400Streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_pages400pages is not a valid page spec or names a page past the end.
invalid_format400format is not json or text.
invalid_tables_format400tables_format is not json, csv or xlsx, or it is xlsx together with format=text.
no_tables400With tables_format=xlsx: no table was found on the pages read. A workbook needs at least one sheet; use tables_format=json to get the text of those pages. If the read was cut short by the page or output cap, the body also has truncated: true and nextPage, and details tells you which pages value to continue with.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. Get a fresh key at /pricing.
rate_limited429The anonymous per-IP limit (100/month) or your key's monthly quota is used up. Retry-After gives seconds until next calendar month.
Example
Pull the line items out of an invoice:
curl -X POST https://pdfops.dev/api/extract-text \
-F "pdf=@invoice.pdf" \
-H "X-API-Key: pdfops_live_..." \
| jq '.pages[0].tables[0].rows'
Plain text of pages 1 to 3, for a search index or a prompt:
curl -X POST https://pdfops.dev/api/extract-text \
-F "pdf=@report.pdf" -F "pages=1-3" -F "format=text" -o report.txt
Each table as CSV, ready to write to a file:
curl -X POST https://pdfops.dev/api/extract-text \
-F "pdf=@invoice.pdf" -F "tables_format=csv" \
| jq -r '.pages[0].tables[0].csv' > table.csv
Every table as a sheet of one workbook:
curl -X POST https://pdfops.dev/api/extract-text \
-F "pdf=@statement.pdf" -F "tables_format=xlsx" -o statement.xlsx
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Try the invoice-to-Excel walkthrough to compare a source invoice and workbook, import the n8n or Make workflow, or copy the Zapier mapping.
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('invoice.pdf')], { type: 'application/pdf' }), 'invoice.pdf');
const res = await fetch('https://pdfops.dev/api/extract-text', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops extract failed: ${err.error}: ${err.details}`);
}
const { pages } = await res.json();
for (const table of pages[0].tables) console.table(table.rows);
Python — requests
import os, requests
with open("invoice.pdf", "rb") as pdf:
res = requests.post(
"https://pdfops.dev/api/extract-text",
headers={"X-API-Key": os.environ.get("PDFOPS_API_KEY", "")}, # optional
files={"pdf": pdf},
)
res.raise_for_status()
for page in res.json()["pages"]:
print(page["text"])
for table in page["tables"]:
for row in table["rows"]:
print(" | ".join(row))
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_extract_text tool. It takes the PDF as an https:// URL or a data:application/pdf;base64,… URI, returns text and tables, and adds the positioned lines only when you set include_lines, to keep the output small. See PDFops for AI agents.
Behavioral notes
Read-only. The PDF is not changed and nothing is stored.
No OCR. Scanned pages come back empty and are listed in pagesWithoutText.
Text as stored. Characters come from the PDF's own font mappings. A PDF made without them (some older or deliberately obscured files) gives garbled text; the same file shows the same problem when you copy text from it in a viewer.
Limits: 4 MB per PDF, 200 pages and 4 million characters per response, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I extract text from a PDF with an API?
POST the PDF as the pdf field of a multipart request to https://pdfops.dev/api/extract-text. The response has one entry per page with its text in reading order, every line with its position, and any tables. Add format=text to get plain text instead, with pages separated by a form feed.
How do I extract a table from a PDF?
Call /api/extract-text and read pages[].tables. Each table has rows, an array of rows that are each an array of cell strings, plus its position on the page. Tables are found from where the text sits, so they work without ruling lines; check the output on a sample of your documents, because a cell that wraps onto a second line comes back as its own row.
Does it work on scanned PDFs?
No. A scanned page is a picture of text with no text layer, and this endpoint does not run OCR. Those pages come back with empty text and are listed in pagesWithoutText, so you can route them elsewhere.
How do I extract text from only some pages?
Send a pages field with a page spec such as 1-3,5 or 10-. Up to 200 pages come back per call; for longer documents, call again with the next range.
Can I use the positions to add something next to the text?
Yes. Line coordinates use the same frame as /api/edit: points from the bottom-left of the page as displayed, with y on the text baseline. Find the label you want, then send an /api/edit item at its x plus width to write beside it.
Related: Add text and images at a position · List form fields · Read page count and metadata.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/fill-form — PDFops API reference
Source: https://pdfops.dev/docs/fill-form
Endpoint reference
POST /api/fill-form
Fill AcroForm fields in a PDF you upload. Returns the filled PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/fill-form. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesThe PDF template containing AcroForm fields. Maximum size: 4 MB; at most 2,000 pages. The whole request (PDF plus fields) must stay under 4.5 MB, Vercel's platform request limit.
fieldsString (JSON)YesJSON object mapping field name → value. Keys are matched to AcroForm fields forgivingly (see Field matching); the exact name always works. Values are strings (see field-type mapping below). Capped at 256 KB of JSON, 500 entries, and 65,536 characters per value. In a multiline text field, a line longer than 300 characters that does not fit the field's width is wrapped with line breaks before rendering, so the stored value gains newlines; shorter lines, and lines that fit, are stored exactly as sent.
flatten"true" | "false"No (default "false")When "true", bakes the filled values into the page content and removes the AcroForm, so fields are no longer interactive or enumerable. Flattening prevents casual re-editing in viewers; it is not tamper evidence, a digital signature, access control, or regulatory compliance.
Field-type mapping
The endpoint dispatches by AcroForm field type. Each type accepts a specific shape of value in the fields JSON:
AcroForm typeJSON valueExample
PDFTextFieldstring"customer_name": "Acme Co"
PDFCheckBox"true" or "false""agreed_to_terms": "true"
PDFDropdownstring (must match an option)"country": "United States"
PDFRadioGroupstring (must match an option)"plan": "Pro"
PDFOptionListstring (must match an option)"region": "us-east-1"
PDFButtonNot supported. Returns 400 unsupported_field_type.
PDFSignatureNot supported. Returns 400 unsupported_field_type.
Field matching
Each key in fields is resolved to one AcroForm field. An exact name always wins; otherwise the normalized forms below are checked together:
TierWhat matchesExample
1. ExactThe fully qualified field name.topmostSubform[0].Page1[0].f1_01[0]
2. NormalizedThe key and the field name, Unicode-normalized (NFC) and lowercased, with only letters, digits and combining marks kept and array indices like [0] removed. So Café and Cafe are different names. Compared with the full name and with its last dotted segment.f1_01 or F1 01
2. Normalized (label)The field's alternate name (the tooltip, the /TU entry), normalized the same way. /api/inspect returns it as label.First Name
The full name, last segment and label are matched together, so a label that equals a different field's last segment is ambiguous rather than resolved by order. A key resolves only when those checks find exactly one distinct field. If they find two or more, the request fails with unknown_field and lists up to 5 candidates. Nothing is guessed. If nothing matches, unknown_field lists up to 3 similar field names as suggestions, for the first 10 unmatched keys only. Two keys that resolve to the same field fail with duplicate_field.
When any key was not an exact match, the 200 response carries an x-pdfops-field-map header: a JSON object of {"provided key": "resolved field name"} for the non-exact keys only. Non-ASCII characters are \u-escaped, and the header is cut at about 4 KB with a final "...":"" entry. A request where every key is exact does not get the header.
Response
On success: 200 OK, Content-Type: application/pdf, body is the filled PDF binary.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400No pdf field present or it wasn't a File.
missing_fields400No fields field present.
invalid_fields400fields JSON didn't decode to an object (null, array, or scalar).
invalid_fields_json400fields wasn't valid JSON.
fields_too_large400fields is over 256 KB, has more than 500 entries, or a value is longer than 65,536 characters.
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
invalid_pdf400The uploaded PDF couldn't be parsed (corrupt, not a PDF).
pdf_too_large400The pdf file is over 4 MB.
too_many_pages400The PDF has over 2,000 pages.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
no_form400The PDF has no AcroForm (no fillable fields).
unknown_field400A key matched no field, or matched two or more fields (ambiguous). details lists up to 3 suggested field names for a miss, or up to 5 candidate names for an ambiguous key. It reports at most 20 problems then "and N more", and is cut at 2,000 characters.
too_many_fields400The form has more than 2,000 distinct fields. Field matching is refused rather than run unbounded; fill a smaller form, or flatten and split it first.
duplicate_field400Two keys in fields resolve to the same AcroForm field. details names both keys and the field.
invalid_field_value400A field value was non-string. All values must be strings.
invalid_checkbox_value400A checkbox value was not "true" or "false".
unrenderable_text400A text or dropdown value contains characters the built-in font can't draw (it covers Latin-1 / WinAnsi; no emoji or CJK). details names the field.
invalid_option400A dropdown, radio group or option list value is not one of the field's options. details names the field, the value and the allowed options. Nothing is filled. Editable combo-box dropdowns accept any renderable value.
invalid_flatten_value400flatten was sent but was not "true" or "false".
unsupported_field_type400Field is a PDFButton or PDFSignature (not supported).
fill_failed400pdf-lib's field-set raised on the value, or a choice field's option list could not be read (the field is malformed).
appearance_failed500Appearance-stream regeneration failed. Retryable.
flatten_failed500Flattening raised after a successful fill (unusual field/widget structure). Retry without flatten, or send the template to contact.
save_failed500PDF serialization failed. Retryable.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap — get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After header gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After header gives seconds until next calendar month.
Example
Don't have a fillable PDF? Grab the sample invoice-template.pdf with customer_name + total fields.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled.pdf \
-H "X-API-Key: pdfops_live_..."
Walkthrough examples in the blog: invoice PDFs from Stripe webhooks (Cloudflare Workers), auto-filling a W-9 from a contractor-onboarding webhook (Vercel Edge). Broader patterns: invoice PDFs at scale and contract PDFs from onboarding flows. Filling is often the middle of a chain — /api/inspect lists the template's fields first, and /api/merge combines the filled PDF with other documents after.
Code examples
The canonical curl above translated to common stacks. All use stdlib + one widely-adopted HTTP client (httpx for Python); no PDFops-specific SDK needed because the API is plain multipart over HTTP.
Have an API key? Add an X-API-Key header to any of these requests — optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
Want the longer version — including the honest comparison with native libraries and when to use them instead? See the language guides: fill a PDF in Python, in Node.js, and in JavaScript (browser + server).
Node.js (22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const pdf = await readFile('invoice-template.pdf');
const fd = new FormData();
fd.append('pdf', new Blob([pdf], { type: 'application/pdf' }), 'invoice-template.pdf');
fd.append('fields', JSON.stringify({
customer_name: 'Acme Co',
total: '$1,250.00',
}));
const res = await fetch('https://pdfops.dev/api/fill-form', {
method: 'POST',
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops fill-form failed: ${err.error} — ${err.details}`);
}
await writeFile('filled.pdf', Buffer.from(await res.arrayBuffer()));
Python (3.10+) — httpx
import json
import httpx
with open('invoice-template.pdf', 'rb') as f:
pdf_bytes = f.read()
files = {'pdf': ('invoice-template.pdf', pdf_bytes, 'application/pdf')}
data = {'fields': json.dumps({
'customer_name': 'Acme Co',
'total': '$1,250.00',
})}
r = httpx.post('https://pdfops.dev/api/fill-form', files=files, data=data, timeout=30)
if r.status_code != 200:
err = r.json()
raise RuntimeError(f"PDFops fill-form failed: {err['error']} — {err['details']}")
with open('filled.pdf', 'wb') as f:
f.write(r.content)
Go (1.21+) — net/http + mime/multipart
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
)
func fillForm() error {
pdfBytes, err := os.ReadFile("invoice-template.pdf")
if err != nil {
return err
}
var body bytes.Buffer
w := multipart.NewWriter(&body)
part, err := w.CreateFormFile("pdf", "invoice-template.pdf")
if err != nil {
return err
}
if _, err := part.Write(pdfBytes); err != nil {
return err
}
fields, _ := json.Marshal(map[string]string{
"customer_name": "Acme Co",
"total": "$1,250.00",
})
if err := w.WriteField("fields", string(fields)); err != nil {
return err
}
w.Close()
req, err := http.NewRequest("POST", "https://pdfops.dev/api/fill-form", &body)
if err != nil {
return err
}
req.Header.Set("Content-Type", w.FormDataContentType())
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
var apiErr struct {
Error string `json:"error"`
Details string `json:"details"`
}
json.NewDecoder(resp.Body).Decode(&apiErr)
return fmt.Errorf("fill-form failed: %s — %s", apiErr.Error, apiErr.Details)
}
out, err := os.Create("filled.pdf")
if err != nil {
return err
}
defer out.Close()
_, err = io.Copy(out, resp.Body)
return err
}
Migration recipes
If you're moving from a hosted HTML→PDF API, the shape of the change is similar across all three incumbents: take your HTML template, re-author it as a PDF with AcroForm fields, then swap the SDK call for the fill-form curl. The template work is one-time per template; the per-request shape simplifies.
From DocRaptor
DocRaptor's API accepts document_content (HTML/XML) or document_url and renders the result via PrinceXML. PDFops accepts an existing AcroForm PDF and a JSON of field values. Migration: (1) Take the HTML template you were sending to DocRaptor. (2) Open it in any PDF editor (Acrobat, Mac Preview, LibreOffice Draw, or run it through weasyprint as a one-shot conversion), then save as PDF. (3) Add AcroForm fields at the positions where DocRaptor was substituting your data; name them after the keys you'll send. (4) Replace the DocRaptor SDK call with a multipart POST to /api/fill-form. The HTML template work is one-time; the request shape is now simpler (no per-request Prince render). Side-by-side at /vs/docraptor — includes the dead-changelog signal worth weighing.
From PDFShift
PDFShift renders HTML to PDF via Chromium with credit-system pricing. PDFops takes an existing AcroForm PDF + data. Migration mirrors DocRaptor: take your HTML template, save as PDF, add AcroForm fields, swap the API call. PDFShift's strengths (custom fonts, full CSS, modern HTML, image embeds) all transfer to the template-authoring step — you bake them in once at the PDF level instead of paying for them on every render. Once the template is set, you don't need Chromium per request anymore. Side-by-side at /vs/pdfshift.
From PDFMonkey
PDFMonkey uses HTML + Liquid templating with a dashboard editor. PDFops doesn't run a templating engine. Migration: (1) Rebuild each template as a PDF (Acrobat / Mac Preview / LibreOffice Draw) with AcroForm fields where Liquid variables were. (2) Move Liquid-side computed values — loops over line items, conditionals, date formatters, the barcode filter, Chart.js graphs — into your calling code's pre-processing. (3) Replace the PDFMonkey API call with the fill-form curl. If your templates lean heavily on Liquid features, PDFMonkey may still fit better — the honest framing on /vs/pdfmonkey spells out when to stay vs migrate.
Behavioral notes
Appearance streams regenerate. Every filled field gets a freshly-generated /AP/N stream using an embedded Helvetica, so the PDF renders correctly across all major viewers (Acrobat, Preview, Chrome). For PDFs that already shipped baked appearances, the regeneration is visually equivalent.
Fields are matched by exact name, then by normalized name or last segment, then by label. Only a unique match resolves. See Field matching.
Fields in the PDF that you don't send are left unchanged. Only the field names you include in the fields JSON are touched.
All values must be strings. Numbers, booleans, arrays, objects in the JSON return 400 invalid_field_value. Format on your side: String(amount.toFixed(2)), String(isAgreed), etc.
Encrypted PDFs are not supported. Decrypt server-side before upload.
FAQ
How do I find the field names in my PDF?
Fastest: drop the PDF into the free form-field inspector — it lists every field name, type, and the ready-to-fill JSON. Otherwise, open the PDF in Acrobat (Tools → Prepare Form), Mac Preview, or LibreOffice Draw; field names appear when you hover or click each field. From the command line, pdftk dump_data_fields lists all AcroForm field names. PDF authoring tools name fields automatically (e.g. Text1, CheckBox2); rename them to something predictable in code (customer_name, total) before deploying.
Why is my filled PDF rendering as empty fields in some viewers?
Older versions of /api/fill-form returned PDFs with field values set in the data layer but no /AP (appearance stream), which some viewers render as empty boxes. As of 2026-05-18 the endpoint regenerates appearance streams using an embedded Helvetica, so any AcroForm whose fields reference /Helvetica in their DA renders correctly. If you still see empty fields, the PDF's DA may reference a font we don't have embedded — reply to your key email or write hello@pdfops.dev with the template attached.
Does flatten=true make the PDF tamper-proof or compliant?
No. Flattening bakes the filled values into the page content and removes the AcroForm, so the fields can no longer be clicked, edited, or enumerated in a viewer — the document behaves like a printed page. That prevents casual re-editing and is what most workflows mean by "locking" a filled form. It does not provide tamper evidence (a determined editor can still alter the page content), digital signatures, access control, retention policy, or regulatory compliance. If you need provable integrity, apply a digital signature to the flattened output with a signing tool. Flattened output keeps the byte-determinism contract: the same template and values produce the same bytes.
What field types are supported?
Five AcroForm field types: PDFTextField, PDFCheckBox, PDFDropdown, PDFRadioGroup, PDFOptionList. PDFButton and PDFSignature are intentionally unsupported (see error unsupported_field_type).
How do I send a checkbox value?
As a string: "true" to check, "false" to uncheck. Boolean JSON values aren't accepted.
Can I create new fields?
No — /api/fill-form fills existing AcroForm fields only. Author your PDF template with the fields you need first.
What happens if I exceed the rate limit?
The middleware returns 429 Too Many Requests with a Retry-After header. 429s don't consume quota. If you're hitting the anonymous 100/IP/month cap, get a free API key at /pricing — 250 requests/month, with paid Indie (4,000) and Pro (25,000) tiers above it.
Common error: unknown_field
A fields key matched no field, or matched more than one. Exact names, normalized names, last name segments and field labels all resolve (see Field matching), so a plain typo or a different template version is the usual cause. Read details: for a miss it lists up to 3 similar field names (did you mean ...); for an ambiguous key it lists up to 5 candidates, and you should send the full field name. To audit what is in your PDF, call /api/inspect, or run pdftk yourfile.pdf dump_data_fields | grep ^FieldName. The endpoint refuses to skip unknown fields because that hides real wiring bugs.
Common error: appearance_failed
pdf-lib couldn't generate the appearance stream for one of your filled fields, usually because the field's DA (default appearance) references a font that isn't embedded in the AcroForm's DR (default resources). PDFops auto-embeds Helvetica before regenerating appearances, so this should be rare; when it fires, it usually means the template was authored in a tool that wrote a non-standard font reference (e.g., a custom corporate font with no fallback). Workaround: re-author the template in Acrobat or LibreOffice Draw, which will set the DA to /Helvetica by default. Retryable as 500 if the cause is transient.
Common error: no_form
The uploaded PDF doesn't have an AcroForm dictionary — it's a PDF you can view + print but not fill. To add fillable fields: send a flat PDF to POST /api/detect-fields with format=pdf (it finds blanks drawn as lines, boxes, underscores and checkboxes and returns the fillable PDF), use the free make-fillable tool in your browser, open in Acrobat (Tools → Prepare Form → Add fields manually), in LibreOffice Draw (Form Controls toolbar), or use pdftk to add a form layer. If you want a working sample to start from, grab the sample invoice-template.pdf — it has customer_name + total fields you can fill via the curl example above. If you're getting no_form on a PDF you authored with form fields, double-check the save format: "Save as PDF" in some tools drops the form layer; use "Save as PDF/A-2" or explicit "Preserve AcroForm" options.
Common error: invalid_field_value
One of your fields values isn't a string — the API requires every value to be a JSON string regardless of underlying type. Common offenders: numbers ("total": 1250.0 → should be "$1,250.00" after formatting), booleans ("agreed": true → should be "true" for checkboxes), and arrays/objects. Format server-side before serializing: String(amount.toFixed(2)) for currency, String(date.toISOString().slice(0,10)) for ISO dates, String(boolean) for booleans. The string-only constraint is intentional — AcroForm field values are themselves strings in the PDF spec, and accepting native JSON types would force the endpoint into stringify-with-locale-rules territory.
← All docs · PDFops home
---
# POST /api/find-text — PDFops API reference
Source: https://pdfops.dev/docs/find-text
Endpoint reference
POST /api/find-text
Search a born-digital PDF for a word, phrase or pattern and get every hit back with its page and its box in PDF points.
Born-digital means the PDF was made by software (an invoice system, a bank, a word processor), so the text is stored in it. This endpoint searches that text layer. It does not do OCR: a scanned page has no text to search, so it is searched as empty and listed in pagesWithoutText. It is the search companion to /api/extract-text, and a hit's position feeds /api/edit directly (recipe below).
Request
Method: POST. URL: https://pdfops.dev/api/find-text. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
queryStringYesThe text to find, or a pattern when regex=true. At most 200 characters. In a literal query, runs of spaces, tabs and non-breaking spaces count as one space, as they do in the line text.
regexStringNotrue or false (default). Treat query as a regular expression.
case_sensitiveStringNotrue or false (default). Matching is case-insensitive by default.
whole_wordStringNotrue or false (default). Only report a match with no letter, digit, underscore or combining mark directly before or after it, so cat is not found inside category.
pagesStringNoPages to search, 1-based: 1-3,5,8-. Default: every page. At most 200 pages are searched per call.
max_hitsIntegerNo1 to 1,000, default 100. The scan stops once more hits than this exist.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request, however many pages it searches. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/json. Searching INV-\d{4} (regex=true) in a three-page invoice file with max_hits=2, trimmed to the first hit:
{
"count": 2,
"truncated": true,
"hits": [
{
"page": 1,
"text": "INV-1001",
"line": "INVOICE INV-1001",
"x": 164.37, "y": 728, "width": 113.6, "height": 26
},
...
],
"pagesWithoutText": [],
"pagesScanned": 1,
"nextPage": 2
}
KeyDescription
countNumber of hits returned.
truncatedtrue when the scan stopped before searching every selected page: more hits than max_hits, the hit output cap, the matching work budget, more than 200 pages selected, or the pages read reaching the output cap /api/extract-text has for the same file. While nextPage is not null, continue from it. If it is null and pagesSkipped is present, hits on that page beyond max_hits were dropped and cannot be fetched; raise max_hits or narrow the query.
hits[].page1-based page number.
hits[].textThe matched text as it appears on the page (original case).
hits[].lineThe line the match is on, the same lines /api/extract-text reports. Cut to 200 characters either side of the match when longer.
hits[].line_truncatedPresent, as true, only when line was cut.
hits[].x, y, width, heightThe hit's box in PDF points; see Coordinates.
pagesWithoutTextFully searched pages with no text layer, usually scans.
pagesScannedHow many of the selected pages, in order, were searched in full. Always present.
nextPageThe first page number not fully searched, or null when the scan finished. See Resuming.
pagesSkippedOnly when present: pages given up on, as [{ "page": 7, "reason": "max_hits" }]. Reasons: max_hits, output_cap, work_budget, page_output_cap. See Limits.
linesSkippedOnly when greater than 0: lines over 10,000 characters, which are not searched.
A PDF with no text layer returns count: 0 and the page numbers in pagesWithoutText. On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Coordinates
The box is in the same frame as lines on /api/extract-text and as /api/edit: PDF points, 72 to the inch, measured from the bottom-left corner of the page as a viewer shows it, after any rotation or crop box. x and width are the matched text itself, not the whole line. y is the text baseline and height is the font size, so the box spans y to y + height upward. Hits on rotated (non-horizontal) text are not found; a page whose /Rotate makes the text read upright counts as horizontal and works.
Recipe: stamp at a hit
Find the text, then send an /api/edit item at the hit. This writes <- check just after the amount USD 450.50:
# 1. find it, keep the first hit
HIT=$(curl -s -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F "query=USD 450.50" -F "pages=1" | jq '.hits[0]')
# {"page":1,"text":"USD 450.50","x":480,"y":570,"width":54.47,"height":10, ...}
# 2. stamp 8 points to the right of it, on the same baseline, at the same size
ITEMS=$(echo "$HIT" | jq -c '[{type:"text", page:.page, x:(.x + .width + 8), y:.y, size:.height, text:"
To put text above the hit instead, use y + height (plus a little air); to put it before, use x minus the stamp's width. /api/edit text items are WinAnsi only and have no rectangle item, so this marks a hit with text or an image rather than a highlight.
Regular expressions
With regex=true, query is a pattern in a subset of JavaScript syntax, matched case-insensitively unless case_sensitive=true. Your pattern is not run on a backtracking regex engine, so no pattern can make the search slow by backtracking; the matching work per request is capped (see Limits), and a pattern that is too large is rejected.
Supported:
Literal characters, and these escapes: \. \\ \/ \^ \$ \* \+ \? \( \) \[ \] \{ \} \|, \n \r \t \v \f \0, \xHH, \uHHHH, \u{H...}, \cX.
. (any character except a line break), classes [...] and [^...] with ranges, and \d \w \s \D \W \S (inside classes too).
Word boundaries \b and \B; line anchors ^ and $ (matching is per line).
Groups ( ) and (?: ) (neither captures anything), and alternation |.
Quantifiers ? * + {m} {m,} {m,n} and their lazy forms (*?, {m,n}?, and so on). Repeat counts are capped at 1,000, and nesting of repeats that can match nothing at 4 levels.
Matching follows JavaScript's u-flag rules: the leftmost match wins, then the usual priority order. Matches of zero length are never reported.
Rejected with 400 invalid_regex and a message naming the construct: backreferences (\1, \k), lookahead ((?=, (?!), lookbehind ((?<=, (?- (intersect that with your own page filter if you have one) and you continue with no page gaps and no repeated hits. Repeat until nextPage is null.
One case cannot be resumed: if a single page holds more hits than max_hits, the response has truncated: true but nextPage is null (when that page is the last one searched) and the page is listed in pagesSkipped with reason max_hits. Do not send pages=null-. Raise max_hits or narrow the query instead (see the example below).
Limits
Hits: max_hits up to 1,000 (default 100). The hits in one response are also capped at about 1 million characters of JSON.
Pages: 200 pages searched per call, and no more pages than /api/extract-text would return for the same file (its 4 million character output cap). Continue with nextPage.
Matching work budget: each request gets a fixed amount of matching work, 50 million steps, shared by all its pages. When it is spent the scan stops and returns truncated: true. Spending all of it took about a second on the slowest pattern shape on our test machine (0.65 to 1.2 s over 7 runs); we have not measured it on the deployed runtime. On our sample documents a whole search, parsing included, took 150 to 390 ms.
Long lines: a line over 10,000 characters is not searched. The count is reported in linesSkipped.
Query: 200 characters.
First page trips a limit: a page that stops the scan is normally dropped from the response and retried first next time. If it is the first page of the request, retrying would stop at the same place, so its hits so far are kept, it is listed in pagesSkipped with the reason, and nextPage moves past it.
Known limits
Hits beyond max_hits on a single page cannot be retrieved by any request: there is no offset inside a page. The page is listed in pagesSkipped.
A match never spans lines. A phrase that wraps onto the next line, or crosses a wide gap between columns or table cells, is not found, because a "line" is one baseline segment split at wide gaps, as in /api/extract-text.
Horizontal text only; rotated text is ignored.
Inside a run of mixed left-to-right and right-to-left text, the box of a hit can be mirrored (it lands on the wrong side of the run). Phrases in right-to-left scripts are matched in visual order, not reading order.
Inside a longer run of text, a hit's box is estimated from character-width weights, so it can be off by several points. Measured on our fixtures (Helvetica, 10 and 26 pt): the left edge was off by 0 to 4.5 pt (4.5 pt is about one character at 10 pt) and the width by up to 5.9 pt. A hit that covers a whole run, and a box edge at the start or end of a run, are exact.
Text comes from the PDF's own font mappings, so a PDF made without them gives garbled text and nothing matches what you see.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
missing_query400query is absent or empty.
query_too_long400query is over 200 characters.
invalid_regex400With regex=true: the pattern is invalid or uses an unsupported construct. details names it.
invalid_parameter400regex, case_sensitive or whole_word is not true or false, or max_hits is not an integer from 1 to 1,000.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Send it as the password form field.
decompressed_too_large400Streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_pages400pages is not a valid page spec or names a page past the end.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. Get a fresh key at /pricing.
rate_limited429The anonymous per-IP limit (100/month) or your key's monthly quota is used up. Retry-After gives seconds until next calendar month.
Examples
The outputs below are real, from a three-page invoice file (invoices.pdf), trimmed to the useful keys. Literal search, case-insensitive:
curl -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F "query=payment" \
-H "X-API-Key: pdfops_live_..."
{"count":6,"truncated":false,"hits":[
{"page":1,"text":"Payment","x":54,"y":700,"width":37.98,"height":10,"line":"Payment due: 2026-12-01"},
{"page":1,"text":"payment","x":223.36,"y":680,"width":36.35,"height":10,"line":"Please reference INV-1001 with your payment. Invoice total below."},
...],"pagesWithoutText":[],"pagesScanned":3,"nextPage":null}
Whole words only, on page 1. invoice matches INVOICE and Invoice as words:
curl -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F "query=invoice" -F "whole_word=true" -F "pages=1"
{"count":2,"truncated":false,"hits":[
{"page":1,"text":"INVOICE","x":54,"y":728,"width":103.08,"height":26,"line":"INVOICE INV-1001"},
{"page":1,"text":"Invoice","x":265.32,"y":680,"width":30.64,"height":10,"line":"Please reference INV-1001 with your payment. Invoice total below."}
],"pagesWithoutText":[],"pagesScanned":1,"nextPage":null}
Every invoice number on pages 1 and 2, by pattern (use single quotes so the shell leaves the backslash alone):
curl -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F 'query=INV-\d{4}' -F "regex=true" -F "pages=1-2" \
| jq -c '.hits[] | [.page, .text, .y]'
[1,"INV-1001",728]
[1,"INV-1001",680]
[2,"INV-1002",728]
[2,"INV-1002",680]
A page range, from page 2 to the end:
curl -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F "query=Edge deployment" -F "pages=2-" \
| jq -c '{count, pagesScanned, nextPage, pages: [.hits[].page]}'
{"count":2,"pagesScanned":2,"nextPage":null,"pages":[2,3]}
Resuming. With max_hits=2 the first call stops after page 1 and says where to continue:
curl -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F 'query=INV-\d{4}' -F "regex=true" -F "max_hits=2" \
| jq -c '{count, truncated, pagesScanned, nextPage}'
{"count":2,"truncated":true,"pagesScanned":1,"nextPage":2}
Repeat with pages=2- (the nextPage value followed by a dash):
curl -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F 'query=INV-\d{4}' -F "regex=true" -F "max_hits=2" -F "pages=2-" \
| jq -c '{count, truncated, pagesScanned, nextPage, hits: [.hits[] | [.page, .text]]}'
{"count":2,"truncated":true,"pagesScanned":1,"nextPage":3,"hits":[[2,"INV-1002"],[2,"INV-1002"]]}
Truncated with no nextPage: one page with more hits than max_hits (here max_hits=1, two matches on page 1). The extra hit is not retrievable by resuming:
curl -X POST https://pdfops.dev/api/find-text \
-F "pdf=@invoices.pdf" -F 'query=INV-\d{4}' -F "regex=true" -F "pages=1" -F "max_hits=1"
{"count":1,"truncated":true,"hits":[
{"page":1,"text":"INV-1001","x":164.37,"y":728,"width":113.6,"height":26,"line":"INVOICE INV-1001"}
],"pagesWithoutText":[],"pagesScanned":0,"nextPage":null,"pagesSkipped":[{"page":1,"reason":"max_hits"}]}
An unsupported pattern, (a)\1 with regex=true:
{"error":"invalid_regex","details":"\"query\" is not a supported regular expression: backreferences are not supported"}
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile } from 'node:fs/promises';
const pdf = new Blob([await readFile('invoices.pdf')], { type: 'application/pdf' });
const headers = {};
if (process.env.PDFOPS_API_KEY) headers['X-API-Key'] = process.env.PDFOPS_API_KEY; // optional
const hits = [];
let pages = null; // null = all pages
do {
const fd = new FormData();
fd.append('pdf', pdf, 'invoices.pdf');
fd.append('query', 'INV-\\d{4}');
fd.append('regex', 'true');
if (pages) fd.append('pages', pages);
const res = await fetch('https://pdfops.dev/api/find-text', {
method: 'POST',
headers,
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops find failed: ${err.error}: ${err.details}`);
}
const body = await res.json();
hits.push(...body.hits);
pages = body.nextPage ? `${body.nextPage}-` : null;
} while (pages);
console.log(hits.map((h) => `${h.page}: ${h.text}`));
Python — requests
import os, requests
hits, pages = [], None # None = all pages
while True:
data = {"query": r"INV-\d{4}", "regex": "true"}
if pages:
data["pages"] = pages
with open("invoices.pdf", "rb") as pdf:
res = requests.post(
"https://pdfops.dev/api/find-text",
headers={"X-API-Key": os.environ.get("PDFOPS_API_KEY", "")}, # optional
files={"pdf": pdf},
data=data,
)
res.raise_for_status()
body = res.json()
hits += body["hits"]
if body["nextPage"] is None:
break
pages = f"{body['nextPage']}-"
for h in hits:
print(h["page"], h["text"], h["x"], h["y"])
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_find_text tool. It takes the PDF as an https:// URL or a data:application/pdf;base64,… URI and the same search options in snake_case, and returns next_page for resuming. See PDFops for AI agents.
Behavioral notes
Read-only. The PDF is not changed and nothing is stored.
No OCR. Scanned pages have no text layer; they are reported in pagesWithoutText.
One line at a time. Matches never span lines; see Limits.
Limits: 4 MB per PDF, 200 pages, 200 query characters and 1,000 hits per call, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I search a PDF for text with an API?
POST the PDF as the pdf field of a multipart request to https://pdfops.dev/api/find-text, with the text in query. The response lists every hit with its page number, the matched text, the line it is on, and a box in PDF points. Add regex=true to treat query as a pattern, whole_word=true to skip matches inside longer words, and pages to limit the search.
Can I search a PDF with a regular expression?
Yes, with regex=true. It accepts a documented subset of JavaScript regular expression syntax: literals, character classes, dot, anchors, word boundaries, groups, alternation and the usual quantifiers, including lazy ones. Backreferences, lookahead, lookbehind, named groups, Unicode property escapes and inline flags are rejected with 400 invalid_regex. Matching is case-insensitive unless you send case_sensitive=true.
How do I mark or stamp where the text was found?
Each hit has x, y, width and height in the same frame as /api/edit: points from the bottom-left of the page as displayed, with y on the text baseline. Send an /api/edit text item at x plus width, and the same y, to write beside the hit.
Does it find text in scanned PDFs?
No. A scanned page is a picture of text with no text layer, and this endpoint does not run OCR. Such pages are searched as empty and listed in pagesWithoutText, so you can route them elsewhere.
What if there are more hits than fit in one response?
The response carries truncated: true and nextPage, the first page not fully searched. While nextPage is not null, repeat the request with pages set to that page followed by a dash, such as 4-, and you continue with no gaps and no repeated hits. If truncated is true but nextPage is null, a single page holds more hits than max_hits (it is listed in pagesSkipped): the extra hits on that page cannot be retrieved, so raise max_hits or narrow the query.
Related: Extract text and tables · Add text and images at a position · List form fields.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/html-to-pdf | PDFops API reference
Source: https://pdfops.dev/docs/html-to-pdf
Endpoint reference
POST /api/html-to-pdf
Turn an HTML string into a PDF. A headless browser lays it out, so CSS, images and web fonts come out as they do in a browser print. Returns application/pdf.
What it does not do. It takes HTML text only: there is no URL input, and it never opens a page you point it at. JavaScript is switched off, so scripts do not run and a page that builds itself with JavaScript renders empty. External resources load over https from public hosts only (an http:// URL is upgraded to https by the browser); file:, private or internal addresses and redirects to them are blocked. The PDF is untagged (no accessibility tags or outline), and it makes no PDF/A and no form fields. Frames, iframes, objects, embeds, audio and video are not rendered, and AVIF images are not accepted.
Request
Method: POST. URL: https://pdfops.dev/api/html-to-pdf. Body: application/json, or multipart/form-data where html may be a text field or a file. Up to 4.5 MB per request; html itself is capped lower (below). In JSON, numbers and booleans must be JSON numbers and booleans, not strings. In multipart they are sent as text (true, 0.8, and margin as a number or as JSON).
FieldTypeRequiredDescription
htmlStringYesThe document, a full page or a fragment, up to 1 MB of UTF-8. Must not be blank.
page_sizeStringNoletter (default, 612 x 792 pt) or a4 (595 x 842 pt). Every CSS @page rule is removed; this field decides.
landscapeBooleanNoLandscape orientation. Default false.
marginNumber or objectNoPage margin in points, 0 to 144. A number applies to all four sides; an object takes top, right, bottom, left and leaves the sides you omit at the default. Default 36 (0.5 inch) on every side.
print_backgroundBooleanNoPrint background colors and images. Default true.
scaleNumberNoScale of the page content, 0.1 to 2. Default 1.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 5 requests, because rendering costs more than a plain PDF operation. So 100 anonymous requests are 20 renders and a free key's 250 are 50. Once your request reaches the renderer, every outcome is charged. A render that ran, successful or not, counts 5 requests. A refusal the renderer makes before it starts a browser, and only when the analysis took under 250 milliseconds of CPU (html_too_large, html_too_complex for a structure cap, image_too_large for an inline image), counts 1 request. A document that takes long to analyse counts 5. Counting nothing is reserved for a request the API itself rejects before calling the renderer (invalid JSON, a missing html, a bad parameter, html over its size) and a 503 where the renderer was busy, rejected the call, lost its own browser or never answered. A call that would take you past your limit returns 429 rate_limited instead of running. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/pdf, the PDF as the body, plus two headers: x-pdfops-pages (pages in the PDF) and x-pdfops-blocked-requests (external requests our network policy refused or that failed, plus elements removed before rendering such as frames, scripts and preload or prefetch hints; a request the browser refuses on its own, such as a file: URL, is not counted). The page carries no PDFops footer. Nothing is stored: the document is rendered for the response and not kept.
On any failure: 4xx or 5xx, Content-Type: application/json, body is { "error": "", "details": "" }.
Images, fonts and external resources
data: URLs work for images, fonts and stylesheets, in HTML attributes (src, srcset, background, inline SVG href, stylesheet links) and in CSS (url(), including inside custom properties such as --bg, image-set(), @import). Each one is decoded and checked before the browser sees it. They count toward the html size cap, and at most 300 distinct ones are allowed (identical content counts once). CSS escapes in identifiers around url() (@\69mport, \69mage-set() are understood; an unquoted url() whose own name is escaped (\75rl(data:...)) is not, and that image does not render.
https to a public host works for images, stylesheets and web fonts (for example Google Fonts), on the default port 443: up to 50 requests per document, 40 MB in total, 8 MB for any one file, 500,000 bytes of stylesheets in total. Each file has 8 seconds from start to finish (a slow trickle does not extend it), and all fetching ends with the 15 second render deadline. Compressed (Content-Encoding) responses are refused. A redirect is passed to the browser, which follows it for at most 5 hops; each hop is checked again and counts as a request, and relative URLs in a redirected stylesheet resolve against its final address.
http:// URLs: an http:// image in your HTML is upgraded to https:// by the browser before the request and then follows the https rules above (it is blocked if the host does not answer on https). An http:// stylesheet is removed and counted in x-pdfops-blocked-requests. An http:// @import or font is never loaded and is not counted. Nothing is ever fetched over plain http.
Blocked and skipped: file:, blob:, ftp:, WebSocket and any other scheme; a non-default port; a URL with a username or password; a host that is an address on a private, loopback, link-local (including 169.254.169.254), shared-address or multicast range, or a name that resolves to one. A blocked request is dropped, the rest of the page still renders, and x-pdfops-blocked-requests counts it.
Images: the type is read from the file itself, not from its declared type, and for an image request only bytes that pass the checks are served. Supported: PNG, JPEG (baseline, extended, progressive), GIF, WebP and simple SVG. Not supported: animated PNG, AVIF and HEIF, BMP, ICO and TIFF, a GIF or WebP with more than 20 frames, the SVG features listed below, and colour-bitmap and SVG fonts. The checks are strict: the file must be in a plain canonical form (for a JPEG only ordinary header segments before the frame, with fill bytes allowed before a marker; for a GIF every frame inside the logical screen; for a PNG no hidden animation chunk), and anything else is refused, not repaired. Refused images fail the request with 400 unsupported_image (a type or structure that is not accepted) or 400 image_too_large (a size cap), and the message names the image: its order of appearance and the first 40 characters of its URL. What a refusal costs: a refusal found in an inline data: image is decided before a browser starts and counts 1 request; the same refusal for a fetched https image is found after the browser has started and counts 5 requests. If you are unsure whether an image is accepted, inline it as a data: URI, or use PNG or JPEG. The same data: URI used many times (a logo repeated in a table) is one image and is checked and counted once. Images are limited to 16 megapixels each and 96 megapixels in all, counted for every image response served (a GIF is counted by its logical screen, animated images up to four frames); a missing image is skipped, not fatal (every HTTP status is handled: 2xx with a body is content, anything else, including odd codes such as 299 or 520, is missing and answered at once): any non-2xx status (whatever its body: a 404 that carries AVIF bytes is still a 404), a 204, an empty body, or bytes that are not a supported image type (a tracking pixel, a soft-404 HTML page) do not render and are counted in x-pdfops-blocked-requests. The request fails only for bytes that are an image: over a size cap (image_too_large) or in a format or structure that is not accepted (unsupported_image). SVG images are simplified: scripts, Invoice 1042 Thank you.
", "page_size": "a4"}' \
-o invoice.pdf
An HTML file, landscape, with a 20 point margin, as multipart:
curl -X POST https://pdfops.dev/api/html-to-pdf \
-F "html=@report.html;type=text/html" \
-F "landscape=true" \
-F "margin=20" \
-o report.pdf
Keyless calls work: 100 requests per IP per month with no key, which is 20 renders (or, at 1 request each, 96 refusals: a call needs 5 requests free to start).
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+), built-in fetch
import { writeFile } from 'node:fs/promises';
const headers = { 'Content-Type': 'application/json' };
if (process.env.PDFOPS_API_KEY) headers['X-API-Key'] = process.env.PDFOPS_API_KEY; // optional
const res = await fetch('https://pdfops.dev/api/html-to-pdf', {
method: 'POST',
headers,
body: JSON.stringify({
html: 'Hello Rendered by a browser.
',
page_size: 'a4',
margin: 48,
}),
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops html-to-pdf failed: ${err.error}: ${err.details}`);
}
await writeFile('hello.pdf', Buffer.from(await res.arrayBuffer()));
Python, requests
import os, requests
headers = {}
if os.environ.get("PDFOPS_API_KEY"):
headers["X-API-Key"] = os.environ["PDFOPS_API_KEY"] # optional
res = requests.post(
"https://pdfops.dev/api/html-to-pdf",
headers=headers,
json={
"html": "Hello Rendered by a browser.
",
"page_size": "a4",
"margin": 48,
},
)
res.raise_for_status()
with open("hello.pdf", "wb") as f:
f.write(res.content)
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_html_to_pdf tool. It takes the same fields (margin as a single number) and returns the PDF inline as an application/pdf resource. Each call costs 5 requests of quota there too. See PDFops for AI agents.
Behavioral notes
HTML only, no scripts. No URL input and no JavaScript. External resources are https only and public hosts only.
Isolated. Rendering runs in a separate service that holds none of your keys or data and accepts only signed requests from the PDFops API.
Not byte-identical. The PDF carries the browser's own metadata, and two renders of the same HTML can differ in bytes. For a deterministic generator use /api/text-to-pdf or /api/invoice.
Nothing is stored. The HTML and the PDF are not kept.
Failed renders count. Once the renderer is reached every outcome counts 5 requests, except a refusal before a browser starts (1 request), a busy or unreachable renderer, a browser that died on its own, and your own validation errors (including html_too_large).
One render at a time. Each render has its own instance, so a heavy document cannot slow or break another caller's.
Limits: 1 MB of HTML, 50 pages, 16,000,000 bytes out, 50 external requests, 15 seconds, 16 megapixels per image.
FAQ
How do I convert HTML to PDF with an API?
POST a JSON body with an html field to https://pdfops.dev/api/html-to-pdf. The response is the PDF. Set page_size, landscape, margin, print_background and scale to change the page.
Can I send a URL instead of HTML?
No. The endpoint takes HTML text only. It never opens a page you point it at. Fetch the page yourself and send its HTML, with images inlined as data URIs or served over https.
Does it run JavaScript?
No. Scripts are switched off, so a page that builds itself with JavaScript renders empty or incomplete. Send HTML that is already complete.
Which external resources load?
Images, stylesheets and fonts over https from public hosts, up to 50 requests and 40 MB in total, and data: images, fonts and stylesheets. Everything else is blocked and skipped: http, file, addresses on private or internal networks, and redirects to them. The PDF is still made, and the x-pdfops-blocked-requests header says how many were skipped.
How much quota does a call use?
A render counts 5 requests, because rendering costs more than a plain PDF operation. Once the renderer is reached every outcome counts, failures included: 5 requests, or 1 for a cheap refusal before a browser starts. Only the API's own validation errors (including html_too_large), a busy, rejecting or unreachable renderer, and a browser that died on its own count nothing.
Related: Markdown, text or CSV to PDF · Generate an invoice PDF · Stamp text on a PDF.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/image-to-pdf: PDFops API reference
Source: https://pdfops.dev/docs/image-to-pdf
Endpoint reference
POST /api/image-to-pdf
Turn one or more JPG or PNG images into a single PDF, one image per page, in the order you send them. Pages match the image size or a standard A4 or Letter page. Returns application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/image-to-pdf. Body: multipart/form-data.
FieldTypeRequiredDescription
pdf (repeated)File (JPG or PNG)Yes, 1 to 100An image file, up to 4 MB each; all files together must stay under 4.5 MB, Vercel's platform request limit. Repeat the field name pdf for each image, the same field name /api/merge uses. Pages follow the order of the fields. image is accepted as an alias when the request has no pdf field.
page_sizeStringNofit (default), a4 or letter. See Pages.
orientationStringNoauto (default), portrait or landscape. Used for a4 and letter; ignored for fit. auto picks landscape for an image wider than it is tall, per image.
marginNumberNoPoints (72 to the inch), 0 to 200. Default 0 for fit, 36 for a4 and letter.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request, however many images it holds. Check consumption with GET /api/usage.
Which files count as images
The type comes from the first bytes of each file, never from the file name or the Content-Type of the part. A file that starts with JPEG or PNG signature bytes is an image; anything else, including a PDF, returns unsupported_image_format. /api/merge reads its inputs the same way, with one exception that keeps old merges working: a file that starts with JPEG or PNG bytes but also contains a %PDF- header and loads as a PDF (a PDF with junk in front) is merged as a PDF.
JPEG: baseline and progressive, grey, RGB and CMYK. CMYK support is for Adobe-style CMYK JPEGs, the kind Photoshop and cameras write; other CMYK files may show inverted colours. Lossless, arithmetic-coded, hierarchical and 12-bit JPEGs return invalid_image. So does a JPEG with more than 1,000 segments in front of the image, a second frame header, or no image data (real files have a few dozen segments at most). A JPEG is embedded as it is, without re-encoding, so the image quality is unchanged. The file must reach its end-of-image marker (a file that was cut short is refused with invalid_image); bytes after that marker, such as the video in an Android motion photo or a second picture, are allowed and ignored. EXIF orientation 2 to 8 is applied (read from the first Exif block, as a SHORT or LONG value) by flipping or rotating the image on the page; for orientations 5 to 8 the page width and height are swapped.
PNG: grey, RGB, palette, grey with alpha and RGBA, at any bit depth PNG allows, interlaced or not. Transparency is kept. Animated PNGs return invalid_image. The file is checked and rebuilt before it is used, so extra chunks (text, colour profile) are dropped and bytes after the end of the PNG are ignored. PNG orientation data is not read.
Pages
page_sizePageImage placement
fitThe size of the image with 1 pixel = 1 point, plus margin on every side. If the long side would pass 5,000 points, the page is scaled down to 5,000. A page whose short side would be under 3 points is made 3 points (a 2 × 2 pixel image gives a 3 × 3 point page).Fills the page inside the margin.
a4595.28 × 841.89 points, portrait or landscape by orientation.Centred, scaled down to fit inside the margin with its aspect ratio kept, never enlarged.
letter612 × 792 points, portrait or landscape by orientation.Same as a4.
A sliver such as 1 × 5,000 pixels cannot make a valid fit page and returns image_aspect_ratio; use a4 or letter, add a margin, or crop it. A margin of 200 points leaves a positive drawing area on A4 and Letter, so there is no margin that fails for being too large, and a margin over 200 returns invalid_parameter.
Limits
LimitValueError code
Images per request100too_many_images
Size of one file4 MBpdf_too_large
Whole request4.5 MBrequest_too_large (413)
PNG size10 million pixels, and a memory estimate of 320 MiB for one PNG (8-bit RGB or RGBA fits up to the pixel limit; 16-bit RGBA fits up to about 5.8 million pixels)image_too_large
PNG memory across the requestThe memory estimates of all PNGs in one request add up to at most 300 MiB. JPEGs are not counted. See What fits in one request.images_too_large_together
JPEG size250 million pixels (read from the file header, before anything is embedded)image_too_large
Fit page, long side5,000 points; larger images are scaled down, not refusedNone
Fit page, short sideAt least 3 points; tiny images are enlarged, slivers are refusedimage_aspect_ratio
Margin0 to 200 pointsinvalid_parameter
JPEG files are embedded as they are, so the cost of a JPEG is its file size, not its pixel count: on our servers' runtime, embedding 12, 48, 100 and 200 megapixel JPEGs took 1 to 3 MiB of extra memory and about 10 ms each. The JPEG limit exists to refuse files that claim an absurd size (a header can claim 65,535 × 65,535 pixels), not to save memory. It covers 200 megapixel phone sensors. The 4 MB file limit still applies to every file, so a very large photo may need to be saved at a lower quality.
What fits in one request
Every PNG is checked and rebuilt before use, which costs memory, so PNGs in one request share a memory budget. The estimate depends on the pixel count and the colour type, so it is not a count of images. Approximate numbers for 8-bit PNGs in one request:
PNG sizeRGB (no alpha)RGBA (with alpha)
1920 × 108064
2560 × 144032
3840 × 2160 (4K)11
A 16-bit PNG costs more: one 4K 16-bit RGB PNG does not fit at all. JPEGs are not subject to this budget, so a request of any number of JPEGs up to the other limits works. When a request is too big, send the images in several requests (one 4K PNG each) and join the resulting PDFs with /api/merge, which takes PDFs and images. A PNG saved as a JPEG also avoids the limit.
Response
On success: 200 OK, Content-Type: application/pdf, body is the PDF binary, one page per image.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }. For a problem with one image, details starts with pdf[N]:, where N is the 0-based position of the file in the request.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_images400The request has no pdf (or image) file field.
too_many_images400More than 100 image files in the request. Chain calls for more.
pdf_too_large400One file is over 4 MB. The name is shared with the PDF endpoints.
unsupported_image_format400A file does not start with JPEG or PNG signature bytes. details names the index and says: Supported formats: JPG, PNG.
invalid_image400The image is corrupt or truncated, is an animated PNG, has a malformed or unsupported JPEG header (lossless, arithmetic, 12-bit) or no end-of-image marker, or has image data that cannot be decoded.
image_too_large400One image is over the pixel or memory limit in Limits.
images_too_large_together400The PNGs in the request are too large to process together. See What fits in one request: split the request, then join the PDFs with /api/merge.
image_aspect_ratio400A fit page for this image would have a short side under 3 points even after enlarging it.
invalid_parameter400page_size, orientation or margin is not one of the allowed values.
internal_error500The PNG check could not run in this environment. Retryable.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. Get a fresh key at /pricing.
rate_limited429The anonymous per-IP limit (100/month) or your key's monthly quota is used up. Retry-After gives seconds until next calendar month.
Example
Three photos into one PDF, each page the size of its image:
curl -X POST https://pdfops.dev/api/image-to-pdf \
-F "pdf=@page1.jpg" \
-F "pdf=@page2.jpg" \
-F "pdf=@scan.png" \
-o photos.pdf
The same images on A4 pages with a 36 point margin, landscape or portrait chosen per image:
curl -X POST https://pdfops.dev/api/image-to-pdf \
-F "pdf=@page1.jpg" \
-F "pdf=@page2.jpg" \
-F "page_size=a4" \
-o photos-a4.pdf
Keyless calls work: 100 requests per IP per month with no key. With a key, add -H "X-API-Key: pdfops_live_..." to any request here; it raises your quota to your tier's. Get a free key at pdfops.dev/pricing.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
for (const name of ['page1.jpg', 'page2.jpg', 'scan.png']) {
fd.append('pdf', new Blob([await readFile(name)]), name);
}
fd.append('page_size', 'a4');
// The key is optional: send the header only when you have one.
const headers = process.env.PDFOPS_API_KEY ? { 'X-API-Key': process.env.PDFOPS_API_KEY } : {};
const res = await fetch('https://pdfops.dev/api/image-to-pdf', { method: 'POST', headers, body: fd });
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops image-to-pdf failed: ${err.error}: ${err.details}`);
}
await writeFile('photos.pdf', Buffer.from(await res.arrayBuffer()));
Python — requests
import os, requests
# The key is optional: send the header only when you have one.
headers = {"X-API-Key": os.environ["PDFOPS_API_KEY"]} if os.environ.get("PDFOPS_API_KEY") else {}
names = ["page1.jpg", "page2.jpg", "scan.png"]
files = [("pdf", (n, open(n, "rb"))) for n in names]
res = requests.post(
"https://pdfops.dev/api/image-to-pdf",
headers=headers,
files=files,
data={"page_size": "a4"},
)
res.raise_for_status()
open("photos.pdf", "wb").write(res.content)
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_image_to_pdf tool, with image_paths (an array of https:// URLs or data:image/jpeg;base64,... and data:image/png;base64,... URIs), and optional page_size, orientation and margin. It returns the PDF inline as an application/pdf resource. See the MCP page.
Behavioral notes
One image, one page. There is no multi-page image support (animated PNG, multi-frame TIFF).
The output is deterministic. The same images and options give the same bytes: the creation date, modification date and producer are pinned.
Images are not resampled. A JPEG is stored as it was sent. A PNG is stored losslessly, and the PDF can be much larger than the PNG file: PNG compression of repeating patterns does not carry over, and a PNG with an alpha channel is stored as separate colour and alpha data. A 4000 × 2500 RGBA PNG of 0.3 MB produced a 29 MB PDF in our test, the same size /api/edit produces for that image. Plan for up to about 4 bytes per pixel for RGBA and 3 for RGB in the worst case.
No OCR. The pages are pictures; the text in a scanned image is not searchable.
Checks run before any work. Every image is checked from its header first, so a request that is going to be refused for size or type is refused without decoding anything.
Limits: 100 images, 4 MB per file, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I convert a JPG to a PDF with an API?
Send the image as a pdf file field in a multipart/form-data POST to /api/image-to-pdf. The response is a PDF with one page that is the size of the image. Repeat the field to put several images in one PDF, one per page.
Can I mix images and PDFs in one file?
Yes, with /api/merge. It accepts JPG and PNG files among its inputs and turns each image into one page, the same as page_size=fit here. This endpoint takes images only, and a PDF sent to it returns unsupported_image_format.
Why did my phone photo come out rotated or sideways?
It should not: a JPEG's EXIF orientation (values 1 to 8) is applied, so the page shows the photo the way a viewer would. If a photo looks wrong, the file probably has no orientation tag, or the tag is wrong. PNG files carry no orientation that is read.
Why was my image rejected with image_too_large?
A PNG is limited to 10 million pixels and to a memory estimate that depends on its colour type and bit depth, so a 16-bit RGBA PNG is refused at fewer pixels than an 8-bit one. A JPEG is limited to 250 million pixels. Downscale the image, save the PNG as 8-bit, or send a JPEG.
Does it accept HEIC, WebP, GIF or TIFF?
No. Only JPG and PNG are read, and the type is taken from the first bytes of the file, never from the file name or the content type. Anything else returns unsupported_image_format. Convert the image to JPG or PNG first.
Related: Merge PDFs (images accepted) · Text to PDF · Stamp text and images.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# PDFops docs — hosted PDF API reference
Source: https://pdfops.dev/docs
Docs
PDFops API reference
Every endpoint is plain HTTP, so you can call it from a
Cloudflare Worker, a Vercel function, Deno, Bun or any server,
with no headless browser of your own. HTML to PDF renders in a
separate isolated service, so you still run no browser yourself.
Keyless calls get
100 requests per IP per month; a free API key raises that to 250
requests per month — POST your email to
/api/signup and pass the emailed key as
X-API-Key. Paid tiers (Indie 4,000, Pro 25,000
requests/month) are live at /pricing. All
endpoints accept and return PDF or JSON; no SDK required.
There's also a no-code path: email a
blank fillable PDF + values to fill@pdfops.dev and the reply
comes back filled, with the equivalent API call included.
Endpoints
POST /api/fill-form
Fill AcroForm fields in a PDF template you upload. Multipart request with pdf (binary) and fields (JSON). Returns the filled PDF as application/pdf.
POST /api/merge
Merge two or more PDFs into one. Multipart request with repeated pdf fields, concatenated in field order. Returns the merged PDF as application/pdf.
POST /api/inspect
List the AcroForm fields in a PDF you upload — names, types, options, current values — plus a paste-ready fillTemplate for /api/fill-form. Multipart request with pdf (binary). Returns JSON.
POST /api/extract-pages
Build a new PDF from chosen pages, in the order you list them (so it also reorders). Multipart request with pdf and pages. Returns application/pdf.
POST /api/delete-pages
Remove pages from a PDF and keep the rest in order. Multipart request with pdf and pages. Returns application/pdf.
POST /api/rotate
Rotate all pages or chosen pages by 90, 180, 270 or -90 degrees. Multipart request with pdf, degrees and optional pages. Returns application/pdf.
POST /api/split
Split a PDF by page ranges or fixed chunk size. Multipart request with pdf and ranges or every. Returns JSON with each part as base64.
POST /api/watermark
Stamp a text watermark on all pages or chosen pages, with opacity, size, colour, rotation and position. Multipart request with pdf and text. Returns application/pdf.
POST /api/edit
Add text, a logo or a signature image at exact positions on chosen pages. Multipart request with pdf, items (JSON) and any PNG or JPEG files. Returns application/pdf.
POST /api/extract-text
Get the text and tables out of a born-digital PDF: reading-order text per page, every line with its position, tables as rows of cells (optionally as CSV). Multipart request with pdf. Returns JSON or plain text.
POST /api/find-text
Search a born-digital PDF for a word, phrase or pattern and get each hit with its page and box in points. Literal or regular-expression search, resumable across pages. Multipart request with pdf and query. Returns JSON.
POST /api/text-to-pdf
Turn Markdown, plain text or CSV into a PDF: headings, lists, tables, code blocks and links on the built-in fonts, A4 or Letter. Not HTML-to-PDF. JSON request with content. Returns application/pdf.
POST /api/detect-fields
Suggest fillable fields for a flat PDF: detects blanks drawn as lines, boxes, underscores and checkboxes and returns text and checkbox fields to review and send to /api/add-fields. Deterministic, no model. Multipart request with pdf. Returns JSON, or with format=pdf adds the fields in the same request and returns the fillable PDF.
POST /api/add-fields
Create fillable form fields in an existing PDF: text, multiline text, checkboxes, radio groups, dropdowns and signature boxes at exact page coordinates. Multipart request with pdf and fields. Returns application/pdf.
POST /api/image-to-pdf
Turn JPG and PNG images into one PDF, one image per page, on pages the size of the image or on A4 or Letter with a margin. Multipart request with repeated pdf image files. Returns application/pdf.
POST /api/attach
Embed files in a PDF, such as an XML invoice, with a name, MIME type, description and PDF/A-3 relationship. Multipart request with pdf and file. Returns application/pdf.
POST /api/html-to-pdf
Turn an HTML string into a PDF with a headless browser: CSS layout, images and web fonts, A4 or Letter. No URL input and no JavaScript; external resources over https only. JSON or multipart request with html. Returns application/pdf. Counts 5 requests per call.
POST /api/page-numbers
Stamp page numbers using a {n} / {total} style format, with position, size, start number and margin. Multipart request with pdf. Returns application/pdf.
POST /api/unlock
Save a PDF without encryption so print, copy and modify restrictions are gone. Multipart request with pdf and optional password. Returns application/pdf.
POST /api/protect
Encrypt a PDF with an open password, an owner password, or both, and choose which actions stay allowed. Multipart request with pdf and passwords. Returns application/pdf.
POST /api/metadata
Read page count, page sizes, Info fields, dates, encryption status and form field count. Multipart request with pdf. Returns JSON.
POST /api/set-metadata
Set title, author, subject, keywords and creator. Multipart request with pdf and at least one field. Returns application/pdf.
POST /api/invoice
Generate a complete US-Letter invoice PDF from JSON — no template upload. JSON body with from, to, items; optional number, dates, currency, tax rate, notes. Deterministic: the same JSON returns a byte-identical PDF. Returns application/pdf.
POST /api/signup
Get a free API key (250 requests/month) emailed to you. JSON body with email. Returns { "ok": true }; the key arrives by email. Re-signing up rotates your key.
GET /api/usage
Check your key's quota: tier, limit, used, remaining, period, reset date. Requires X-API-Key. Reads the same counter the rate limiter enforces.
POST /api/waitlist
Feedback: tell us what to build next. JSON body with use case, current solution, expected volume, pay range, optional email + message. Returns { "ok": true }. Not needed for keys — those are self-serve at /pricing.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Contract — applies to every endpoint
Base URL: https://pdfops.dev
Auth: Optional X-API-Key header on the PDF endpoints. No header: anonymous, per-IP rate-limited. Valid key: your tier's monthly quota. Invalid or revoked key: 401 invalid_api_key — no fallback to the IP cap.
Rate limit: anonymous, 100 successful (2xx) requests per IP per calendar month (UTC); keyed, your tier's quota — Free 250, Indie 4,000, Pro 25,000 per month. The middleware only counts accepted requests; 4xx and 5xx don't consume budget.
Rate-limit response: 429 Too Many Requests with Retry-After seconds-until-next-month — same shape anonymous or keyed.
Request body format: multipart/form-data for PDF-upload endpoints (/fill-form, /merge, /inspect, and the page and document operations from /extract-pages to /set-metadata); application/json for /invoice (structured data in, PDF out), /signup, and /waitlist.
Response on success: 200 OK with application/pdf body (binary endpoints), application/json with { "ok": true } (signup, waitlist), or a JSON report (/inspect, /metadata, /split, /usage).
Response on validation failure: 400 Bad Request with application/json body { "error": "", "details": "" }.
Response on server error: 500 Internal Server Error with the same JSON shape. Treat as retryable.
Processing limits: the PDF work of one request may take up to 20 seconds and a bounded amount of memory. Past either limit it is stopped and the response is 422 with { "error": "processing_timeout" } or { "error": "processing_memory_limit" } and the usual details. Like any non-2xx it does not count against your quota. The largest real documents we test (a 3 MB, 142-page IRS publication) take about 10 seconds at most; a PDF that needs longer is almost certainly crafted, and retrying will not help.
Timeout: the platform stops any request that runs longer than 60 seconds and answers 504 (plain text from the platform, not the JSON shape above). That is a backstop behind the processing limit; such a request still counts against your quota.
Authentication & quotas
The PDF endpoints (every /api/* route above that takes a pdf, plus /api/invoice) resolve your quota from the X-API-Key header:
RequestResult
No X-API-Key headerAnonymous: 100 requests/IP/month.
Valid keyYour tier's quota: Free 250 / Indie 4,000 / Pro 25,000 requests per month.
Invalid or revoked key401 invalid_api_key. No fallback to the IP cap — a caller who thinks they're keyed should find out, not be quietly mis-metered.
Over quota429 with { "error": "rate_limited" } and a Retry-After header (seconds until the 1st of next month, UTC).
Quota is consumed only on 2xx responses, so failed requests are free, with one exception: /api/html-to-pdf counts 5 requests per call, and once its renderer is reached a failed render counts too. Get a free key at /pricing (or POST /api/signup); check consumption with GET /api/usage or the dashboard.
Clients & integrations
TypeScript SDK: npm install pdfops-sdk — typed, zero-dependency client for every endpoint. A server-side client built on fetch: it runs on Node 18+ and Cloudflare Workers (the two we ran it on) and uses only Web-standard APIs for Vercel Edge, Deno and Bun. It does not work from a browser page, because the API sends no CORS headers. Version 0.8.0 covers every endpoint below, including detectFields, detectFieldsPdf and makeFillable for flat PDFs. Source · npm.
Python client: pip install pdfops — zero-dependency, typed client for every endpoint (Python 3.9+); inspect, fill_form, merge, invoice, usage, and since 0.2.0 extract_pages, delete_pages, rotate, split, watermark, page_numbers, unlock, protect, metadata, set_metadata, and since 0.4.0 extract_text, find_text, edit, add_fields, attach, html_to_pdf, image_to_pdf and text_to_pdf, and since 0.5.0 detect_fields, detect_fields_pdf and make_fillable for flat PDFs. Tested on Python 3.9, 3.12 and 3.13. PyPI · source.
n8n node (verified by n8n): n8n-nodes-pdfops. The version n8n has verified for Cloud is 0.6.0. Its 25 operations include form filling, PDF merging, invoice generation with Factur-X, text extraction, HTML rendering, and Detect Fields and Make Fillable for flat forms. Update older installations under Settings → Community Nodes. Fill Form, Inspect Fields and Merge also take an input PDF password. Every operation is also callable from an HTTP Request node. Get a free key for the node. Published templates: fill, validate and email forms, bulk-fill forms from Google Sheets, merged onboarding packets, Stripe invoice PDFs.
Zapier (beta): Fill PDF Form, Merge PDFs, Inspect PDF Form Fields and Create Invoice PDF as Zap actions, with file inputs and outputs that chain into Drive, Gmail or Dropbox steps. PDFops on Zapier. Zapier guide.
Make: works today through Make's built-in HTTP module (Make a request). A native PDFops app for Make is built but not yet listed in Make. Make guide.
MCP server: npx -y pdfops-mcp — gives AI agents (Claude Code, Claude Desktop, Cursor, any MCP client) local tools: pdf_inspect, pdf_fill, pdf_merge, pdf_invoice, pdfops_usage, page extract/delete/rotate/split, watermark, page numbers, unlock, protect and metadata read/set (since 0.4.0), and since 0.5.0 pdf_edit, pdf_extract_text, pdf_find_text, pdf_add_fields, pdf_add_attachment, pdf_image_to_pdf, pdf_text_to_pdf and pdf_html_to_pdf, and since 0.6.0 pdf_detect_fields for flat PDFs. Tools take file paths, so PDF bytes never enter the model's context. Listed in the official MCP registry as dev.pdfops/pdfops-mcp. Setup for Claude Code, Claude Desktop, Cursor and VS Code · Source.
OpenAPI 3.1: /openapi.json — full request/response schemas for codegen and tool integration.
Fillable PDFs — quick start
Don't have a fillable PDF handy? Grab the sample invoice-template.pdf — it has customer_name + total AcroForm fields ready to fill via the curl example on each docs page.
For tax forms (W-9, W-8BEN, I-9) the IRS publishes AcroForm-ready PDFs at irs.gov/forms-instructions — just rename the default IRS field names to something predictable (see the W-9 walkthrough) and your code survives the annual form refresh.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email, the key arrives in your inbox, and the signup page walks you through a first call. For calling PDFops from an edge function, that call is one line:
const pdf = await fetch("https://pdfops.dev/api/invoice", { method: "POST", headers: { "X-API-Key": env.PDFOPS_API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ from: "Acme LLC", to: "Globex", items: [{ description: "Consulting", quantity: 2, unit_price: 150 }] }) });
Get a free API key
← PDFops home · Blog
---
# POST /api/inspect — PDFops API reference
Source: https://pdfops.dev/docs/inspect
Endpoint reference
POST /api/inspect
List the AcroForm fields in a PDF you upload — names, types, options, current values — plus a paste-ready fillTemplate for /api/fill-form. Returns JSON. Prefer a browser? The free inspector at /tools/inspect runs the same engine.
This is the first call in the natural workflow: inspect to learn the field names, fill-form to set them, merge to combine the results. You can't fill fields whose names you don't know.
Request
Method: POST. URL: https://pdfops.dev/api/inspect. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesThe PDF to inspect. Maximum size: 4 MB; at most 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
HeaderRequiredDescription
X-API-KeyNoOptional. Same auth semantics as /api/fill-form and /api/merge: no header → anonymous, 100 requests/IP/month; valid key → your tier's quota; invalid or revoked key → 401 invalid_api_key.
Successful (2xx) calls count 1 request against your quota — the same meter as the other PDF endpoints. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/json:
{
"count": 4,
"fields": [
{ "name": "customer_name", "type": "text", "value": "", "readOnly": false },
{ "name": "agreed_to_terms", "type": "checkbox", "checked": false, "readOnly": false },
{ "name": "plan", "type": "radio", "value": "Starter", "options": ["Starter", "Pro"], "readOnly": false },
{ "name": "approval", "type": "unsupported", "raw": "PDFSignature", "readOnly": false }
],
"fillTemplate": {
"customer_name": "",
"agreed_to_terms": "true",
"plan": "Starter"
}
}
FieldTypeMeaning
countnumberNumber of AcroForm fields found.
fieldsarrayOne object per field — schema below.
truncatedbooleantrue when the listing hit an output cap and the listing is incomplete: at most 2,000 fields, 500 options per choice field, and about 2 million characters of names, values and options in total. Any single name, value or option longer than 4,096 characters is cut to 4,096.
fillTemplateobjectA paste-ready JSON object for /api/fill-form's fields parameter. Supported fields only; checkbox placeholders are the string "true", choice placeholders are the first option. Overwrite the placeholder values and send it.
A PDF with no AcroForm returns 200 with {"count": 0, "fields": [], "fillTemplate": {}} — deliberately not an error, because "does this PDF have fields?" is exactly the question you're asking.
On any failure: 4xx, Content-Type: application/json, body is { "error": "", "details": "" }.
Field objects
FieldTypeMeaning
namestringThe AcroForm field name — exactly what /api/fill-form expects as a fields key.
labelstringOptional. The field's alternate name (the tooltip, the /TU entry), present only when the form defines one. /api/fill-form accepts it as a key when no field name matches.
typestringOne of text, checkbox, dropdown, radio, optionlist, unsupported.
valuestringPresent on text and choice fields: the current saved value.
checkedbooleanPresent on checkbox fields: whether the box is currently checked.
optionsstring[]Present on choice fields (dropdown, radio, optionlist): the allowed values.
readOnlybooleanWhether the field is flagged read-only in the PDF.
rawstringPresent on unsupported fields: the underlying AcroForm class, e.g. PDFButton or PDFSignature.
How type maps to AcroForm classes and which extra property each carries:
typeAcroForm classCarries
textPDFTextFieldvalue
checkboxPDFCheckBoxchecked
dropdownPDFDropdownoptions + value
radioPDFRadioGroupoptions + value
optionlistPDFOptionListoptions + value
unsupportedPDFButton, PDFSignatureraw
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400No pdf field present or it wasn't a File.
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
invalid_pdf400The uploaded PDF couldn't be parsed (corrupt, not a PDF).
pdf_too_large400The pdf file is over 4 MB.
too_many_pages400The PDF has over 2,000 pages.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap — get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After header gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After header gives seconds until next calendar month.
Note there's no no_form error here: a form-less PDF is a valid answer (count: 0), not a failure.
Example — curl
Don't have a fillable PDF? Grab the sample invoice-template.pdf with customer_name + total fields.
curl -X POST https://pdfops.dev/api/inspect \
-F "pdf=@invoice-template.pdf" \
-H "X-API-Key: pdfops_live_..."
The X-API-Key header is optional, and a free key comes from pdfops.dev/pricing.
Example — JavaScript: inspect, then fill
fillTemplate is shaped so it pipes straight into /api/fill-form — overwrite the placeholders and send:
import { readFile, writeFile } from 'node:fs/promises';
const pdf = await readFile('invoice-template.pdf');
const blob = new Blob([pdf], { type: 'application/pdf' });
// 1. Inspect — learn the field names.
const fd = new FormData();
fd.append('pdf', blob, 'invoice-template.pdf');
const { fillTemplate } = await (
await fetch('https://pdfops.dev/api/inspect', { method: 'POST', body: fd })
).json();
// 2. Fill — overwrite the placeholders, pipe the template into fill-form.
const fields = { ...fillTemplate, customer_name: 'Acme Co', total: '$1,250.00' };
const fillFd = new FormData();
fillFd.append('pdf', blob, 'invoice-template.pdf');
fillFd.append('fields', JSON.stringify(fields));
const res = await fetch('https://pdfops.dev/api/fill-form', { method: 'POST', body: fillFd });
await writeFile('filled.pdf', Buffer.from(await res.arrayBuffer()));
FAQ
Why did I get count: 0 on a PDF that looks like a form?
The PDF has no AcroForm layer. Three common cases: a flat PDF (the "form" is just text drawn on the page — no interactive fields), an XFA form (a different, XML-based form technology that AcroForm tooling doesn't read), or a scanned document (an image of a form — reading it would need OCR, which PDFops doesn't do). count: 0 is a 200, not an error, because "does this PDF have fields?" is exactly the question this endpoint answers. To make a flat PDF fillable, detect its fields with POST /api/detect-fields (format=pdf returns the fillable PDF in one request) or the free make-fillable tool (detects in your browser, nothing uploaded), or add AcroForm fields in Acrobat (Tools → Prepare Form), LibreOffice Draw, or pdftk.
What does type: "unsupported" mean?
The field exists in the AcroForm but isn't a type /api/fill-form can set — buttons and signatures. The raw property carries the underlying class (e.g. PDFButton, PDFSignature). Inspect reports them so you see the complete form; they're excluded from fillTemplate, and sending them to /api/fill-form would return 400 unsupported_field_type.
Does /api/inspect consume my quota?
Yes — a successful (2xx) inspect counts as 1 request against the same monthly quota as /api/fill-form and /api/merge. Failed requests (4xx/5xx) don't consume budget. A typical inspect-then-fill round trip costs 2 requests.
What's the difference between /api/inspect and the free tool at /tools/inspect?
Same engine, different surface. /tools/inspect is the browser version — drop a PDF on the page and read the field list, no code, no key. /api/inspect is the same inspection over HTTP for your scripts, CI, and edge functions, and it returns the machine-readable fillTemplate you can pipe into /api/fill-form.
Are value and checked the current saved values in the PDF?
Yes. value (text and choice fields) and checked (checkboxes) reflect what's currently saved in the uploaded PDF. That makes /api/inspect double as a reader: inspect a filled PDF to extract what's in it — for example, a form a customer filled in and sent back.
← All docs · PDFops home
---
# POST /api/invoice — PDFops API reference
Source: https://pdfops.dev/docs/invoice
Endpoint reference
POST /api/invoice
Generate a complete, professionally laid-out US-Letter invoice PDF from a JSON body — header, FROM/BILL TO blocks, items table, totals, notes. No template upload. Deterministic: the same JSON returns a byte-identical PDF. A worked request with its real response is at JSON to invoice PDF. Prefer a form? The free generator at /tools/invoice calls this endpoint.
This is the first PDFops endpoint that ships its own template: /api/fill-form fills an AcroForm PDF you bring; /api/invoice draws the whole document from data. That makes it a natural fit for a Stripe webhook that turns a payment into an invoice PDF, a monthly billing cron, or freelancer tooling — see the Stripe walkthrough and the invoices use case.
Request
Method: POST. URL: https://pdfops.dev/api/invoice. Body: application/json.
FieldTypeRequiredDescription
fromstring or objectYesSeller, rendered in the FROM block. A plain string ("Acme Studio LLC"), or { name, lines } where lines is up to 6 address lines rendered under the name.
tostring or objectYesBuyer, rendered in the BILL TO block. Same shape as from. If the name is empty, blank or missing and one to.lines entry is an email address, the first such entry is printed as the recipient and the response carries an X-Pdfops-Warning note. An address line or tax id is never promoted to a name. With neither a name nor an email line the call is a 400 invalid_to; no placeholder name is invented. from always needs a name. Not available with e_invoice. See Sparse and loosely formatted input.
itemsarrayYes1 to 100 line items — schema below.
invoice_numberstringNoPrinted in the invoice header.
datestring or integerNoInvoice date, always printed in the header as YYYY-MM-DD. Accepts YYYY-MM-DD, an ISO 8601 datetime, a Unix timestamp and unambiguous slash or dot dates (formats below); anything else is a 400 invalid_date that names the accepted formats. Omit it and no date line is printed. Also pins the PDF's metadata dates — pass it explicitly for byte-identical re-renders (see Deterministic output).
duestring or numberNoDue date, printed in the header as given (trimmed), so free text such as Net 30 works, and so does a date written with slashes or dots: it is never rewritten, so one caller's invoices do not mix formats. Only a Unix timestamp (a number or a string of digits, same ranges as date) or a full ISO 8601 datetime is converted to YYYY-MM-DD; a timestamp adds an X-Pdfops-Warning note. A number that is not a valid timestamp (0, -5, 1.5) is left off the invoice, with a note naming it.
currencystringNoISO 4217 code, default USD. Formatting only, e.g. USD 1,200.00 — no conversion.
tax_ratenumberNoPercent, 0 to 100, as a JSON number or a plain numeric string such as "8.5". Adds a tax line between subtotal and total.
notesstringNoFree-text block rendered under the totals.
e_invoicestringNo"factur-x" returns a Factur-X (ZUGFeRD) e-invoice, which makes more fields required and adds tax_category, tax_exemption_reason, payment_terms, iban, unit and party fields. See below.
Each entry in items:
FieldTypeRequiredDescription
descriptionstringYesWhat the line is for.
quantitynumberNoA JSON number or a plain numeric string such as "3", > 0. Defaults to 1.
unit_pricenumberYesPrice per unit as a JSON number or a plain numeric string such as "10.99", ≥ 0, in the invoice currency. Currency symbols ($10.99), thousands separators (1,000) and exponents are refused, because they can mean more than one amount. The line amount is quantity × unit_price.
HeaderRequiredDescription
X-API-KeyNoOptional. Same auth semantics as /api/fill-form and /api/merge: no header → anonymous, 100 requests/IP/month; valid key → your tier's quota; invalid or revoked key → 401 invalid_api_key.
Successful (2xx) calls count 1 request against your quota — the same meter as the other PDF endpoints. Check consumption with GET /api/usage.
Full request example
{
"from": { "name": "Acme Studio LLC", "lines": ["100 Main St", "Portland, OR 97201"] },
"to": "Globex Corporation",
"invoice_number": "INV-0042",
"date": "2026-07-21",
"due": "2026-08-20",
"currency": "USD",
"tax_rate": 8.5,
"items": [
{ "description": "Design retainer — July", "quantity": 1, "unit_price": 2400 },
{ "description": "Landing page build", "quantity": 3, "unit_price": 650 }
],
"notes": "Payment by bank transfer within 30 days."
}
Response
On success: 200 OK, Content-Type: application/pdf — a complete US-Letter invoice:
Header with the invoice number, date, and due date.
FROM and BILL TO blocks (name plus up to 6 address lines each).
Items table with per-line amounts — long invoices auto-paginate past one page.
Subtotal, tax (when tax_rate is set), and total, formatted in the invoice currency.
The notes block, when provided.
When the call read something in a way you might not expect (a timestamp read as a UTC date, a slash date converted to YYYY-MM-DD, an email used as the recipient, a numeric due left off), the response carries an X-Pdfops-Warning header (several notes are separated by ; ), for example date: 1764201600 read as 2025-11-27 (Unix seconds, UTC). The header is absent when nothing was changed, and the body is always the PDF. The hosted MCP tool returns the same text as a warning field. Whether a client library or integration (Zapier, Make, n8n, the npm MCP server, the TypeScript SDK) passes it on depends on its version; if yours does not, read the response header.
On any failure: 4xx, Content-Type: application/json, body is { "error": "", "details": "" }.
Keep the complete work description on the invoice
Put the agreed work in each line item and the remittance instructions in notes. Long descriptions wrap below the first line, beside the same quantity and amount. A field that exceeds its printable limit returns HTTP 400 with the field name. Edit the source and retry. Download the example request to reproduce the walkthrough.
See a complete work order, the over-limit response and a successful retry. Download the video.
Sparse and loosely formatted input
Automation platforms send what their source has: a Stripe payment may have no customer name and a Unix-timestamp date, a spreadsheet may hold 11/27/2026. The endpoint reads the shapes that mean one thing and refuses the rest. It never guesses a locale.
Input for dateResult
2026-11-27Used as is.
2026-11-27T23:30:00-05:00, 2026-11-27T10:00:00Z, 2026-11-27T10:00The date as written is used (2026-11-27), with no warning; with no offset, UTC is assumed. A space instead of T is refused.
1764201600 (seconds), 1764201600000 (milliseconds)A whole number, as a JSON number or a string of digits (no sign, leading zeros or decimals), read as UTC (2025-11-27). Decided by value: seconds from 946684800 to 4102444800, milliseconds from 946684800000 to 4102444800000 (2000-01-01 to 2100-01-01). Any other number is a 400, including 20261127, which is not read as YYYYMMDD.
11/27/2026, 27/11/2026, 27.11.2026Read when one of the first two parts is above 12 (it must be the day), or when both are equal (03/03/2026). Four-digit year required (13/1/26 is a 400). A zero or out-of-range part (0/5/2026, 13/13/2026) is an invalid date, not an ambiguous one.
2026/11/27, 2026.11.27Year, month, day.
03/04/2026400 invalid_date: it is 3 April or 4 March depending on locale. Send YYYY-MM-DD.
Whatever the form, the year must be between 1900 and 2100 (so 0100-01-01 and 9999-12-31 are a 400), and surrounding whitespace is ignored. A timestamp or slash date is reported in X-Pdfops-Warning (an ISO datetime is not: it is the date it states), and the PDF prints and pins the resulting YYYY-MM-DD.
None of this applies with e_invoice. A Factur-X request keeps strict input: date and due must be exactly YYYY-MM-DD calendar dates, quantity, unit_price and tax_rate must be JSON numbers, and to needs its name. A loose value is a 400 that says e-invoices require strict input, and no X-Pdfops-Warning header is sent.
Ordinary invoices print up to 200 characters per party name, address line or item description, six address lines per party, and 1,000 characters of notes. Long descriptions and notes wrap across lines and continue onto another page when needed. If a field exceeds its limit or a header cannot fit, the API returns HTTP 400 with the field name. Check the returned error before retrying.
Recipient: when to.name is empty or missing and a to.lines entry has the shape of an email address, the first such entry becomes the recipient line (the other lines stay under it, in order) and the response notes it. An email counts only if it is a plain address: one @, a local part without edge or doubled dots, a domain of letters, digits and hyphens ending in two or more letters, at most 254 characters. One longer than 200 characters is refused (400 invalid_to) rather than cut. to.lines is validated first, so a malformed array is a 400 either way. When there is no name and no email line (only a street, a tax id or a country code, say), the call is a 400 invalid_to asking for a name or the customer's email as one of the lines.
Numbers: quantity, unit_price and tax_rate accept JSON numbers or plain numeric strings of at most 40 characters ("10.99", " 3 ", "+5"). An empty string, a currency symbol, a thousands separator or an exponent is a 400 whose message names the field and the value received.
Factur-X / ZUGFeRD e-invoice output
Add "e_invoice": "factur-x" to the request and the response is a PDF/A-3 file that carries the invoice data as an embedded factur-x.xml (UN/CEFACT Cross Industry Invoice, profile EN 16931, also called COMFORT). The XMP metadata declares PDF/A-3B and the Factur-X extension schema (document type INVOICE, file name, version 1.0, conformance level EN 16931), the font is embedded and the file has an sRGB output intent and a document ID. Without e_invoice (absent, null, false or an empty string) nothing changes: the request, the validation and the output bytes are exactly the plain invoice, and the extra fields below are ignored. Any other value that is not "factur-x" is a 400 invalid_einvoice_field. With e_invoice set, a field this mode does not honour is refused rather than ignored: per-item tax fields (the rate and category apply to the whole invoice) and unknown fields.
What was checked. The output of every variant in the test suite (standard, zero-rated, exempt, reverse charge, not subject to VAT, payment terms only, rounding edge cases, 100 items over several pages, markup characters in text fields) is validated with the Mustang validator 2.26.0 (PDF/A-3 through veraPDF, the Factur-X XSD for EN 16931 and the EN 16931 schematron), and a file counts only when both the PDF/A half and the XML half pass. The same validator rejects deliberately broken files, on the half each one breaks. That is a statement about the tests we ran. It is not a certification, and it is not advice on what a tax authority or a buyer's system will accept in a given country.
What is not produced. Only the EN 16931 profile of Factur-X (ZUGFeRD). No XRechnung, Peppol or UBL output, no MINIMUM, BASIC WL, BASIC or EXTENDED profile, no credit notes, discounts or charges, no prepaid amounts, no delivery data, and one VAT category and rate per invoice.
With e_invoice set these fields become required. A request that misses any of them is a 400 einvoice_fields_required whose body lists every missing field in a missing array.
FieldRule
invoice_number, dateRequired. date is a YYYY-MM-DD calendar date.
currencyRequired, no default. An ISO 4217 code accepted by EN 16931. Amounts always have 2 decimals, whatever the currency.
due or payment_termsOne of them is required. due must be a YYYY-MM-DD calendar date in this mode. Optional iban (checksum verified) adds a payment means: SEPA credit transfer (code 58) when the invoice is in EUR and the IBAN is in the SEPA area, otherwise credit transfer (code 30).
from, toObjects, not strings: name and country (ISO 3166-1 alpha-2, capitals; 1A for Kosovo) are required. Optional: street, postcode, city, vat_id, tax_id, registration_id. The existing lines stay as extra lines on the page only; they are not in the XML.
Seller identificationfrom.vat_id, or from.tax_id together with from.registration_id. For tax_category O, from.registration_id and no VAT ids on either party. A vat_id must start with a two-letter country prefix in capitals (DE123456789, EL for Greece). The buyer has no tax number in EN 16931: to.tax_id is refused, use to.vat_id.
items[].unitRequired on every item: a UN/ECE Recommendation 20 unit code such as C62 (one), HUR (hour) or KGM (kilogram), from the EN 16931 code list.
tax_categoryS standard rate (the default when tax_rate is above 0), Z zero rate, E exempt, AE reverse charge, O not subject to VAT. Required when tax_rate is 0 or omitted. tax_rate must be 0 for every category except S.
tax_exemption_reasonRequired for E, AE and O, refused for S and Z. For AE the buyer also needs vat_id or registration_id.
The other EN 16931 categories (G, K, L, M) are refused with invalid_einvoice_field: they carry delivery rules this endpoint does not collect.
Totals: one calculation for the page and the XML
The amounts in the XML and the amounts on the page come from the same code, so they cannot disagree. All arithmetic is exact decimal arithmetic on integers, never floating point. quantity and unit_price take at most 4 decimals and tax_rate at most 2 (more is a 400, never a silent rounding). Each line amount is quantity × unit_price rounded half up to 2 decimals. The document line total is the sum of those rounded line amounts. VAT is computed once on that sum (basis × rate / 100, rounded half up to 2 decimals), not per line. The grand total is basis plus VAT and equals the amount due. Amounts above 9999999999999.99 are refused.
Text
XML cannot carry control characters or lone surrogates, and the embedded font covers Basic Latin, Latin-1, Latin Extended-A, the euro sign and common punctuation. In this mode leading and trailing whitespace is trimmed and nothing else is changed. Text that is longer than its limit (200 characters; 1,000 for notes), contains characters XML 1.0 cannot carry, or contains characters the font cannot draw is refused with a 400 naming the field: invalid_einvoice_field for the first two, unrenderable_text for the last. Text that is accepted is never cut: long descriptions, names, payment terms and notes wrap onto further lines (and pages) on the page and are carried in full in the XML. Amounts are laid out from their measured width, so they do not overprint; at the largest accepted values the numeric columns shrink to as small as 7 points. Right-to-left scripts, Cyrillic, Greek, CJK and emoji are therefore refused. notes may contain line breaks and tabs. Markup characters such as &, < and ]]> are escaped and come back unchanged.
Example
curl -X POST https://pdfops.dev/api/invoice \
-H "Content-Type: application/json" \
-H "X-API-Key: pdfops_live_..." \
-d '{
"e_invoice": "factur-x",
"from": { "name": "Lieferant GmbH", "street": "Lieferantenstrasse 20", "postcode": "80333",
"city": "München", "country": "DE", "vat_id": "DE123456789" },
"to": { "name": "Kunden AG", "city": "Paris", "country": "FR" },
"invoice_number": "RE-2026-0042",
"date": "2026-11-21",
"due": "2026-12-21",
"currency": "EUR",
"tax_rate": 19,
"iban": "DE02 1203 0000 0000 2020 51",
"items": [
{ "description": "Beratung", "quantity": 10.5, "unit": "HUR", "unit_price": 120 },
{ "description": "Trennblätter A4", "quantity": 20, "unit": "C62", "unit_price": 9.9 }
]
}' \
-o RE-2026-0042.pdf
# read the embedded XML back (poppler-utils)
pdfdetach -save 1 -o factur-x.xml RE-2026-0042.pdf
The X-API-Key header is optional, and a free key comes from pdfops.dev/pricing.
Here the lines are 1,260.00 and 198.00, VAT at 19% on 1,458.00 is 277.02 and the total is 1,735.02, in the XML and on the page. A request that omits unit and from.country returns:
{ "error": "einvoice_fields_required",
"details": "e_invoice \"factur-x\" also requires: from.country, items[0].unit",
"missing": ["from.country", "items[0].unit"] }
The call counts as 1 request, like a plain invoice. The output is deterministic in this mode too: the same JSON returns the same bytes.
Deterministic output
The same JSON body returns a byte-identical PDF — every time. The PDF's internal metadata dates are pinned to the invoice date rather than the render time, so nothing in the file varies between runs. Hash the output today, render the same JSON tomorrow, get the same hash.
Practically, that means re-rendering is idempotent and safe: a Stripe webhook that retries, a monthly cron that re-runs, or a "regenerate" button that fires twice all produce the same file — dedup, caching, content-addressed storage, and audit diffs just work. There is no wall-clock input at all: the PDF's metadata dates are pinned to your date when given, and to a fixed epoch otherwise — never to render time — so a body that omits date is still byte-stable across days (it just has no date line on the document).
Branding
Anonymous calls and Free-tier keys produce PDFs with a small "Generated with pdfops.dev" footer line. Indie and Pro keys produce clean output with no branding — see /pricing.
Error codes
Error codeStatusTrigger
invalid_json400Request body isn't parseable JSON.
invalid_body400Body parsed but isn't a JSON object with the required fields.
invalid_from400from missing or the wrong shape — must be a non-empty string or { name, lines } with at most 6 lines. A name and lines that wrap to more than about 30 lines in the 240 pt column are refused rather than cut off (the same applies to to, as invalid_to).
invalid_to400to missing, the wrong shape, or with nothing that identifies the recipient: send a non-empty to string or to.name, or include the customer's email as one of the to.lines entries.
invalid_items400items missing, empty, longer than 100, or an item fails validation (missing description, quantity ≤ 0, unit_price < 0, or either one neither a number nor a plain numeric string). The message names the field and the value received.
invalid_currency400currency isn't an ISO 4217 code.
invalid_tax_rate400tax_rate isn't a number between 0 and 100.
invalid_date400date isn't a real calendar date in one of the accepted formats, or is an ambiguous slash date such as 03/04/2026. The message names the value received and the accepted formats.
unrenderable_text400A text field contains characters the font can't draw (the built-in font covers Latin-1 / WinAnsi; with e_invoice the embedded font covers Latin, Latin Extended-A, the euro sign and common punctuation; no emoji or CJK in either). details names the field.
einvoice_fields_required400e_invoice is set and required fields are missing. missing lists every one. See Factur-X output.
invalid_einvoice_field400e_invoice is set and a field has a bad value: unknown country, currency, unit or category, a date that is not YYYY-MM-DD, more decimals than allowed, text that is too long or cannot be written in XML, a rule broken between fields. details names the field.
request_too_large413The whole request body is over 1 MB. Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap — get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After header gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After header gives seconds until next calendar month.
Example — curl
curl -X POST https://pdfops.dev/api/invoice \
-H "Content-Type: application/json" \
-H "X-API-Key: pdfops_live_..." \
-d '{
"from": "Acme Studio LLC",
"to": "Globex Corporation",
"invoice_number": "INV-0042",
"date": "2026-07-21",
"items": [
{ "description": "Design retainer — July", "unit_price": 2400 }
]
}' \
-o invoice-INV-0042.pdf
The X-API-Key header is optional — drop it to use the anonymous quota (the PDF then carries the footer line). A free key comes from pdfops.dev/pricing.
Example — JavaScript: Stripe webhook → invoice PDF
The marquee pattern from the Stripe walkthrough: a Worker receives an invoice.paid event and renders the PDF. Because output is deterministic, Stripe's webhook retries re-produce the identical file — store it keyed by hash or invoice number and duplicates collapse for free.
export default {
async fetch(req, env) {
const event = await req.json(); // Stripe webhook — verify the signature first
const inv = event.data.object; // an invoice.paid Invoice object
const res = await fetch('https://pdfops.dev/api/invoice', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': env.PDFOPS_KEY,
},
body: JSON.stringify({
from: { name: 'Acme Studio LLC', lines: ['100 Main St', 'Portland, OR 97201'] },
to: inv.customer_name,
invoice_number: inv.number,
date: new Date(inv.created * 1000).toISOString().slice(0, 10),
currency: inv.currency.toUpperCase(),
items: inv.lines.data.map((line) => ({
description: line.description,
quantity: line.quantity,
unit_price: line.amount / 100 / line.quantity,
})),
}),
});
const pdf = await res.arrayBuffer();
await env.BUCKET.put(`invoices/${inv.number}.pdf`, pdf); // R2, email it, etc.
return new Response('ok');
},
};
FAQ
Why does deterministic output matter?
Because re-renders become free and safe. The same JSON returns a byte-identical PDF — hash the output today, render the same JSON tomorrow, get the same hash. Webhook retries and cron re-runs produce the same file instead of near-duplicates, so dedup, caching, diffing, and audit trails all work. There is no wall-clock input at all: metadata dates are pinned to the invoice date when you pass one, and to a fixed epoch otherwise — never to render time. Omitting date simply leaves the date line off the document; the output stays byte-stable either way.
How do I remove the "Generated with pdfops.dev" footer line?
Use a paid key. Anonymous calls and Free-tier keys produce PDFs with a small "Generated with pdfops.dev" footer line; Indie and Pro keys produce clean output with no branding. Plans are at /pricing.
Can I customize the invoice layout?
Not yet — there's one clean US-Letter template, and every knob the endpoint exposes (parties, dates, currency, tax, notes) feeds it. If you need a specific layout, logo, or paper size, tell us via the feedback form at POST /api/waitlist — layout requests directly shape what we build next.
How are currencies handled?
currency takes any ISO 4217 code (default USD) and controls formatting only: amounts render as the code plus a grouped two-decimal number, e.g. USD 1,200.00 or EUR 850.00. There's no exchange-rate conversion — the numbers you send are the numbers printed.
Does /api/invoice consume my quota?
Yes — a successful (2xx) call counts as 1 request against the same monthly quota as the other PDF endpoints (anonymous 100/IP/month, or your key's tier). Failed requests (4xx/5xx) don't consume budget.
Does it produce XRechnung, Peppol or UBL?
No. The only e-invoice output is Factur-X (ZUGFeRD), profile EN 16931, as a PDF/A-3 file with the XML embedded. It was checked with the Mustang validator 2.26.0; other formats and profiles are not built, and nothing here is a statement of legal compliance in any country.
How do I get the XML out of the e-invoice PDF?
It is an embedded file named factur-x.xml. With poppler-utils, pdfdetach -save 1 -o factur-x.xml invoice.pdf; with qpdf, qpdf --show-attachment=factur-x.xml invoice.pdf > factur-x.xml.
← All docs · PDFops home
---
# POST /api/merge — PDFops API reference
Source: https://pdfops.dev/docs/merge
Endpoint reference
POST /api/merge
Merge two or more PDFs into one. Pages are concatenated in the order the multipart fields appear in the request body. Returns the merged PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/merge. Body: multipart/form-data.
FieldTypeRequiredDescription
pdf (repeated)File (PDF, JPG or PNG)Yes, 2 to 20A PDF file, up to 4 MB each; all files together must stay under 4.5 MB. Repeat the field name pdf for each input file. Pages are concatenated in the order the fields appear in the request body. A JPG or PNG image is accepted in place of a PDF; see Images.
Response
On success: 200 OK, Content-Type: application/pdf, body is the merged PDF binary.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
insufficient_pdfs400Fewer than 2 pdf file fields in the request.
too_many_pdfs400More than 20 pdf file fields in the request. Chain calls for larger merges.
invalid_pdf400One of the input PDFs couldn't be parsed (corrupt or not a PDF). details identifies which index failed.
encrypted_pdf400One of the inputs needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field. details identifies which index.
invalid_image400An image input is corrupt, truncated, an animated PNG or an unsupported JPEG variant. details identifies which index. See Which files count as images.
image_too_large400An image input is over the pixel or memory limit (PNG: 10 million pixels and a memory estimate; JPEG: 250 million pixels). Limits are listed on the image-to-pdf page.
images_too_large_together400The PNG inputs together are over the shared memory budget. See What fits in one request.
image_aspect_ratio400An image input is so elongated that its page would have a short side under 3 points.
pdf_too_large400One of the input files is over 4 MB.
too_many_pages400The inputs together have over 2,000 pages.
decompressed_too_large400Object streams inside one input decompress to over 32 MB.
request_too_large413The whole request body, all PDFs combined, is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
internal_error500The PNG check could not run in this environment. Retryable.
save_failed500PDF serialization failed after merging. Retryable.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap — get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After header gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After header gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/merge \
-F "pdf=@cover.pdf" \
-F "pdf=@body.pdf" \
-F "pdf=@appendix.pdf" \
-o combined.pdf \
-H "X-API-Key: pdfops_live_..."
Walkthrough: monthly per-customer statement bundles on a Cloudflare Cron Trigger — uses fill-form to generate per-customer statements, then merges them into a single PDF for archiving. The KYC-packet guide shows the full inspect → fill → merge chain with the SDK. Broader pattern: report PDFs at scale across statements, inspection reports, audit summaries, and KPI digests. For a one-off merge, the playground does the same call in the browser.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
The canonical curl above translated to common stacks. All use stdlib + one widely-adopted HTTP client (httpx for Python); no PDFops-specific SDK needed.
Have an API key? Add an X-API-Key header to any of these requests — optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
Node.js (22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const cover = await readFile('cover.pdf');
const body = await readFile('body.pdf');
const appendix = await readFile('appendix.pdf');
const fd = new FormData();
// Order matters — pages concatenate in field order, not filename order.
fd.append('pdf', new Blob([cover], { type: 'application/pdf' }), 'cover.pdf');
fd.append('pdf', new Blob([body], { type: 'application/pdf' }), 'body.pdf');
fd.append('pdf', new Blob([appendix], { type: 'application/pdf' }), 'appendix.pdf');
const res = await fetch('https://pdfops.dev/api/merge', { method: 'POST', body: fd });
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops merge failed: ${err.error} — ${err.details}`);
}
await writeFile('combined.pdf', Buffer.from(await res.arrayBuffer()));
Python (3.10+) — httpx
import httpx
# httpx accepts a list of (fieldname, file-tuple) pairs for repeated fields.
files = [
('pdf', ('cover.pdf', open('cover.pdf', 'rb'), 'application/pdf')),
('pdf', ('body.pdf', open('body.pdf', 'rb'), 'application/pdf')),
('pdf', ('appendix.pdf', open('appendix.pdf', 'rb'), 'application/pdf')),
]
r = httpx.post('https://pdfops.dev/api/merge', files=files, timeout=30)
if r.status_code != 200:
err = r.json()
raise RuntimeError(f"PDFops merge failed: {err['error']} — {err['details']}")
with open('combined.pdf', 'wb') as f:
f.write(r.content)
Go (1.21+) — net/http + mime/multipart
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
)
func merge(paths []string, out string) error {
var body bytes.Buffer
w := multipart.NewWriter(&body)
// Order matters: pages concatenate in the order the fields are written.
for _, p := range paths {
data, err := os.ReadFile(p)
if err != nil {
return err
}
part, err := w.CreateFormFile("pdf", p)
if err != nil {
return err
}
if _, err := part.Write(data); err != nil {
return err
}
}
w.Close()
req, err := http.NewRequest("POST", "https://pdfops.dev/api/merge", &body)
if err != nil {
return err
}
req.Header.Set("Content-Type", w.FormDataContentType())
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
var apiErr struct {
Error string `json:"error"`
Details string `json:"details"`
}
json.NewDecoder(resp.Body).Decode(&apiErr)
return fmt.Errorf("merge failed: %s — %s", apiErr.Error, apiErr.Details)
}
f, err := os.Create(out)
if err != nil {
return err
}
defer f.Close()
_, err = io.Copy(f, resp.Body)
return err
}
Images
An input that starts with JPEG or PNG signature bytes is an image, whatever its file name or Content-Type says. Each image becomes one page the size of the image (1 pixel = 1 point, long side capped at 5,000 points), in its place in the order, with no margin. This is the same as /api/image-to-pdf with page_size=fit, which also offers A4 and Letter pages and margins; a JPEG's EXIF orientation is applied. An input that starts with JPEG or PNG bytes but also contains a %PDF- header and loads as a PDF (a PDF with junk in front of it) is merged as a PDF, so PDF merges that worked before still do. Anything else that is not an image returns invalid_pdf. A request needs at least 2 inputs, images included, and the output is capped at 2,000 pages. A request with only PDFs behaves exactly as before.
Behavioral notes
Page order is multipart-field order, not filename order. If you assemble the request from a dictionary or hash, ensure iteration order matches your intent.
All pages of each input are preserved. The merge calls copyPages on every page of every input; no filtering, no extraction.
Document-level metadata (AcroForm, outline, attachments) does not union across inputs. The merged output starts fresh — fields belong to the document, not the pages, and the merge doesn't combine AcroForm dictionaries. Fill form PDFs before merging if you need filled fields preserved.
Password-protected PDFs need their open password in the password form field; owner-locked files with an empty user password (most government blanks) need nothing.
Limits: 20 PDFs, 4 MB per PDF, 4.5 MB per request (all PDFs combined; Vercel's platform limit), 2,000 pages in the merged output. For larger merges, chain calls in sequence.
FAQ
How many PDFs can I merge in one request?
Up to 20, and the whole request has to fit in 4.5 MB, Vercel's platform request limit (4 MB per PDF, 2,000 pages in the output). With typical 1-2 MB inputs that is 2-4 per request; small PDFs fit many more. For larger merges, chain multiple /api/merge calls.
What's the page order in the merged PDF?
The same order as the multipart fields in the request body. All pages of each input are preserved in their original order within that input.
Are form fields preserved across the merge?
Page-level content yes, document-level AcroForm metadata no. Fill form PDFs via /api/fill-form first, then merge the filled outputs.
Why does /api/merge require at least 2 PDFs?
If you have one PDF there's nothing to merge — return it unchanged on your side. The minimum-of-2 check surfaces misuse loudly rather than wasting a call.
Can I merge encrypted PDFs?
Owner-locked PDFs with an empty user password (most government blanks: they open in any viewer) merge without any extra step. For a PDF that needs a password to open, send that password as the password form field; it applies to every part of the request.
Common error: insufficient_pdfs
You sent fewer than 2 pdf multipart fields. The endpoint refuses a 1-input request because there's nothing to merge — return the one PDF unchanged on your side. If you're getting insufficient_pdfs on a call you thought had multiple inputs: check that all field names are pdf exactly (not pdfs or file); some HTTP clients silently rename multipart parts on conflict. Also check that you're not accidentally sending the same buffer twice with one field name — some FormData libraries dedupe by name unless explicitly told to repeat.
Common error: invalid_pdf
One of the input PDFs couldn't be parsed by pdf-lib. The details field identifies which input index failed (0-based). Common causes: the file isn't actually a PDF (check the first 4 bytes — should be %PDF); the PDF is encrypted (decrypt server-side first via qpdf or pdftk); the PDF is corrupt or truncated (re-read from source); the PDF uses a feature pdf-lib doesn't support yet (rare, but PDF 2.0 with object-streams + encryption can trip it). Debug: try opening the file locally in Acrobat or Preview — if those can read it, it's a pdf-lib quirk worth reporting: reply to your key email or write hello@pdfops.dev.
Common error: save_failed (500)
pdf-lib's save() threw after the merge succeeded structurally. Rare; usually indicates corruption that surfaced during serialization (e.g., a cross-reference table entry that pointed at deleted-during-merge content). Retryable — the next call may succeed if the failure was edge-case timing. If the same merge fails twice in a row with save_failed, one of the input PDFs is the likely root cause; try removing each input one at a time to isolate.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email, the key arrives in your inbox, and the signup page walks you through a first call. For merging PDFs without a headless browser, that call is one line:
curl -X POST https://pdfops.dev/api/merge -H "X-API-Key: $PDFOPS_API_KEY" -F "pdf=@cover.pdf" -F "pdf=@body.pdf" -o combined.pdf
Get a free API key
← All docs · PDFops home
---
# POST /api/metadata — PDFops API reference
Source: https://pdfops.dev/docs/metadata
Endpoint reference
POST /api/metadata
Read the basics of a PDF without opening it yourself: page count, page sizes, the Info fields, encryption and whether it has a form. Returns application/json.
Request
Method: POST. URL: https://pdfops.dev/api/metadata. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/json:
{
"page_count": 2,
"pages": [
{ "width": 612, "height": 792, "rotation": 0 },
{ "width": 792, "height": 612, "rotation": 90 }
],
"title": "Q3 report",
"author": null,
"subject": null,
"keywords": null,
"creator": "Word",
"producer": "pdfops.dev",
"creation_date": "2026-10-01T09:30:00.000Z",
"modification_date": null,
"encrypted": false,
"has_form": true,
"form_field_count": 12,
"form_field_count_capped": false
}
FieldTypeMeaning
page_countnumberPages in the PDF.
pagesarrayOne entry per page, up to 2,000. width and height are the media box in points; rotation is the page's rotation in degrees.
title, author, subject, keywords, creator, producerstring or nullThe Info fields. null when absent.
creation_date, modification_datestring or nullISO 8601 dates. null when absent.
encryptedbooleantrue when the PDF had to be decrypted to read it, including owner-locked files with an empty user password.
has_formbooleantrue when form_field_count is above 0.
form_field_countnumberAcroForm fields found, counted once each however often a form lists them, and never more than 2,000. Use /api/inspect for the names and types.
form_field_count_cappedbooleantrue when the count stopped at the 2,000-field cap or the form is too large to walk fully, so the real number may be higher.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/metadata \
-F "pdf=@report.pdf" \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('report.pdf')], { type: 'application/pdf' }), 'report.pdf');
const res = await fetch('https://pdfops.dev/api/metadata', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops metadata failed: ${err.error}: ${err.details}`);
}
const info = await res.json();
console.log(info.page_count, info.has_form);
Behavioral notes
The media box is reported as stored. A page with rotation 90 shows its width and height unrotated.
Dates are ISO 8601 strings in UTC, or null. An Info entry that is not a string, such as a number where the title belongs, is reported as null.
Encrypted files keep their Info fields. Title, author and dates are read after decryption, including for files that store them in a cross-reference stream.
A page with no readable media box is reported as 612 by 792, the US Letter size viewers assume.
Read-only. The PDF is not changed or stored.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
How is this different from /api/inspect?
Metadata describes the document: pages, sizes, Info fields, encryption. Inspect describes the form: every field name, type and option. Metadata only counts the fields.
What does encrypted mean for an owner-locked PDF?
It is true. The PDF had to be decrypted to read it, even when no password was needed.
Related: Set title and author · List form fields · Remove restrictions.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/page-numbers — PDFops API reference
Source: https://pdfops.dev/docs/page-numbers
Endpoint reference
POST /api/page-numbers
Stamp a page number on each page of a PDF. The format takes {n} and {total} tokens. Returns the numbered PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/page-numbers. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
formatStringNo (default {n} / {total})Label template, up to 100 characters. {n} is the page number, {total} is the page count of the whole PDF. Standard Helvetica only.
positionStringNo (default bottom-center)One of bottom-center, bottom-right, bottom-left, top-center, top-right, top-left.
sizeNumberNo (default 10)Font size in points, 4 to 72.
startIntegerNo (default 1)The number shown on page 1 of the document, 0 to 100000.
marginNumberNo (default 24)Distance in points from the page edge as displayed, 0 to 200.
pagesStringNoPage list such as 1-3,5 (see Page lists). Default: all pages.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Page lists
The pages value is a comma list of items: N (one page), A-B (an inclusive range) or A- (page A through the last page). Pages are 1-based. Spaces around items and around the dash are ignored. last and negative numbers are not supported. A page past the end of the PDF, a reversed range, an empty item or an empty value fails with invalid_pages.
Response
On success: 200 OK, Content-Type: application/pdf, body is the numbered PDF.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
format_too_long400format is over 100 characters.
unsupported_characters400format has a character that standard Helvetica cannot draw. details names the first one.
invalid_parameter400position, size, start or margin is invalid or out of range. details names it.
invalid_pages400pages is empty, malformed or out of range. details says which item failed.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/page-numbers \
-F "pdf=@report.pdf" \
-F "format=Page {n} of {total}" \
-F "position=bottom-right" \
-o numbered.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('report.pdf')], { type: 'application/pdf' }), 'report.pdf');
fd.append('format', 'Page {n} of {total}');
fd.append('position', 'bottom-right');
const res = await fetch('https://pdfops.dev/api/page-numbers', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops page-numbers failed: ${err.error}: ${err.details}`);
}
await writeFile('numbered.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
Numbers follow the whole document. Page i shows start + i - 1, even when pages selects only some pages. {total} is always the full page count.
The label is placed on the page as displayed. It is upright for any page size and any existing page rotation. The margin is measured from the edge of the visible area: the CropBox when a page has one, else the media box.
The output is deterministic. The modification date and producer are pinned, and an existing creation date is kept.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
How do I skip the cover page?
Send pages=2-. Page 2 then shows 2, because numbers follow the whole document. To show 1 on page 2, send start=0.
Can I change the font or colour?
No. Numbers are drawn in dark grey standard Helvetica. You can change the size, position, margin and label text.
Related: Add a text watermark · Join PDFs · Set title and author.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/protect — PDFops API reference
Source: https://pdfops.dev/docs/protect
Endpoint reference
POST /api/protect
Encrypt a PDF. Set a password to open it, an owner password that lifts the restrictions, or both, and choose which actions stay allowed. Returns the encrypted PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/protect. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
user_passwordStringAt least one of the two passwordsThe password needed to open the output. 1 to 32 characters, each in the Latin-1 range (U+0020 to U+00FF).
owner_passwordStringAt least one of the two passwordsThe password that lifts the permission restrictions. 1 to 32 characters, each in the Latin-1 range (U+0020 to U+00FF).
permissionsStringNoComma list of what stays allowed, from print, copy, modify, annotate, fill-forms. Default: everything allowed, except modify when owner_password is set. An empty value allows none.
passwordStringNoOpens an input PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/pdf, body is the encrypted PDF.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
missing_password400Neither user_password nor owner_password was sent.
invalid_password400A password is longer than 32 characters or has a character outside U+0020 to U+00FF. The format stores 32 bytes, so a longer password would be cut silently and a different one would not open the file; it is rejected instead. details names the field.
invalid_permissions400permissions has a name that is not one of the five. details names it.
encrypt_failed500The PDF could not be encrypted (internal error). Retryable.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/protect \
-F "pdf=@statement.pdf" \
-F "user_password=open-sesame" \
-F "owner_password=admin-only" \
-F "permissions=print,fill-forms" \
-o protected.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('statement.pdf')], { type: 'application/pdf' }), 'statement.pdf');
fd.append('user_password', 'open-sesame');
fd.append('owner_password', 'admin-only');
fd.append('permissions', 'print,fill-forms');
const res = await fetch('https://pdfops.dev/api/protect', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops protect failed: ${err.error}: ${err.details}`);
}
await writeFile('protected.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
Send at least one password. With only owner_password, anyone can open the file and the restrictions apply. With only user_password, opening needs the password.
Restrictions only bind a viewer when an owner password is set. Viewers honour them voluntarily, so treat them as a request, not a lock.
The output is always AES-128 encrypted. The input's PDF header version does not matter: a PDF 1.3, 1.4 or 2.0 file is written as PDF 1.7 with AES-128, never the weak 40-bit or 128-bit RC4 ciphers that older headers would otherwise select. Passwords are limited to 32 Latin-1 characters because that is what the format can store.
The output is not byte-deterministic. Encryption uses a random document ID and salts, so the same input gives different bytes each call. Dates and producer are still pinned.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
What is the difference between the two passwords?
The user password is needed to open the file. The owner password lifts the permission restrictions, such as printing or copying.
Can I protect a PDF that already has a password?
Yes. Send the current open password in password. The output is encrypted again with the new passwords.
Related: Remove restrictions · Add a text watermark · Read PDF properties.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/rotate — PDFops API reference
Source: https://pdfops.dev/docs/rotate
Endpoint reference
POST /api/rotate
Rotate every page of a PDF, or only chosen pages. The turn is added to each page's current rotation. Returns the rotated PDF as application/pdf, with the same pages in the same order.
Request
Method: POST. URL: https://pdfops.dev/api/rotate. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesThe PDF to work on, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
degreesStringYesOne of 90, 180, 270 or -90.
pagesStringNoPage list such as 1-3,5 (see Page lists). Default: all pages.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Page lists
The pages value is a comma list of items: N (one page), A-B (an inclusive range) or A- (page A through the last page). Pages are 1-based. Spaces around items and around the dash are ignored. last and negative numbers are not supported. A page past the end of the PDF, a reversed range, an empty item or an empty value fails with invalid_pages.
Response
On success: 200 OK, Content-Type: application/pdf, body is the rotated PDF.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_degrees400degrees is missing or not one of 90, 180, 270, -90.
invalid_pages400pages is empty, malformed or out of range. details says which item failed. Pages listed more than once count once.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/rotate \
-F "pdf=@scan.pdf" \
-F "degrees=90" \
-F "pages=2-3" \
-o rotated.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('scan.pdf')], { type: 'application/pdf' }), 'scan.pdf');
fd.append('degrees', '90');
fd.append('pages', '2-3'); // omit to rotate every page
const res = await fetch('https://pdfops.dev/api/rotate', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops rotate failed: ${err.error}: ${err.details}`);
}
await writeFile('rotated.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
The turn is added to the page's existing rotation and the result is normalized to 0 to 359. A page already at 90 degrees, rotated by 270, ends at 0.
A page listed twice is rotated once.
The output is deterministic. Dates are set to the Unix epoch and the producer to pdfops.dev.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
Does rotating twice cancel out?
Rotations add up. Call it with degrees=90 and then again with degrees=-90 and the pages are back where they started.
Can I rotate only the scanned pages?
Yes. Send pages, for example pages=4-6. Pages you do not list are left alone.
Related: Extract or reorder pages · Delete pages · Stamp page numbers.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/set-metadata — PDFops API reference
Source: https://pdfops.dev/docs/set-metadata
Endpoint reference
POST /api/set-metadata
Write the Info fields of a PDF: title, author, subject, keywords and creator. Send any of them. Returns the updated PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/set-metadata. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
titleStringAt least one of the fiveUp to 1,000 characters.
authorStringAt least one of the fiveUp to 1,000 characters.
subjectStringAt least one of the fiveUp to 1,000 characters.
keywordsStringAt least one of the fiveComma list. Items are trimmed and empty ones dropped. Up to 1,000 characters.
creatorStringAt least one of the fiveUp to 1,000 characters.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/pdf, body is the updated PDF.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
no_fields400None of title, author, subject, keywords, creator was sent.
field_too_long400A field is over 1,000 characters. details names it.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/set-metadata \
-F "pdf=@report.pdf" \
-F "title=Q3 report" \
-F "author=Finance team" \
-F "keywords=quarterly, finance" \
-o report-tagged.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('report.pdf')], { type: 'application/pdf' }), 'report.pdf');
fd.append('title', 'Q3 report');
fd.append('author', 'Finance team');
fd.append('keywords', 'quarterly, finance');
const res = await fetch('https://pdfops.dev/api/set-metadata', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops set-metadata failed: ${err.error}: ${err.details}`);
}
await writeFile('report-tagged.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
Fields you do not send are left as they are. An empty string sets an empty value.
Unicode is fine here. Info strings are written as UTF-16.
Keywords are stored space-joined. That is how the Info dictionary models them.
The output is unencrypted. An owner-locked input is saved decrypted, as in /api/unlock.
The output is deterministic. The modification date and producer are pinned, and an existing creation date is kept.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
Can I set the dates or the producer?
No. The modification date and producer are pinned by the service, and an existing creation date is kept.
How do I read the current values first?
Call /api/metadata.
Related: Read PDF properties · Remove restrictions · Stamp page numbers.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/signup — PDFops API reference
Source: https://pdfops.dev/docs/signup
Endpoint reference
POST /api/signup
Get a free API key — 250 requests/month — emailed to the address you submit. Returns { "ok": true }; the key itself never appears in the response body. Re-signing up with the same email rotates the key: the old one is revoked, a fresh one is emailed.
Using n8n? Get a key in 60 seconds
If you arrived from the PDFops API credential in n8n, this is the whole flow. The n8n-nodes-pdfops community node is verified by n8n; on self-hosted n8n it installs from Settings → Community Nodes → Install.
Run your first call
Paste the key from your email. It fills in the commands below and stays in this page.
API key
curl · inspect a sample PDF
copy
curl -o invoice-template.pdf https://pdfops.dev/invoice-template.pdf
curl -X POST https://pdfops.dev/api/inspect \
-H "X-API-Key: pdfops_live_..." \
-F pdf=@invoice-template.pdf
Run it now
Using Claude Code? Add the MCP server with your key:
claude code · mcp
copy
claude mcp add pdfops -e PDFOPS_API_KEY=pdfops_live_... -- npx -y pdfops-mcp
Request the key with the form above. It arrives from hello@pdfops.dev, usually within a minute. No card, no password.
Open any PDFops node in n8n, set Credential to connect with to Create new credential, and paste the key into API Key.
Save. n8n tests the credential against GET /api/usage; a green "Connection tested successfully" means the key is live.
Run a workflow. Every PDFops operation now sends the key as X-API-Key. The Get Usage operation, which needs a key, shows your tier, used and remaining calls, and the reset date.
What the key changes
ModeQuotaTied toGet Usage operation
No credential100 requests/monthThe IP address your n8n calls fromNot available
Free key250 requests/monthYour key, wherever n8n runsAvailable
Indie / Pro4,000 / 25,000 requests/monthThe same key, re-tieredAvailable
The node works without a credential, so the key is optional. It matters once a workflow runs on a schedule or loops over many rows: the keyless quota is counted per IP, and the key's quota follows you. Paid tiers are at /pricing; upgrading keeps the same key string, so the n8n credential never needs editing.
Example: merge two PDFs with your key
A five-node workflow: Manual Trigger → Code (two sample PDF URLs) → HTTP Request (download each) → PDFops Merge → PDFops Get Usage. Both PDFops nodes use your credential. Download merge-with-api-key.json, then in n8n open a new workflow, choose … → Import from File (or open the file, copy its contents and paste onto the canvas), select your PDFops credential on both PDFops nodes, and click Execute workflow.
Expected result: Merge PDFs emits one item with a binary merged.pdf and { "fileName": "merged.pdf", "mergedCount": 2 }; Check Quota emits { "tier": "free", "limit": 250, "used": …, "remaining": …, "period": …, "resets_at": … }. To merge your own files, replace the two URLs in the Code node, or feed any node that outputs PDF binaries in the data field into Merge PDFs; it joins them in item order.
More recipes: the published n8n templates for filling and emailing forms, bulk-filling forms from Google Sheets, merged onboarding packets and Stripe invoice PDFs.
Request
Method: POST. URL: https://pdfops.dev/api/signup. Body: application/json.
FieldTypeRequiredDescription
emailstringYesThe address the key is sent to. Normalized (trimmed, lowercased) before use. One active key per email.
Response
On success: 200 OK, Content-Type: application/json, body is { "ok": true }. The key arrives by email — it is never returned in the body.
Why emailed instead of returned? Two reasons. Ownership proof: anyone can POST any email address, but only the inbox owner receives the key, so delivery doubles as verification — no separate confirm-your-email step. Hygiene: a key in a response body can end up in referrer logs, browser history, CI logs, or shared terminal scrollback; an email keeps it in exactly one place.
On failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_json400Request body wasn't valid JSON.
invalid_email400email missing or didn't match a basic email-shape check.
rate_limited429Signup cap: 5 signups per IP per day. Try again tomorrow.
issue_failed500Key issuance failed. Retryable.
email_failed500The key email couldn't be sent. The just-issued key is revoked before this returns, so a retry starts clean — you'll never have a live key you never received.
Rotation semantics
One active key per email. Signing up again with the same address revokes every previously active key for that email and emails a fresh one.
Rotation is the lost-key recovery path. Keys are stored as SHA-256 hashes only, so they can't be re-sent — re-signup is the only recovery.
Rotation invalidates deployed configs. Any system still using the old key starts getting 401 invalid_api_key the moment the new one is issued. Update your config as soon as the new key arrives.
Upgrading doesn't rotate. Subscribing to Indie or Pro at /pricing re-tiers your existing key — the key string doesn't change.
Example — curl
curl -X POST https://pdfops.dev/api/signup \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
Example — fetch
const res = await fetch('https://pdfops.dev/api/signup', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email: 'you@example.com' }),
});
const json = await res.json();
// json === { ok: true } on success — now check your inbox for the key.
Once the key arrives, pass it as X-API-Key on POST /api/fill-form and POST /api/merge, and check consumption with GET /api/usage or the dashboard.
FAQ
I signed up but didn't get the email — what now?
First check spam/promotions for a message from hello@pdfops.dev. If the send genuinely failed you'd have received a 500 email_failed, not a 200 — and in that case the key was revoked automatically, so just POST /api/signup again. If you got { "ok": true } and the email never arrived, re-signup is still safe: it rotates to a fresh key and sends a new email. Still stuck? Write hello@pdfops.dev.
I lost my API key — can you re-send it?
No — only the SHA-256 hash of the key is stored, so nobody (including PDFops) can recover the original string. Recovery is re-signup: POST /api/signup with the same email revokes the lost key and emails a fresh one. Update any deployed config with the new key, since the old one starts returning 401 invalid_api_key immediately.
Why is the key emailed instead of returned in the response?
Ownership proof (only the inbox owner receives the key, so delivery doubles as verification) and hygiene (response bodies leak into referrer logs, browser history, CI logs; an email keeps the key in exactly one place).
How do I upgrade to a higher quota?
Subscribe at /pricing — Indie is 4,000 requests/month at $16, Pro is 25,000 at $79, both via Stripe. The upgrade re-tiers your existing key, so the key string in your config doesn't change. Need more than Pro? Reply to your key email or write hello@pdfops.dev.
Can I have multiple keys for one email?
No — one active key per email, by design. If you need separate keys per environment (staging vs production), use separate email addresses (plus-addressing like you+staging@example.com works).
← All docs · PDFops home
---
# POST /api/split — PDFops API reference
Source: https://pdfops.dev/docs/split
Endpoint reference
POST /api/split
Cut one PDF into several. Give page ranges, where each comma group becomes one part, or a fixed chunk size. Returns application/json with every part as base64, because one request cannot return several files.
Request
Method: POST. URL: https://pdfops.dev/api/split. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesThe PDF to work on, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
rangesStringOne of ranges or everyPage ranges where each comma group is one part. 1-2,3-5 gives two parts (see Page lists).
everyInteger stringOne of ranges or everyA positive chunk size. every=2 on a 5-page PDF gives parts for pages 1-2, 3-4 and 5.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Page lists
The pages value is a comma list of items: N (one page), A-B (an inclusive range) or A- (page A through the last page). Pages are 1-based. Spaces around items and around the dash are ignored. last and negative numbers are not supported. A page past the end of the PDF, a reversed range, an empty item or an empty value fails with invalid_pages.
Response
On success: 200 OK, Content-Type: application/json:
{
"parts": [
{ "pages": "1-2", "page_count": 2, "pdf": "JVBERi0xLjcK..." },
{ "pages": "3-5", "page_count": 3, "pdf": "JVBERi0xLjcK..." }
],
"count": 2
}
FieldTypeMeaning
countnumberNumber of parts.
partsarrayOne object per part, in order.
parts[].pagesstringThe page label. For ranges, the group as you sent it. For every, a single page like 5 or a range like 3-4.
parts[].page_countnumberPages in this part.
parts[].pdfstringThe part as a base64-encoded PDF.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
invalid_split400Neither or both of ranges and every were sent. Send exactly one.
invalid_every400every is not a positive integer.
invalid_pages400ranges is empty, malformed or out of range, or selects more than 2,000 pages in total. details says which item failed.
too_many_parts400The split would make more than 100 parts.
output_too_large400The JSON response would be over 4 MB (a PDFops limit on JSON responses). Checked before each part is encoded, so nothing is built past the cap. Use fewer pages per request, or call /api/extract-pages once per range to get raw PDFs.
copy_failed500A part could not be copied. Retryable.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/split \
-F "pdf=@contract-bundle.pdf" \
-F "ranges=1-2,3-5" \
-H "X-API-Key: pdfops_live_..."
# returns JSON: {"parts":[{"pages":"1-2","page_count":2,"pdf":""},...],"count":2}
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('contract-bundle.pdf')], { type: 'application/pdf' }), 'contract-bundle.pdf');
fd.append('ranges', '1-2,3-5'); // or: fd.append('every', '2')
const res = await fetch('https://pdfops.dev/api/split', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops split failed: ${err.error}: ${err.details}`);
}
const { parts } = await res.json();
for (const [i, part] of parts.entries()) {
await writeFile(`part-${i + 1}.pdf`, Buffer.from(part.pdf, 'base64'));
}
Behavioral notes
Send exactly one of ranges or every.
Limits: 100 parts per request, 4 MB for the whole JSON response. The base64 text is about a third larger than the PDF bytes.
Ranges can overlap or repeat. ranges=1-3,2-4 gives two parts that share pages 2 and 3.
Each part is deterministic. Dates are set to the Unix epoch and the producer to pdfops.dev.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
Why does split return JSON and not a PDF?
A request returns one body. Several PDFs do not fit in one application/pdf response, so each part is base64 inside a JSON object. Decode parts[].pdf to get the bytes.
How do I split a PDF into single pages?
Send every=1. Each page becomes one part, up to 100 parts per request.
Related: One new PDF from chosen pages · Delete pages · Join PDFs.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/text-to-pdf — PDFops API reference
Source: https://pdfops.dev/docs/text-to-pdf
Endpoint reference
POST /api/text-to-pdf
Turn Markdown, plain text or CSV into a PDF: headings, lists, tables, code blocks and links on the built-in fonts, on A4 or Letter pages. Returns application/pdf.
This is not HTML-to-PDF. It does not render HTML or CSS, has no custom fonts and does not embed images. It lays out a fixed Markdown subset, plain text or CSV itself, in Helvetica (Courier for code), and the same request always produces the same bytes. Use it for reports, notes, logs, exports and generated documents; for a web page as it looks in a browser, it is the wrong tool.
Request
Method: POST. URL: https://pdfops.dev/api/text-to-pdf. Body: application/json, up to 1 MB. Numbers and booleans must be JSON numbers and booleans, not strings.
FieldTypeRequiredDescription
contentStringYesThe document, up to 512 KiB of UTF-8 (tabs count as 4 spaces). Must not be blank. A leading BOM is dropped and CRLF line endings are accepted.
formatStringNomarkdown (default), text or csv.
page_sizeStringNoletter (default, 612 x 792 pt) or a4 (595.28 x 841.89 pt).
marginNumberNoPage margin in points on all four sides, 18 to 144. Default 54 (0.75 inch).
font_sizeNumberNoBody text size in points, 6 to 36. Default 11. Headings scale from it.
titleStringNoSets the PDF's Title metadata, up to 200 characters. Not printed on the page.
page_numbersBooleanNotrue prints Page n of N, centred in the bottom margin. Default false.
monospaceBooleanNoSet body text in Courier instead of Helvetica. Only used with format: "text"; ignored for the other formats. Default false.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request, however many pages it makes. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/pdf, the PDF as the body. Dates in the PDF are fixed and the Producer is pdfops.dev, so the same request returns byte-identical output. The page carries no PDFops footer, on any plan: it is your document.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Markdown subset
The Markdown reader is a small, fixed subset, not a full CommonMark or GitHub renderer. What is drawn:
Headings # to ######, with optional closing #s, kept together with the line that follows.
Paragraphs with bold (**x**, __x__), italic (*x*, _x_) and `code`. Emphasis follows the CommonMark delimiter rules, so snake_case stays literal and an unmatched marker is printed as typed. Backslash escapes work on ASCII punctuation. A hard line break is two trailing spaces or a trailing backslash.
Links [text](url), [text]() and [text](url "title"). They print as blue text followed by the URL in parentheses, so the address survives printing; the title is ignored. Only http://, https:// and mailto: links are also clickable, up to 2,000 links per document and 2,048 characters per URL. Past those caps the link still prints as text. An empty destination is plain text.
Fenced code blocks with ``` or ~~~, in Courier on a shaded background. Whitespace is kept exactly; a line wider than the page wraps at the margin like a terminal. The language after the fence is not used for highlighting.
Lists, bulleted (-, *, +) or numbered (1. or 1); both are drawn as 1.). An item can hold more paragraphs, a code block, a quote or a table when indented under it. Nesting goes one level deep; deeper items are drawn at that level.
Blockquotes with >, one level. What is inside is read as Markdown, so lists, code and tables work in a quote.
Horizontal rules ---, *** and ___.
Tables in the GitHub pipe form: a header row, a |---|---| separator, then rows. The header is bold and shaded and repeats on each page; columns are sized from the content and cells wrap. A pipe inside a code span or written \| does not split a cell. Up to 20 columns and 100,000 cells.
Page breaks with \pagebreak or on a line of its own. Repeated or trailing breaks never make an empty page.
What stays literal text: images (), raw HTML, setext headings (text underlined with ===; text over a --- line is a paragraph followed by a horizontal rule), task-list boxes, and anything else not listed above. Table column alignment (:---:) is ignored; every column is left-aligned. A pipe table with more than 20 columns is printed as ordinary paragraph text.
format: "text" draws the content as typed: spaces and line breaks are kept, long lines wrap at the margin, and nothing is interpreted. format: "csv" follows RFC 4180 (quoted fields, doubled quotes, commas and line breaks inside quotes); blank lines are skipped, short rows are padded to the widest row, and the first row is the header.
Limits
LimitValueOver the limit
Request body1 MB413 request_too_large
content512 KiB of UTF-8, counted again after tabs become 4 spacescontent_too_large
Output pages200too_many_pages
CSV20 columns, 10,000 rows, 100,000 cellstoo_many_columns, csv_too_large
Markdown table100,000 cellstable_too_large
Draw operations115,000content_too_complex
List items / blocks30,000 / 60,000content_too_complex
CharactersWinAnsi onlyunsupported_characters
Draw operations. Every piece of text drawn, shaded rectangle, rule and link is one operation, and a document may use 115,000 of them. Ordinary prose never gets near it. Tables do, because every wrapped line inside a cell is its own operation, so the cell cap alone does not tell you what fits. Examples: 20 columns of a single character c at font_size 6 and margin 18 fit all 100,000 cells (5,000 rows); 20 columns of 1234.56 at font_size 11 and the default margin on Letter fit at most 1,738 rows including the header (34,760 cells, 1,758 rows on A4), because those cells wrap, and one more row returns content_too_complex. A smaller font_size or a smaller margin stops cells wrapping. Heavy inline formatting (thousands of bold, italic, code and link runs) draws against the same budget, and the error message says whether tables or inline formatting used it up. The fix is a shorter document, fewer rows or columns, a smaller font_size, or several requests.
Characters. The built-in fonts draw WinAnsi (Windows-1252, roughly Latin-1) only: English and Western European letters, digits, common punctuation, curly quotes, dashes, the euro sign. Emoji, Cyrillic, Greek, CJK and Arabic are rejected with unsupported_characters rather than replaced with a blank. details gives the code point and the line and column of the first one in your text, for example U+041F ("П") at line 3, column 8. Replace or remove it and retry.
Error codes
Error codeStatusTrigger
invalid_json400Request body isn't parseable JSON.
invalid_body400The JSON is valid but is not an object.
missing_content400content is absent, blank, or (for CSV) has no rows.
invalid_content400content is not a string.
content_too_large400content is over 512 KiB of UTF-8, as sent or after tabs expand to 4 spaces.
invalid_format400format is not markdown, text or csv.
invalid_page_size400page_size is not a4 or letter.
invalid_parameter400margin or font_size is not a JSON number in range, title is not a string of at most 200 characters, or page_numbers or monospace is not a boolean.
unsupported_characters400content has a character outside WinAnsi. details names the code point, line and column.
invalid_csv400A quoted CSV field is never closed.
too_many_columns400A CSV row has more than 20 cells.
csv_too_large400The CSV has more than 10,000 rows or 100,000 cells.
table_too_large400A Markdown table has more than 100,000 cells.
table_too_wide400A table has more columns than fit across the page at this font_size and margin. details gives how many fit.
content_too_complex400More than 115,000 draw operations, 30,000 list items or 60,000 blocks. details says which.
too_many_pages400The output would be more than 200 pages.
render_failed500The document could not be laid out.
save_failed500The finished PDF could not be serialized.
request_too_large413The whole request body is over 1 MB. Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
Markdown with a heading, emphasis, a link, a list and a table, with page numbers:
curl -X POST https://pdfops.dev/api/text-to-pdf \
-H "Content-Type: application/json" \
-H "X-API-Key: pdfops_live_..." \
-d '{"content": "# Release notes\n\nVersion **2.4** is out. See the [changelog](https://example.com/changelog).\n\n- Faster merges\n- New `title` option\n\n| Plan | Requests |\n|---|---|\n| Free | 250 |\n| Indie | 4,000 |", "title": "Release notes", "page_numbers": true}' \
-o notes.pdf
Plain text, kept exactly as typed, in Courier on A4:
curl -X POST https://pdfops.dev/api/text-to-pdf \
-H "Content-Type: application/json" \
-d '{"content": "ORDER 1042\n qty item\n 2 widget\n 1 gadget", "format": "text", "monospace": true, "page_size": "a4"}' \
-o order.pdf
CSV as a table (the first row is the header; quote a field that contains a comma):
curl -X POST https://pdfops.dev/api/text-to-pdf \
-H "Content-Type: application/json" \
-d '{"content": "name,qty,price\nWidget,2,9.50\n\"Gadget, large\",1,24.00", "format": "csv"}' \
-o items.pdf
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch
import { writeFile } from 'node:fs/promises';
const headers = { 'Content-Type': 'application/json' };
if (process.env.PDFOPS_API_KEY) headers['X-API-Key'] = process.env.PDFOPS_API_KEY; // optional
const res = await fetch('https://pdfops.dev/api/text-to-pdf', {
method: 'POST',
headers,
body: JSON.stringify({
content: '# Release notes\n\n- Faster merges',
title: 'Release notes',
page_numbers: true,
}),
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops text-to-pdf failed: ${err.error}: ${err.details}`);
}
await writeFile('notes.pdf', Buffer.from(await res.arrayBuffer()));
Python — requests
import os, requests
res = requests.post(
"https://pdfops.dev/api/text-to-pdf",
headers={"X-API-Key": os.environ.get("PDFOPS_API_KEY", "")}, # optional
json={
"content": "name,qty\nWidget,2\nGadget,1",
"format": "csv",
"title": "Items",
},
)
res.raise_for_status()
with open("items.pdf", "wb") as f:
f.write(res.content)
From an AI agent (MCP)
The hosted MCP server at https://pdfops.dev/api/mcp exposes this as the pdf_text_to_pdf tool. It takes the same fields and returns the PDF inline as an application/pdf resource. See PDFops for AI agents.
Behavioral notes
Not HTML-to-PDF. No HTML, CSS, custom fonts or images. The fonts are the standard Helvetica family and Courier.
Deterministic. The same request returns byte-identical PDF bytes.
Unbranded. No "Generated with" footer, on any plan.
Nothing is stored. The document is built for the response and not kept.
Limits: 1 MB request, 512 KiB of content, 200 output pages, 115,000 draw operations.
FAQ
How do I convert Markdown to PDF with an API?
POST a JSON body with a content field holding the Markdown to https://pdfops.dev/api/text-to-pdf. The response is the PDF. Headings, lists, tables, code blocks, quotes and links are laid out on the built-in fonts; set page_size, margin and font_size to change the page.
Is this HTML to PDF?
No. This endpoint lays out a fixed Markdown subset, plain text or CSV itself, on the standard Helvetica and Courier fonts. It does not render HTML or CSS, load custom fonts or embed images, and it has no headless browser.
How do I turn a CSV into a PDF table?
Send the CSV as content with format set to csv. The first row becomes a shaded header row that repeats on each page; columns are sized from the content and cells wrap. Up to 20 columns, 10,000 rows and 100,000 cells.
Why was my text rejected with unsupported_characters?
The built-in fonts only draw WinAnsi (Windows-1252, roughly Latin-1) characters. Anything outside that range, such as emoji, Cyrillic, Greek or CJK, is rejected instead of being replaced with a placeholder. The error names the code point and its line and column in your text.
Is the output the same every time?
Yes. The same JSON request produces byte-identical PDF bytes: the PDF dates are fixed and nothing random is written. The output carries no PDFops footer or branding.
Related: Generate an invoice PDF · Stamp text on a PDF · Add text and images at a position.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# POST /api/unlock — PDFops API reference
Source: https://pdfops.dev/docs/unlock
Endpoint reference
POST /api/unlock
Save a PDF without encryption. Print, copy and modify restrictions are gone from the output. Returns the unlocked PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/unlock. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
passwordStringNoNeeded only for a PDF that asks for a password to open. Owner-locked files with an empty user password open without it.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Response
On success: 200 OK, Content-Type: application/pdf, body is the PDF saved without encryption. If the input was not encrypted, it is returned re-saved, with the response header x-pdfops-note: not-encrypted.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a user password and none was sent, or the one sent is wrong.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/unlock \
-F "pdf=@locked.pdf" \
-o unlocked.pdf \
-H "X-API-Key: pdfops_live_..."
# PDF with an open password: add -F "password=..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('locked.pdf')], { type: 'application/pdf' }), 'locked.pdf');
// fd.append('password', '...'); // only if the PDF asks for one to open
const res = await fetch('https://pdfops.dev/api/unlock', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops unlock failed: ${err.error}: ${err.details}`);
}
if (res.headers.get('x-pdfops-note') === 'not-encrypted') console.log('input was not encrypted');
await writeFile('unlocked.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
This does not crack passwords. It removes restrictions from a file you can already open. A PDF that needs a password to open still needs that password in the password field.
Document info is kept. Title, author, dates and the rest of the Info dictionary survive decryption, including for files that store them in a cross-reference stream.
An unencrypted input is not an error. It comes back re-saved with x-pdfops-note: not-encrypted.
The output is deterministic. The modification date and producer are pinned, and an existing creation date is kept.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
Can it open a PDF when I forgot the password?
No. It does not guess or crack passwords. It only saves a copy without the restrictions, for files you can already open.
How do I add a password instead?
Use /api/protect.
Related: Password-protect a PDF · Set title and author · Read PDF properties.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# GET /api/usage — PDFops API reference
Source: https://pdfops.dev/docs/usage
Endpoint reference
GET /api/usage
Self-serve quota visibility for keyed callers: tier, limit, used, remaining, current period, and reset date for the key you pass. Prefer a browser? The dashboard renders the same numbers — paste your key, no code.
Request
Method: GET. URL: https://pdfops.dev/api/usage. No body.
HeaderRequiredDescription
X-API-KeyYesYour API key (from POST /api/signup or a paid tier at /pricing).
Response
On success: 200 OK, Content-Type: application/json:
{
"tier": "free",
"limit": 250,
"used": 41,
"remaining": 209,
"period": "2026-07",
"resets_at": "2026-08-01T00:00:00.000Z"
}
FieldTypeMeaning
tierstringfree, indie, or pro.
limitnumberYour tier's monthly quota: 250 (free), 4,000 (indie), 25,000 (pro).
usednumberSuccessful (2xx) requests consumed this period. Reads the same counter the rate limiter increments — by construction, the number you see is the number the 429 fires on. There's no second bookkeeping to drift.
remainingnumbermax(0, limit − used).
periodstringCurrent UTC calendar month, e.g. 2026-07.
resets_atstringISO timestamp of the 1st of next month, 00:00 UTC — when the counter resets.
Error codes
Error codeStatusTrigger
missing_api_key401No X-API-Key header. Unlike the PDF endpoints, /api/usage has no anonymous mode — there's no key to report on.
invalid_api_key401The key is unknown or revoked (e.g. rotated by a later signup). Get a fresh one at /pricing.
Calls to /api/usage don't consume quota — only 2xx responses from the PDF endpoints (/api/fill-form, /api/merge) do.
Example — curl
curl https://pdfops.dev/api/usage \
-H "X-API-Key: pdfops_live_..."
The X-API-Key header is required, and a free key comes from pdfops.dev/pricing.
FAQ
Does calling /api/usage consume my quota?
No. Quota is consumed only by successful (2xx) responses from the PDF endpoints. Poll /api/usage as often as you like.
Can the used number disagree with what the rate limiter enforces?
No — by construction. /api/usage reads the same counter the enforcement middleware increments on every 2xx response. There's no separate analytics pipeline that could drift; the number you see is the number the 429 fires on.
Why am I getting 401 invalid_api_key on a key that worked before?
The key was revoked — most commonly because someone re-signed up with the same email, which rotates the key (revokes the old, emails a new one). Check the inbox for a newer key email, or POST /api/signup again for a fresh key.
Is there a no-code way to see my usage?
Yes — the dashboard. Paste your key and it renders the same tier / used / remaining / reset numbers this endpoint returns.
← All docs · PDFops home
---
# POST /api/waitlist — PDFops API reference
Source: https://pdfops.dev/docs/waitlist
Endpoint reference
POST /api/waitlist
Send roadmap feedback: what you'd use PDFops for, how you handle PDFs today, expected volume, and what you'd pay. Aggregate signal drives endpoint prioritization and pricing. Not needed for API keys — those are self-serve: free 250 requests/month key via POST /api/signup or /pricing.
Request
Method: POST. URL: https://pdfops.dev/api/waitlist. Body: application/json.
FieldTypeRequiredDescription
useCasestring[]Yes (non-empty)What you'd use PDFops for. Free-text array; conventional values are invoices, contracts, filled-forms, reports, receipts, merging, other.
currentSolutionstring[]Yes (non-empty)How you handle PDFs today. Conventional values: self-hosted-lib, hosted-paid, in-house, none.
expectedVolumestringYes (non-empty)Monthly PDF volume bucket. Conventional values: lt-1k, 1k-10k, 10k-100k, 100k-plus.
payRangestringYes (non-empty)What you'd pay per month at your expected volume. Conventional values: free-only, lt-20, 20-100, 100-500, 500-plus.
emailstringNoOptional contact email. If omitted, the waitlist row is anonymous (aggregate signal only, no follow-up channel).
messagestringNoFree-text. Specific volume requirements, missing endpoints, integration constraints. Highest-signal field for influencing the roadmap.
Response
On success: 200 OK, Content-Type: application/json, body is { "ok": true }.
On validation failure: 400 Bad Request, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_json400Request body wasn't valid JSON.
invalid_body400Body decoded to null, an array, or a non-object scalar.
invalid_useCase400useCase missing, not an array, or array of non-strings or empty strings.
invalid_currentSolution400currentSolution missing, not an array, or array of non-strings or empty strings.
invalid_expectedVolume400expectedVolume missing or not a non-empty string.
invalid_payRange400payRange missing or not a non-empty string.
invalid_email400email was present but didn't match a basic email-shape regex.
Example — curl
curl -X POST https://pdfops.dev/api/waitlist \
-H "Content-Type: application/json" \
-d '{
"useCase": ["invoices","contracts"],
"currentSolution": ["hosted-paid"],
"expectedVolume": "1k-10k",
"payRange": "20-100",
"email": "you@example.com",
"message": "Need this in a Stripe webhook handler within 2 weeks."
}'
Example — fetch
const res = await fetch('https://pdfops.dev/api/waitlist', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
useCase: ['invoices', 'contracts'],
currentSolution: ['hosted-paid'],
expectedVolume: '1k-10k',
payRange: '20-100',
email: 'you@example.com',
message: 'Need this in a Stripe webhook handler within 2 weeks.',
}),
});
const json = await res.json();
// json === { ok: true } on success
Code examples — other stacks
The fetch example above is the canonical JS/TS form. Equivalents in Python and Go:
Python (3.10+) — httpx
import httpx
payload = {
"useCase": ["invoices", "contracts"],
"currentSolution": ["hosted-paid"],
"expectedVolume": "1k-10k",
"payRange": "20-100",
"email": "you@example.com",
"message": "Need this in a Stripe webhook handler within 2 weeks.",
}
r = httpx.post(
"https://pdfops.dev/api/waitlist",
json=payload,
timeout=10,
)
if r.status_code != 200:
err = r.json()
raise RuntimeError(f"PDFops waitlist failed: {err['error']} — {err['details']}")
Go (1.21+) — net/http
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
type WaitlistEntry struct {
UseCase []string `json:"useCase"`
CurrentSolution []string `json:"currentSolution"`
ExpectedVolume string `json:"expectedVolume"`
PayRange string `json:"payRange"`
Email string `json:"email,omitempty"`
Message string `json:"message,omitempty"`
}
func submit() error {
entry := WaitlistEntry{
UseCase: []string{"invoices", "contracts"},
CurrentSolution: []string{"hosted-paid"},
ExpectedVolume: "1k-10k",
PayRange: "20-100",
Email: "you@example.com",
Message: "Need this in a Stripe webhook handler within 2 weeks.",
}
body, _ := json.Marshal(entry)
resp, err := http.Post(
"https://pdfops.dev/api/waitlist",
"application/json",
bytes.NewReader(body),
)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
var apiErr struct {
Error string `json:"error"`
Details string `json:"details"`
}
json.NewDecoder(resp.Body).Decode(&apiErr)
return fmt.Errorf("waitlist failed: %s — %s", apiErr.Error, apiErr.Details)
}
return nil
}
Behavioral notes
Anonymous submissions are accepted. Omit email and the waitlist row contributes to aggregate signal only.
IP is hashed. The client IP from the edge is hashed (SHA-256) and stored as ip_hash. Used for rate-limiting and de-duplication; not reversible.
Message is the highest-signal field. Aggregate counts of useCase + payRange are noisy; specific notes about volume / blocking constraints / missing endpoints drive what ships next.
No webhook back. Submissions are stored to Turso + fire a Discord notification on the operator side; you won't receive a callback. If your feedback needs a reply, include an email — that's the follow-up channel.
Not the way to get an API key. Keys are self-serve: POST /api/signup emails you a free 250 requests/month key immediately, and paid tiers are live at /pricing.
FAQ
Do I need to submit via the form, or can I post JSON directly?
Either works. The landing-page form at https://pdfops.dev/#waitlist posts the same JSON shape. Posting directly is useful for programmatic submission.
Are use case and current solution free-text or enums?
Free-text arrays at the API level. The landing-page form sends conventional values, but any strings work. Aggregated post-hoc with json_each on the read side.
What goes in the message field?
Free text. Specific volume requirements, missing endpoints, integration constraints. Highest-signal input for influencing the roadmap during the discovery window.
Is the email field required?
Optional at the API. Anonymous submissions contribute to aggregate signal but there's no way to follow up.
Is the IP address stored?
Hashed (HMAC-SHA256, keyed with a server-side secret) before storage; only the hash lands in storage. Used for rate-limiting and de-duplication.
Common error: invalid_email
The email field is present but doesn't match a basic email-shape regex (the validator looks for something like user@domain.tld — intentionally loose, not RFC-strict). Fix: omit the field entirely if you don't have one (anonymous submissions are accepted), or supply a real address. Common gotchas: sending an empty string (use null or omit), sending the literal word "undefined" from a JS client that didn't coerce a missing value, or sending an array (the field is a single string).
Common error: invalid_useCase (or any invalid_*)
One of the required fields is missing, the wrong type, or empty. Specifically: useCase and currentSolution must be non-empty arrays of non-empty strings; expectedVolume and payRange must be non-empty strings. The error field tells you exactly which validator failed (e.g., invalid_useCase, invalid_payRange). Most-common cause from client code: forgetting to wrap a single value as an array ("invoices" vs ["invoices"]); the API explicitly requires arrays so the read-side json_each aggregation works.
Common error: invalid_json / invalid_body
invalid_json means the request body didn't parse as JSON — check your Content-Type: application/json header and that you're sending a JSON string body, not a form-encoded body. invalid_body means the body parsed but decoded to null, an array, or a primitive scalar; the endpoint requires a JSON object. Common gotcha: some HTTP clients (especially older Python requests) default to form-encoding unless you explicitly pass json=payload instead of data=payload.
← All docs · PDFops home
---
# POST /api/watermark — PDFops API reference
Source: https://pdfops.dev/docs/watermark
Endpoint reference
POST /api/watermark
Stamp text across the pages of a PDF, such as DRAFT or CONFIDENTIAL. Choose opacity, size, colour, angle and position. Returns the stamped PDF as application/pdf.
Request
Method: POST. URL: https://pdfops.dev/api/watermark. Body: multipart/form-data.
FieldTypeRequiredDescription
pdfFile (PDF binary)YesExactly one PDF, up to 4 MB and 2,000 pages. The whole request must stay under 4.5 MB, Vercel's platform request limit.
textStringYesThe watermark text, up to 200 characters. Standard Helvetica only (Latin-1 range); other characters fail with unsupported_characters.
opacityNumberNo (default 0.15)0.05 to 1.
sizeNumberNo (default 48)Font size in points, 6 to 200.
colorStringNo (default 808080)Hex colour with 3 or 6 digits, such as cc0000. A leading hash is optional.
rotationNumberNo (default 45)Degrees counter-clockwise as the viewer sees it, -360 to 360.
positionStringNo (default center)center, top or bottom. Top and bottom sit at 90% and 10% of the page height.
pagesStringNoPage list such as 1-3,5 (see Page lists). Default: all pages.
passwordStringNoOpens a PDF that needs a user password. Not needed for owner-locked files with an empty user password.
The optional X-API-Key header works as on /api/merge: no header is anonymous, 100 requests per IP per month; a valid key uses your tier's quota; an invalid or revoked key returns 401 invalid_api_key. A successful (2xx) call counts 1 request. Check consumption with GET /api/usage.
Page lists
The pages value is a comma list of items: N (one page), A-B (an inclusive range) or A- (page A through the last page). Pages are 1-based. Spaces around items and around the dash are ignored. last and negative numbers are not supported. A page past the end of the PDF, a reversed range, an empty item or an empty value fails with invalid_pages.
Response
On success: 200 OK, Content-Type: application/pdf, body is the watermarked PDF.
On any failure: 4xx or 500, Content-Type: application/json, body is { "error": "", "details": "" }.
Error codes
Error codeStatusTrigger
invalid_multipart400Request body could not be parsed as multipart/form-data.
missing_pdf400The request does not have exactly one pdf file field.
pdf_too_large400The pdf file is over 4 MB.
invalid_pdf400The PDF could not be parsed (corrupt, or not a PDF).
encrypted_pdf400The PDF needs a password we were not given. Owner-locked files with an empty user password (most government blanks) open on their own; for a real user password send it as the password form field.
decompressed_too_large400Object streams inside the PDF decompress to over 32 MB.
too_many_pages400The PDF has over 2,000 pages.
missing_text400text is missing or empty.
text_too_long400text is over 200 characters.
unsupported_characters400text has a character that standard Helvetica cannot draw. details names the first one.
invalid_parameter400opacity, size, rotation, color or position is invalid or out of range. details names it.
invalid_pages400pages is empty, malformed or out of range. details says which item failed.
save_failed500PDF serialization failed. Retryable.
request_too_large413The whole request body is over 4.5 MB (Vercel's platform request limit). Rejected before anything is parsed.
invalid_api_key401An X-API-Key header was sent but the key is unknown or revoked. No fallback to the anonymous IP cap. Get a fresh key at /pricing.
rate_limited (anonymous)429No X-API-Key header and the per-IP limit (100/month) is exhausted. Retry-After gives seconds until next calendar month.
rate_limited (keyed)429Your key's tier quota (Free 250 / Indie 4,000 / Pro 25,000 per month) is exhausted. Retry-After gives seconds until next calendar month.
Example
curl -X POST https://pdfops.dev/api/watermark \
-F "pdf=@contract.pdf" \
-F "text=DRAFT" \
-F "opacity=0.2" \
-F "color=cc0000" \
-o draft.pdf \
-H "X-API-Key: pdfops_live_..."
Keyless calls work: 100 requests per IP per month with no key.
Using this for real? A free API key raises the keyless 100 calls per IP to 250 requests a month, with no card.
Get a free API key
Code examples
Have an API key? Add an X-API-Key header to any request. It is optional, and it raises your quota from 100/IP/month to your tier's. Get a free key at pdfops.dev/pricing.
JavaScript (Node.js 22+) — built-in fetch + FormData
import { readFile, writeFile } from 'node:fs/promises';
const fd = new FormData();
fd.append('pdf', new Blob([await readFile('contract.pdf')], { type: 'application/pdf' }), 'contract.pdf');
fd.append('text', 'DRAFT');
fd.append('opacity', '0.2');
fd.append('color', 'cc0000');
const res = await fetch('https://pdfops.dev/api/watermark', {
method: 'POST',
headers: { 'X-API-Key': process.env.PDFOPS_API_KEY }, // optional
body: fd,
});
if (!res.ok) {
const err = await res.json();
throw new Error(`PDFops watermark failed: ${err.error}: ${err.details}`);
}
await writeFile('draft.pdf', Buffer.from(await res.arrayBuffer()));
Behavioral notes
The text is placed on the page as displayed. It is upright and centred in the visible area for any page size and any existing page rotation. When a page has a CropBox, the text is placed against it (what a viewer shows), not the full media box.
Text only. No custom font and no Unicode beyond Latin-1. To stamp a logo or other image, use /api/edit.
The output is deterministic. The modification date and producer are pinned, and an existing creation date is kept.
Limits: 4 MB per PDF, 2,000 pages, 4.5 MB per request (Vercel's platform limit).
FAQ
Can I use an image as a watermark?
Not with this endpoint, which stamps text only. /api/edit places a PNG or JPEG on any page at a position, size and opacity you choose; send one image item per page for an every-page logo.
Why was my text rejected with unsupported_characters?
The text is drawn in standard Helvetica, which covers the Latin-1 range. A character outside it, such as a CJK character or an emoji, is refused. details names the first bad character.
Related: Add text and images at a position · Stamp page numbers · Password-protect a PDF · Set title and author.
Get a free API key. Keyless calls get 100 requests per IP per month; a free key raises that to 250, with no card. Enter your email and the key arrives in your inbox.
Get a free API key
← All docs · PDFops home
---
# Contract PDFs from onboarding flows — PDFops use case
Source: https://pdfops.dev/use-cases/contracts
Use Case
Contract PDFs from onboarding flows
Auto-fill vendor agreements, NDAs, MSAs, W-9s, and
contractor contracts from the data you already collect in
your onboarding form. Skip the "download blank PDF, fill
it, scan it, send it back" step entirely.
Who this fits
Multi-business operators and agencies. Vendor onboarding, contractor agreements, NDAs at scale. The contract is template-driven; the variables come from the onboarding form.
SaaS apps with B2B sales. Order forms, MSAs, DPAs that ride on top of the same customer-info form your sales team already collects.
Staffing / freelance marketplaces. Independent contractor agreements with the worker, statement-of-work PDFs for the engaging customer.
HR / payroll platforms. W-9 (US) and W-8BEN (non-US) tax forms auto-filled from contractor onboarding data.
The pattern, end-to-end
The shape is a webhook handler that listens to the onboarding form's "submitted" event, fills the relevant contract template, stashes the result, and emails the contractor or vendor a signing link:
Onboarding form → your webhook handler (Tally, Typeform, Formspark, Clerk, your own HTML form posting to a route). Verify signature.
Handler → object storage: fetch the contract template (NDA / MSA / W-9 / etc., chosen based on the onboarding answers).
Handler → PDFops: POST /api/fill-form with the template + the onboarding answers as field values.
Handler → object storage: stash the filled contract with a non-guessable key (it contains PII — see auth-boundary note in the blog walkthrough).
Optional: Handler → e-signature provider: upload the filled PDF to DocuSign / Dropbox Sign / HelloSign and trigger the signing flow. Or email a download link if the contractor signs offline.
Concrete walkthrough with code: Auto-filling a W-9 from a contractor-onboarding webhook on Vercel Edge — ~60 lines of TypeScript, includes the auth-boundary footgun (TIN in URL) and how to harden it. Two companion walkthroughs cover the same pattern's other halves: signed contracts from a Tally webhook on Workers (the counter-signing flow) and audit-trail PDFs from a Next.js Server Action (the metadata cover page).
Try it
Use the sample template (it has customer_name + total but the call shape is identical for any AcroForm template):
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@nda-template.pdf" \
-F 'fields={"party_name":"Acme Co","effective_date":"2026-05-19","term_years":"2","jurisdiction":"Delaware"}' \
-o filled-nda.pdf
Author your NDA / MSA / W-9 template in any PDF editor (Acrobat, Mac Preview, LibreOffice Draw, pdftk). Rename the AcroForm fields to short predictable names (party_name, effective_date, tin, scope_of_work) so your calling code is stable across template revisions — the free form-field inspector shows what a template's fields are named right now. Full reference at the fill-form docs.
Variations
NDAs. Party names, effective date, term length, jurisdiction. ~5-7 fields.
MSAs. Parties, scope, payment terms, IP assignment language toggle, term, termination notice. ~10-15 fields, often with a toggle field driving a checkbox in the rendered output.
Vendor onboarding packets. Multi-page bundle of NDA + W-9 + ACH form. Use /api/fill-form per template, then /api/merge to assemble the packet — the KYC-packet walkthrough shows the same chain end to end.
Contractor agreements (1099). Combined W-9 + scope-of-work + payment-terms PDF. Same pattern: fill each, merge.
Service agreements / SOWs. Parties, deliverables, milestone dates, milestone amounts. Fixed-row count works for ≤8 milestones; for more, see the FAQ on computed line items.
International contractor onboarding. W-8BEN for non-US persons. Same fill-form call shape against the IRS's fw8ben.pdf template (already AcroForm-enabled by the IRS).
FAQ
Why generate contract PDFs from form data?
Data quality (form-validated input beats hand-typed PDF entries) and friction (asking someone to fill the same data twice is the most common onboarding-abandon point). The underlying contract is templated; the variables come from data you already have.
Does PDFops handle e-signature?
No — that's a separate problem. DocuSign / Dropbox Sign / HelloSign do it well. PDFops sits upstream: fill the contract, hand the filled PDF to your e-sign provider. The integration is typically "PDFops returns bytes → your code uploads to e-sign envelope API."
Which contract types fit?
Anything with fixed legal language + a small set of variable fields. NDAs, MSAs, vendor onboarding packets, independent-contractor agreements, service agreements, W-9 / W-8BEN. Legal owns the fixed copy; ops populates the blanks per-contract.
How do I keep templates current when legal updates them?
Templates are regular PDFs with AcroForm fields. Legal edits the text in their PDF editor; the field names stay the same so calling code doesn't change. Version the template files; tag each generated PDF with a footer like "NDA v2.3.1 / generated 2026-05-19" to anchor to a specific template revision.
What about computed line items (SOW milestones)?
Fixed-line-count templates (≤8 milestones) work for most cases. For more, combine fixed sections with /api/merge — generate the milestones page separately and merge into the master contract.
Get higher-tier access
Anonymous tier (100/IP/month) is fine for evaluation. For production volume across a vendor / contractor portfolio, get a free API key (250 requests/month — email in, key out, no card). Paid tiers are live: Indie $16/mo for 4,000 requests, Pro $79/mo for 25,000.
← PDFops home · Docs · Blog
---
# Use cases — PDFops
Source: https://pdfops.dev/use-cases
Use Cases
What PDFops is built for
Three vertical-shaped use cases where the AcroForm fill +
merge primitive lands cleanly. Each page covers the pattern
end-to-end with concrete walkthroughs from the blog.
Invoice PDFs at scale
Billing-webhook → fill invoice template → store + email. SaaS billing, e-commerce, freelance, marketplaces. Companion walkthrough: Generating invoice PDFs from Stripe webhooks on Cloudflare Workers.
Contract PDFs from onboarding flows
Onboarding-form-submit → fill NDA / MSA / W-9 / contractor agreement → optionally feed into e-signature. Companion walkthrough: Auto-filling a W-9 from a contractor-onboarding webhook on Vercel Edge.
Report PDFs at scale
Cron-driven monthly statements, webhook-driven inspection reports, audit summaries, KPI digests. Companion walkthrough: Monthly PDF bundles on a Cloudflare Cron Trigger.
All three run on the same primitives:
fill-form,
merge, and
inspect. Try them in the browser
first — the form-field inspector
and the invoice generator are free,
no signup — then grab a free API key
when it's time to automate.
Step-by-step automation guides:
Stripe payment to PDF invoice,
Google Sheets row to PDF invoice,
Google Sheets row to filled PDF form,
merge PDFs in a Google Drive folder,
HTML to PDF over a webhook in n8n, and
extract invoice data from a PDF into Google Sheets.
← PDFops home · Docs · Blog
---
# Invoice PDFs at scale — PDFops use case
Source: https://pdfops.dev/use-cases/invoices
Use Case
Invoice PDFs at scale
Generate invoice PDFs from billing webhooks (Stripe,
Paddle, Chargebee, Lemon Squeezy, your own) at low cost. Fill an invoice template with
per-customer data, store + email the PDF in under a
second, no headless Chrome or long-running backend.
Who this fits
SaaS billing flows. Subscription invoices on payment-succeeded webhooks. Tax-compliant PDF on every charge.
E-commerce platforms. Order receipts and tax invoices from order-completed webhooks. Multi-currency, multi-region.
Freelance and consulting. Per-project invoices from time-tracking or project-management tools.
Marketplaces. Per-transaction invoices for buyer + seller halves with different layouts.
The pattern, end-to-end
The canonical shape is a webhook handler that fills an invoice template and stores the result. From the billing-system event to a customer-readable PDF link is a single request:
Billing system → your webhook handler (Stripe payment_intent.succeeded, Paddle transaction.completed, etc.). Verify the signature.
Handler → object storage: fetch the invoice template PDF (~10-30ms).
Handler → PDFops: POST /api/fill-form with the template + the billing-event data as field values (~100-200ms including network).
Handler → object storage: stash the filled PDF for later access (~30-50ms).
Handler → email service: fire-and-forget transactional email with a presigned download URL.
Handler → billing system: 200 OK.
Full walkthrough with code: Generating invoice PDFs from Stripe webhooks on Cloudflare Workers — ~50 lines of TypeScript, complete with template fetch, fill-form call, R2 stash, and email trigger.
Try it
Grab the sample invoice-template.pdf (it has customer_name + total AcroForm fields ready to fill), then:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@invoice-template.pdf" \
-F 'fields={"customer_name":"Acme Co","total":"$1,250.00"}' \
-o filled-invoice.pdf
For your real templates, name your AcroForm fields customer_name, amount, currency, invoice_id, date, due_date, line_item_1_desc, line_item_1_amount, etc. — short predictable names that survive your template editor's annual quirks; the free form-field inspector lists the names any template currently has. Full reference at the fill-form docs.
No template at all? The /api/invoice endpoint builds a complete, deterministic invoice PDF straight from JSON — line items, totals, tax — and the free invoice generator runs the same call in your browser.
Variations
Subscription invoices. Same template, same shape. The webhook fires once per period (monthly, annually) on renewal.
One-off invoices. Fires on a manual-charge event or a recurring-charge-failed retry. Template can be the same or a "past-due" variant.
Refund credits. Use a separate credit-memo template; fill it from a charge.refunded event. Same primitives.
Multi-currency. Template-per-currency in object storage, branch in the handler. PDF-LIB handles right-to-left scripts and non-Latin fonts if you embed the right font in the template.
Multi-jurisdiction tax compliance. Per-region template (e.g. EU VAT, US sales tax, Indian GST). The handler picks the right template based on customer.address.country.
Batch invoices (monthly statements). See monthly PDF bundles on a Cloudflare Cron Trigger — pairs /api/fill-form + /api/merge for per-customer statement compilations.
FAQ
Why generate invoice PDFs at all?
Three reasons most billing systems still emit them: compliance (many jurisdictions require an immutable document for tax or audit), email (PDF-attached invoices have higher open rates and survive recipient inbox archival), and accounting integration (bookkeeping tools ingest PDF invoices for expense matching).
Where does the template come from?
Author once in Acrobat, Mac Preview, LibreOffice Draw, or pdftk. Store it in your repo or object storage. Most billing systems have 1-3 template variants; they all fit in a few hundred KB.
How do I handle variable-count line items?
Either fixed-line-count templates with up to N rows (leave empty blank — works for most SaaS where line counts are predictable per tier), or build a per-invoice template at request time (more work but supports arbitrary counts). Start with (1).
What's the cost math at 10k invoices/month?
At 10k invoices a month (vendor prices read 2026-11-09): PDFMonkey about 50 EUR (Pro plus Boost Packs), PDFShift $99 (Business), DocRaptor $299 (Max plus 5,000 overage at 3 cents). Headless Chrome on Lambda: ~$10-$30/mo of compute plus ops cost. PDFops: Pro is $79/mo for 25,000 requests, roughly $0.003 per document at full use: about 4x cheaper than DocRaptor at 10k invoices, about 20% cheaper than PDFShift, and not cheaper than PDFMonkey at this volume. Compare in detail on /vs/docraptor, /vs/pdfshift, /vs/pdfmonkey.
Where do I store the generated PDFs?
PDFops returns the bytes; your code decides. Common patterns: Vercel Blob, Cloudflare R2, S3 with presigned URLs, or an authed route on your own domain. Pair with a retention policy for long-term archive.
Get higher-tier access
The anonymous tier (100/IP/month) is fine for evaluation. For production volume, get a free API key (250 requests/month — email in, key out, no card), then upgrade in place: Indie $16/mo for 4,000 requests, Pro $79/mo for 25,000, both live.
← PDFops home · Docs · Blog
---
# Report PDFs at scale — PDFops use case
Source: https://pdfops.dev/use-cases/reports
Use Case
Report PDFs at scale
Monthly statements, inspection reports, audit reports, exam
reports — anywhere a fixed-layout document gets populated
with per-customer or per-event data on a schedule or
webhook. Hosted PDF API, no
headless Chrome or long-running backend.
Who this fits
Financial / billing platforms. Monthly customer statements bundling transactions, balances, and tax breakdowns. Cron-driven on the 1st of each month.
Inspection and field-services apps. Per-job inspection reports (HVAC, real estate, building safety, vehicle pre-purchase). Webhook-driven on inspection completion.
Education / assessment platforms. Exam reports, course completion certificates, transcripts. Webhook-driven on event.
Audit and compliance. Internal audit summaries, regulatory filings, attestation reports. Cron-driven on the audit cycle.
Analytics / KPI tooling. Per-customer KPI summary PDFs delivered weekly or monthly. Cron-driven.
The patterns, end-to-end
Pattern 1: cron-driven monthly bulk
For per-customer monthly statements / KPI summaries — one report per customer, fires on a schedule:
Cron trigger → worker (Cloudflare Cron, Vercel Cron, GitHub Actions schedule).
Worker → your DB: list customers due for a report this period.
Worker → object storage: fetch the report template (statement / KPI summary / etc.).
Worker → PDFops: /api/fill-form per customer with that customer's data as field values.
Worker → PDFops (optional): /api/merge to combine the statement with appendices or supplemental pages.
Worker → object storage: stash each per-customer PDF, keyed by customer ID + period.
Worker → email service: send one short-presigned-URL email per customer.
Concrete walkthrough with code: Monthly PDF bundles on a Cloudflare Cron Trigger — ~60 lines of TypeScript, includes the fill + merge + R2-stash + email flow.
Pattern 2: webhook-driven per-event
For inspection / exam / per-job reports — one report per event, fires when the event completes:
Event source → your webhook handler (inspection-completed, exam-graded, course-finished).
Handler → object storage: fetch the relevant report template.
Handler → PDFops: /api/fill-form with the event payload as field values.
Handler → object storage: stash the report keyed by event ID.
Handler → email service: deliver to the customer or recipient.
Try it
Author your report template in any PDF editor with AcroForm fields (customer_name, period_label, total_amount, line_item_1_desc, line_item_1_amount, etc.) — the free form-field inspector confirms what a template's fields are named:
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@statement-template.pdf" \
-F 'fields={
"customer_name": "Acme Co",
"period_label": "April 2026",
"total_amount": "$2,450.00",
"invoice_id": "STMT-2026-04-001"
}' \
-o statement.pdf
Full reference at the fill-form docs; the merge endpoint for multi-page composition is at /docs/merge.
Variations
Monthly statements. One template per currency / region; pre-render charts as PNG embedded in the template at fixed positions; ≤20 line items per page; multi-month statements via /api/merge.
Inspection reports. Per-job report with a checklist section (AcroForm checkboxes) + free-text notes (text fields) + before/after photo embeds (fixed image positions). Most field-service apps already capture this data structured.
Exam reports / certificates. Per-test report with scores per section + overall result + signature line. Typically merged with a generic "About this exam" appendix.
Audit reports. Quarterly or annual; multi-page composition with cover + findings + recommendations + appendix. Per-finding pages are generated via /api/fill-form against a finding-template, then merged into the master via /api/merge. The audit-trail cover-page walkthrough shows the cover+merge shape in code.
KPI summaries. Per-customer weekly or monthly digest with key metrics. Often 1-2 pages, fixed-layout, chart-as-image. Cron-driven.
FAQ
Why PDF reports instead of HTML dashboards?
Three reasons: customers archive / forward / reference reports (PDFs survive inbox cleanup and link rot); compliance and audit trails require immutable documents; recipients often need to print or annotate. Dashboards work for in-product; PDFs are the durable artifact.
How does this work for variable-length reports?
Fixed-layout templates with a known maximum (leave extra rows blank), or multi-page composition via /api/merge — fill a cover + fixed middle + variable section assembled from N per-customer page templates, then merge. The monthly-bundles walkthrough shows this pattern.
Can I run this on a schedule?
Yes — Cloudflare Cron Trigger / Vercel Cron / GitHub Actions schedule. Batch jobs burn quota fast, so poll /api/usage from the worker to see the month's remaining requests.
What about charts and graphs?
PDFops doesn't draw charts itself. Pre-render charts as PNG/SVG in your calling code (Chart.js + a render service) and embed at fixed positions in the template. For dashboards-as-PDF where charts ARE the report and are drawn by JavaScript, a headless-Chromium service still fits better, because PDFops runs no JavaScript (a static SVG or PNG chart inside an HTML string works with the HTML-to-PDF endpoint). See PDFops vs PDFShift for the honest framing.
How do I deliver large batches without overloading email?
Stash PDFs in object storage first, send a short-lived presigned URL per customer — not the PDF as an attachment. Avoids 50MB statements bouncing off corporate spam filters. Set a retention policy on the bucket for compliance archives.
Get higher-tier access
For monthly batches above 100 customers, get a free API key (250 requests/month — email in, key out, no card). Paid tiers are live: Indie $16/mo for 4,000 requests, Pro $79/mo for 25,000.
← PDFops home · Docs · Blog
---
# California DE 1: 111 fillable PDF fields (DE 1 Rev. 79 (3-16))
Source: https://pdfops.dev/registry/ca-edd-de1
Registry
California DE 1 — programmatic fill compatibility
Commercial Employer Account Registration and Update Form · California Employment Development Department (EDD) · DE 1 Rev. 79 (3-16). Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten111/111 supported fields landed; flatten=true byte-deterministic (sha256 3945140af6d4…)
pdf-lib1.17.1verified (111/111)111 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (111/111)111 fields filled in-process
pypdf6.15.0text fields verified (91/91)91 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (111/111)111 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (91/91)91/91 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 6b3f5b50659e…
File facts
Source: https://edd.ca.gov/siteassets/files/pdf_pub_ctr/de1.pdf (issuer page: here)
Blank tested: ca-edd-de1.pdf · 810 KB · sha256 0b08cd4144da7fbd8b81214c413d777ad4cc0c0ef9f77a17f517f40a5feae8c2
License: California state government form, published for public employer-registration use. The hash-verified blank is redistributed here unmodified.
Structure: 2 pages · AcroForm
Fields: 112 (91 text, 18 radiogroup, 2 checkbox, 1 button)
Quirks & limitations
The compatibility trap this entry exists to document: `Producer: Adobe Acrobat Pro DC 20 Paper Capture Plug-in` — every one of the 91 text-field widgets was auto-detected by Acrobat's OCR-based field recognizer over a scanned image, and NONE of them carry an /AP (appearance) dictionary on the blank form. Verified directly: iterating the field/widget objects with pypdf shows /AP entirely absent on all 91 (checked field-by-field, not just spot-checked) — every widget is a flat Widget annotation with no /Kids, so this isn't a parent/child appearance-inheritance false negative.
The AcroForm's own /NeedAppearances flag is NOT set (confirmed absent via direct dict inspection) — so this form is actually worse than the textbook NeedAppearances=true case: there is no flag telling a compliant viewer to synthesize appearances, and there is no baked appearance either. A naive filler that only writes /V (the field value) without generating its own appearance stream will produce a PDF that displays nothing in that field in any viewer, Adobe included, until a human clicks into it.
This registry's own fill legs are unaffected by the gap: pdf-lib and cantoo both always generate their own appearance stream from /V on save regardless of what the source PDF declares (verified by grepping both libraries' full source for `NeedAppearances` — zero references in either), so this registry's pdfops/pdf-lib/cantoo legs render the filled values fine. The hazard is specifically for any filler that sets /V and stops — a class of tool this registry doesn't itself ship, but one the wider ecosystem (raw low-level PDF writers, some CLI stampers) does.
Old and unrevised: created October 2015, last formally revised March 2016, still the live form at the same URL a decade later — a good stand-in for the long tail of small-agency forms that were digitized once via scan-and-OCR and never rebuilt.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 111 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 3945140af6d499664ed11026efaffa9b8bc674919e56fc022864d8683e61ee74.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@ca-edd-de1.pdf" \
-F 'fields={"2.0 EAN":"P","2.1 EAN":"P"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 112 field names first with the inspector or POST /api/inspect.
Field schema
All 112 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
I WANT TORadioGroup11 options
Reason for Closing AccountRadioGroup2 options
EMPLOYER TYPERadioGroup3 options
Same as aboveCheckBox
PRINTButton
TAXPAYER TYPERadioGroup13 options
INDIVIDUAL OWNER - Do you only employ your spouse, parent(s), or minor child(ren) (under 18)? If yes, you are not subject to Unemployment Insurance (UI) and State Disability Insurance (SDI) but may be subject to Personal Income Tax (PIT)RadioGroup2 options
CO-OWNERSHIP - Do you only employ your minor child(ren) (under 18)? If yes, you are not subject to UI and SDI but may be subject to PITRadioGroup2 options
PARTNERSHIP: Do you only employ your parent(s)? If yes, you are not subject to UI and SDI but may be subject to PITRadioGroup2 options
LOCATION OF EMPLOYEE SERVICES - Do you have employees working in California?RadioGroup2 options
LOCATION OF EMPLOYEE SERVICES - Do you have employees residing in California that are working outside of California?RadioGroup2 options
INDIVIDUAL OWNER/CO-OWNER INFORMATION (1)RadioGroup3 options
INDUSTRY ACTIVITY - Select your business industryRadioGroup8 options
Report a Purchase of Business - Business PurchaseRadioGroup2 options
Report a Sale of Business - Business SoldRadioGroup2 options
2.0 EANTextField1
2.1 EANTextField1
2.2 EANTextField1
2.3 EANTextField1
2.4 EANTextField1
2.5 EANTextField1
2.6 EANTextField1
2.7 EANTextField1
3.5 dateTextField2
3.6 dateTextField2
3.7 dateTextField4
4.2 dateTextField2
4.3 dateTextField2
4.4 dateTextField4
4.5 priceTextField12
5.2 dateTextField2
5.3 dateTextField2
5.4 dateTextField4
7.3 dateTextField2
7.4 dateTextField2
7.5 dateTextField4
8.1 Report a ChangeTextField
8.2 Reason-ChangeTextField
8.3 Change FromTextField
8.5 dateTextField2
8.6 dateTextField2
8.7 dateTextField4
10.2 OtherTextField
11.1 dateTextField2
11.2 dateTextField2
11.3 dateTextField4
15.1 NameTextField
15.2 TitleTextField
15.3 SSNTextField11
15.4 CDLTextField8
16.1 NameTextField
16.2 TitleTextField
16.3 SSNTextField11
16.4 CDLTextField8
17.1 NameTextField
17.2 TitleTextField
17.3 SSNTextField11
17.4 CDLTextField8
18.1 NameTextField
18.2 TitleTextField
18.3 SSNTextField11
18.4 CDLTextField8
19.1 NameTextField
19.2 TitleTextField
19.3 SSNTextField11
19.4 CDLTextField8
20.1 NameTextField
20.2 TitleTextField
20.3 SSNTextField11
20.4 CDLTextField8
20.1 Legal NameTextField
21.1 DBATextField
22.1 FEINTextField
22.2 dateTextField2
22.3 dateTextField2
22.4 dateTextField4
23.1 StateTextField
23.2 State Entity NumberTextField12
24.1 Street #TextField
24.2 Street NameTextField
24.3 Unit #TextField
25.1 CityTextField
25.2 StateTextField
25.3 ZIPTextField
25.4 CountryTextField
25.5 Business PhoneTextField14
26.1 Street #TextField
26.2 Street NameTextField
26.3 Unit #TextField
27.1 CityTextField
27.2 StateTextField
27.3 ZIPTextField
27.5 PhoneTextField14
27.4 CountryTextField
28.1 emailTextField
28.0 emailCheckBox
29.1 product-servicesTextField
29.2 OtherTextField
30.1 NameTextField
30.2 PhoneTextField14
30.3 E-mailTextField
31.1 RelationTextField
31.2 AddressTextField
32.1 dateTextField10
33.1 NameTextField
33.2 TitleTextField
33.3 phoneTextField14
INDIVIDUAL OWNER/CO-OWNER INFORMATION (2)RadioGroup3 options
CORPORATE OFFICER(S), PARTNERS, OR LLC MEMBER(S), MANAGER(S), AND/OR OFFICER INFORMATION (1)RadioGroup3 options
CORPORATE OFFICER(S), PARTNERS, OR LLC MEMBER(S), MANAGER(S), AND/OR OFFICER INFORMATION (2)RadioGroup3 options
CORPORATE OFFICER(S), PARTNERS, OR LLC MEMBER(S), MANAGER(S), AND/OR OFFICER INFORMATION (3)RadioGroup3 options
CORPORATE OFFICER(S), PARTNERS, OR LLC MEMBER(S), MANAGER(S), AND/OR OFFICER INFORMATION (4)RadioGroup3 options
Frequently asked
Can I fill the California DE 1 programmatically?
Yes — the blank DE 1 Rev. 79 (3-16) California DE 1 is a fillable AcroForm with 112 fields. In our tested run, all 111 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# California FL-100: 146 fillable PDF fields (Rev. January 1, 2020)
Source: https://pdfops.dev/registry/ca-fl-100
Registry
California FL-100 — programmatic fill compatibility
Petition — Marriage/Domestic Partnership (family law) · Judicial Council of California · Rev. January 1, 2020. Tested 2026-11-09 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-11-09verified + deterministic flatten146/146 supported fields landed; flatten=true byte-deterministic (sha256 ba0a6416481b…)
pdf-lib1.17.1fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
@cantoo/pdf-lib (fork)2.6.5fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
pypdf6.15.0text fields verified (66/66)66 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (148/148)148 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/ca-fl-100.pdf: page 2: shared object 1171: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render checkno filled output to renderno filled PDF from the pdf-lib leg to render
File facts
Source: https://courts.ca.gov/sites/default/files/courts/default/2024-11/fl100.pdf (issuer page: here)
Blank tested: ca-fl-100.pdf · 188 KB · sha256 fa30a2916677af5aecbd555aeceb06ef410eb1221da1b5f928348a5e7b17b6b6
License: California Judicial Council form, adopted for mandatory use. Published for public court filing; the hash-verified blank is redistributed here unmodified.
Structure: ? pages · no AcroForm · encrypted
Fields: 158 (82 checkbox, 66 text, 10 unsupported)
Quirks & limitations
The failure case this registry exists to document: the blank ships AES-encrypted (R=4) with an EMPTY user password — anyone can open it in a viewer, but the owner password restricts modification, and pdf-lib-family parsers (including pdfops today) refuse it outright at parse time.
Verified workaround: `qpdf --decrypt fl100.pdf fl100-dec.pdf` removes the restriction losslessly; the decrypted file then loads as a normal hybrid AcroForm/XFA form with 158 fields across 3 pages and fills fine.
pypdf opens it directly — but only with the optional `cryptography` package installed (`pip install pypdf[crypto]`); without it the load fails with DependencyError. With it, pypdf filled and verified all 66 text fields on the unmodified blank.
Court e-filing pipelines hit this constantly: California Judicial Council forms are a large family and many ship with the same owner-password encryption.
This entry intentionally records failures. A tool showing 'fails at load' below is the honest, reproducible result on the unmodified upstream file.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 146 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 ba0a6416481bb4fa56e15d454c1f1f5de338b5b298265fa1481ff26310306a0e.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@ca-fl-100.pdf" \
-F 'fields={"FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyFor_ft[0]":"Jane Doe","FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].Email_ft[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 158 field names first with the inspector or POST /api/inspect.
Field schema
All 158 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
FL-100[0].Page1[0].PartiesSignedVoluntaryPaternityDec_cb[0]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].Amended_cb[0]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].DissolutionOf_cb[0]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].Marriage_cb[0]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].DomesticPartnership_cb[0]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].NullityOf_cb[0]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].Marriage_cb[1]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].DomesticPartnership_cb[1]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].LegalSeparationOf_cb[0]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].Marriage_cb[2]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].FormTitle[0].DomesticPartnership_cb[2]CheckBox
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyFor_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].Email_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].Fax_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].Phone_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyZip_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyState_ft[0]TextField2
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyCity_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyStreet_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyFirm_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].AttyName_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].AttyInfo[0].BarNo_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].CourtInfo[0].CrtCounty_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].CourtInfo[0].Branch_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].CourtInfo[0].CityZip_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].CourtInfo[0].Street_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].CourtInfo[0].MailingAdd_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].TitlePartyName[0].Party2_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].TitlePartyName[0].Party1_ft[0]TextField
FL-100[0].Page1[0].CaptionP1_sf[0].CaseNumber[0].CaseNumber_ft[0]TextField
FL-100[0].Page1[0].WeAreMarried_cb[0]CheckBox
FL-100[0].Page1[0].DPEstablishedInCalifornia[0]CheckBox
FL-100[0].Page1[0].DPNOTEstablishedinCA_cb[0]CheckBox
FL-100[0].Page1[0].RespondentMeetsResidencyReqs_cb[0]CheckBox
FL-100[0].Page1[0].PetitionerMeetsResidencyReqs_cb[0]CheckBox
FL-100[0].Page1[0].DateOfMarriage_dt[0]TextField
FL-100[0].Page1[0].DateOfSeparation_dt[0]TextField
FL-100[0].Page1[0].MonthsSeparated_tf[0]TextField
FL-100[0].Page1[0].CheckBox61[0]CheckBox
FL-100[0].Page1[0].CheckBox61[1]CheckBox
FL-100[0].Page1[0].DatePartnersSeparated_dt[0]TextField
FL-100[0].Page1[0].DateTimeField1[0]TextField
FL-100[0].Page1[0].ThereAreNoMinorChildren_cb[0]CheckBox
FL-100[0].Page1[0].MinorChildren_sf[0].MinorChildrenList_cb[0]CheckBox
FL-100[0].Page1[0].MinorChildren_sf[0].Child1Name_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child4Name_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child3Name_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child2Name_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child1Age_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child4Age_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child3Age_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child2Age_tf[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child1Birthdate_dt[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child4Birthdate_dt[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child3Date_dt[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].Child2Birthdate_dt[0]TextField
FL-100[0].Page1[0].MinorChildren_sf[0].UnbornChild_cb[0]CheckBox
FL-100[0].Page1[0].MinorChildren_sf[0].Attachment4b[0]CheckBox
FL-100[0].Page1[0].DPNOTEstablishedinCA_cb[1]CheckBox
FL-100[0].Page1[0].SameSexMarriedInCA_cb[0]CheckBox
FL-100[0].Page1[0].RespondentsResidence_tf[0]TextField
FL-100[0].Page1[0].PetitionersResidence_tf[0]TextField
FL-100[0].Page1[0].MonthsSeparated_tf[1]TextField
FL-100[0].Page1[0].MonthsSeparated_tf[2]TextField
FL-100[0].Page1[0].MonthsSeparated_tf[3]TextField
FL-100[0].Page1[0].Button1[0]Unsupported
FL-100[0].Page2[0].Nullity_cb[0]CheckBox
FL-100[0].Page2[0].BasedOnIncest_cb[0]CheckBox
FL-100[0].Page2[0].BasedOnBigamy_cb[0]CheckBox
FL-100[0].Page2[0].NullityofVoidableMarriageOrDP_cb[0]CheckBox
FL-100[0].Page2[0].BasedonAge_cb[0]CheckBox
FL-100[0].Page2[0].PriorExistingMarriageOrDP_cb[0]CheckBox
FL-100[0].Page2[0].BasedOnUnsoundMind_cb[0]CheckBox
FL-100[0].Page2[0].BasedonFraud_cb[0]CheckBox
FL-100[0].Page2[0].BasedOnForce_cb[0]CheckBox
FL-100[0].Page2[0].BasedonPhysicalIncapacity_cb[0]CheckBox
FL-100[0].Page2[0].SepTypeDef_cb[0]CheckBox
FL-100[0].Page2[0].SepTypeDef_cb[1]CheckBox
FL-100[0].Page2[0].SepBasis_cb[0]CheckBox
FL-100[0].Page2[0].SepBasis_cb[1]CheckBox
FL-100[0].Page2[0].ToPetitioner_cb[0]CheckBox
FL-100[0].Page2[0].ToRespondent_cb[0]CheckBox
FL-100[0].Page2[0].ToBothJointly_cb[0]CheckBox
FL-100[0].Page2[0].ToOther_cb[0]CheckBox
FL-100[0].Page2[0].ToPetitioner_cb[1]CheckBox
FL-100[0].Page2[0].ToRespondent_cb[1]CheckBox
FL-100[0].Page2[0].ToBothJointly_cb[1]CheckBox
FL-100[0].Page2[0].ToOther_cb[1]CheckBox
FL-100[0].Page2[0].ForPetitioner_cb[0]CheckBox
FL-100[0].Page2[0].ForOther_cb[0]CheckBox
FL-100[0].Page2[0].ForRespondent_cb[0]CheckBox
FL-100[0].Page2[0].FormFL-311_cb[0]CheckBox
FL-100[0].Page2[0].FormFL-312_cb[0]CheckBox
FL-100[0].Page2[0].FormFL-341C_cb[0]CheckBox
FL-100[0].Page2[0].FormFL-341D_cb[0]CheckBox
FL-100[0].Page2[0].FormFL-341E[0]CheckBox
FL-100[0].Page2[0].Attachment6e1[0]CheckBox
FL-100[0].Page2[0].ChildSupport_ft[0]TextField
FL-100[0].Page2[0].OtherChildSupport_cb[0]CheckBox
FL-100[0].Page2[0].EndJurixReRespondent_cb[0]CheckBox
FL-100[0].Page2[0].EndJurixRePetitioner_cb[0]CheckBox
FL-100[0].Page2[0].EndJurixReSupport[0]CheckBox
FL-100[0].Page2[0].PaySupporttoPetitioner_cb[0]CheckBox
FL-100[0].Page2[0].PaySupportoRespondent_cb[0]CheckBox
FL-100[0].Page2[0].PaySupport_cb[0]CheckBox
FL-100[0].Page2[0].PartiesSignedVoluntaryPaternityDec_cb[0]CheckBox
FL-100[0].Page2[0].ReserveJurixSupportResp_cb[0]CheckBox
FL-100[0].Page2[0].ReserveJurixSupportPet_cb[0]CheckBox
FL-100[0].Page2[0].OtherSupport_ft[0]TextField
FL-100[0].Page2[0].Other_cb[0]CheckBox
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].Button1[0]Unsupported
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].WhereSPListed_cb[0]CheckBox
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].ConfirmSeparateProperty_cb[0]CheckBox
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].WhereSPListed_cb[1]CheckBox
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].WhereSPListed_cb[2]CheckBox
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].SeparatePropertyList1_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].SeparatePropertyList3_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].SeparatePropertyList2_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].ConfirmPropertyList1To_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].ConfirmPropertyList3To_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].SeparatePropertyList4_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].ConfirmPropertyList4To_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].SeparatePropertyList4_tf[1]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].ConfirmPropertyList4To_tf[1]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].ConfirmPropertyList2To_tf[0]TextField
FL-100[0].Page2[0].ConfirmSeparateProperty_sf[0].Button1[1]Unsupported
FL-100[0].Page2[0].NoSeparateProperty_cb[0]CheckBox
FL-100[0].Page2[0].CaseNumber[0].CaseNumber_ft[0]TextField
FL-100[0].Page2[0].Parties[0].Party2_ft[0]TextField
FL-100[0].Page2[0].Parties[0].Party1_ft[0]TextField
FL-100[0].Page3[0].CaseNumber[0].CaseNumber_ft[0]TextField
FL-100[0].Page3[0].Parties[0].Party2_ft[0]TextField
FL-100[0].Page3[0].Parties[0].Party1_ft[0]TextField
FL-100[0].Page3[0].SigDate[0]TextField
FL-100[0].Page3[0].PrintPetitionerName_tf[0]TextField
FL-100[0].Page3[0].NoCommOrQuasiCommProperty_cb[0]CheckBox
FL-100[0].Page3[0].CommQuasiProperty_sf[0].WhereCPListed_cb[0]CheckBox
FL-100[0].Page3[0].CommQuasiProperty_sf[0].WhereCPListed_cb[1]CheckBox
FL-100[0].Page3[0].CommQuasiProperty_sf[0].PropertyListed_cb[0]CheckBox
FL-100[0].Page3[0].CommQuasiProperty_sf[0].ListProperty_ft[0]TextField
FL-100[0].Page3[0].CommQuasiProperty_sf[0].WhereCPListed_cb[2]CheckBox
FL-100[0].Page3[0].CommQuasiProperty_sf[0].Button1[0]Unsupported
FL-100[0].Page3[0].CommQuasiProperty_sf[0].Button1[1]Unsupported
FL-100[0].Page3[0].FeesAndCost_cb[0]CheckBox
FL-100[0].Page3[0].AttyFeePay_cb[0]CheckBox
FL-100[0].Page3[0].AttyFeePay_cb[1]CheckBox
FL-100[0].Page3[0].RestoreFormerName_cb[0]CheckBox
FL-100[0].Page3[0].SpecifyFormerName_tf[0]TextField
FL-100[0].Page3[0].SpecifyOtherRequests_tf[0]TextField
FL-100[0].Page3[0].ContinuedOnAttachment_cb[0]CheckBox
FL-100[0].Page3[0].OtherRequests_cb[0]CheckBox
FL-100[0].Page3[0].SigDate[1]TextField
FL-100[0].Page3[0].PrintPetitionerAttorneyName_tf[0]TextField
FL-100[0].Page3[0].#area[0].Print[0]Unsupported
FL-100[0].Page3[0].#area[0].Save[0]Unsupported
FL-100[0].Page3[0].#area[0].Reset[0]Unsupported
FL-100[0].Page3[0].#area[0].Warning[0]Unsupported
FL-100[0].Page3[0].Button1[0]Unsupported
Frequently asked
Can I fill the California FL-100 programmatically?
Yes — the blank Rev. January 1, 2020 California FL-100 is a fillable AcroForm with 158 fields. In our tested run, all 146 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib cannot open it, and pypdf handled its text fields. Field names are listed in the schema on this page.
Why do PDF libraries reject the California FL-100?
The blank is AES-encrypted with an empty user password: anyone can open it in a viewer, but the owner password restricts modification, and strict parsers refuse the file outright. The pdfops API opens owner-locked files like this directly, and a password form field covers files that need a user password. qpdf --decrypt removes the restriction losslessly; pypdf can open it directly when its optional cryptography dependency is installed; pdftk-java both reads and fills it natively (its output is decrypted).
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# FL-150: 249 fillable PDF fields (Rev. September 1, 2024)
Source: https://pdfops.dev/registry/ca-fl-150
Registry
FL-150 — programmatic fill compatibility
Income and Expense Declaration · Judicial Council of California · Rev. September 1, 2024. Tested 2026-11-09 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-11-09verified + deterministic flatten249/249 supported fields landed; flatten=true byte-deterministic (sha256 350d61c40b4d…)
pdf-lib1.17.1fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
@cantoo/pdf-lib (fork)2.6.5fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
pypdf6.15.0text fields verified (212/212)212 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (262/262)262 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/ca-fl-150.pdf: page 3: shared object 1843: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render checkno filled output to renderno filled PDF from the pdf-lib leg to render
File facts
Source: https://courts.ca.gov/sites/default/files/courts/default/2024-11/fl150.pdf (issuer page: here)
Blank tested: ca-fl-150.pdf · 180 KB · sha256 46ca00246ae0f26ad893ce3ded2bd502fd6df299258b02070395cc597a3f68b4
License: California Judicial Council form, adopted for mandatory use. Published for public court filing; the hash-verified blank is redistributed here unmodified.
Structure: ? pages · no AcroForm · encrypted
Fields: 266 (212 text, 50 checkbox, 4 unsupported)
Quirks & limitations
Filed alongside FL-100 in most California family-law cases — a second sample of the Judicial Council form class, to test whether FL-100's AES-encrypted-empty-user-password behavior is the class rule or a one-off.
Legal-document-assembly tools fill this form constantly (income/expense declarations get refiled at every support modification).
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 249 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 350d61c40b4d284c91f51eb5a33bb7f4bcde4d17021767a55d827627f3ddfc66.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@ca-fl-150.pdf" \
-F 'fields={"FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].BarNo_ft[0]":"Jane Doe","FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyName_ft[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 266 field names first with the inspector or POST /api/inspect.
Field schema
All 266 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].BarNo_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyName_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyFirm_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyStreet_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyCity_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyState_ft[0]TextField2
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyZip_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].Phone_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].Fax_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].Email_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].AttyInfo[0].AttyFor_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].CourtInfo[0].CrtCounty_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].CourtInfo[0].Street_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].CourtInfo[0].MailingAdd_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].CourtInfo[0].CityZip_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].CourtInfo[0].Branch_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].TitlePartyName[0].Party1_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].TitlePartyName[0].Party2_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].TitlePartyName[0].Party3_ft[0]TextField
FL-150[0].Page1[0].StdP1Header_sf[0].CaseNumber[0].CaseNumber_ft[0]TextField
FL-150[0].Page1[0].List1[0].Li1[0].Employer_tf[0]TextField
FL-150[0].Page1[0].List1[0].Li2[0].Employer_address_tf[0]TextField
FL-150[0].Page1[0].List1[0].Li3[0].Employer_phone\.ft[0]TextField
FL-150[0].Page1[0].List1[0].Li4[0].Party_occupation_tf[0]TextField
FL-150[0].Page1[0].List1[0].Li5[0].Date_started_job_tf[0]TextField
FL-150[0].Page1[0].List1[0].Li6[0].FillText1[0]TextField
FL-150[0].Page1[0].List1[0].Li7[0].hours_tf[0]TextField
FL-150[0].Page1[0].List1[0].Li8[0].gross_tf[0]TextField
FL-150[0].Page1[0].List1[0].Li8[0].Gross_cb[0]CheckBox
FL-150[0].Page1[0].List1[0].Li8[0].Gross_cb[1]CheckBox
FL-150[0].Page1[0].List1[0].Li8[0].Gross_cb[2]CheckBox
FL-150[0].Page1[0].List2[0].Li1[0].FillText1[0]TextField
FL-150[0].Page1[0].List2[0].Li2[0].HSchl_cb[0]CheckBox
FL-150[0].Page1[0].List2[0].Li2[0].HSchl_cb[1]CheckBox
FL-150[0].Page1[0].List2[0].Li2[0].FillText1[0]TextField
FL-150[0].Page1[0].List2[0].Li3[0].FillText1[0]TextField
FL-150[0].Page1[0].List2[0].Li3[0].RB2Choices[0]CheckBox
FL-150[0].Page1[0].List2[0].Li3[0].FillText109[0]TextField
FL-150[0].Page1[0].List2[0].Li4[0].FillText1[0]TextField
FL-150[0].Page1[0].List2[0].Li4[0].RB2Choices[0]CheckBox
FL-150[0].Page1[0].List2[0].Li4[0].FillText109[0]TextField
FL-150[0].Page1[0].List2[0].Li5[0].RB2Choices[0]CheckBox
FL-150[0].Page1[0].List2[0].Li5[0].FillText10[0]TextField
FL-150[0].Page1[0].List2[0].Li5[0].RB2Choices[1]CheckBox
FL-150[0].Page1[0].List2[0].Li5[0].FillText109[0]TextField
FL-150[0].Page1[0].List3[0].Li1[0].RB2Choices[0]CheckBox
FL-150[0].Page1[0].List3[0].Li1[0].FillText109[0]TextField
FL-150[0].Page1[0].List3[0].Li2[0].Tax_cb1[0]CheckBox
FL-150[0].Page1[0].List3[0].Li2[0].Tax_cb2[0]CheckBox
FL-150[0].Page1[0].List3[0].Li2[0].Tax_cb3[0]CheckBox
FL-150[0].Page1[0].List3[0].Li2[0].RB2Choices[0]CheckBox
FL-150[0].Page1[0].List3[0].Li2[0].FillText109[0]TextField
FL-150[0].Page1[0].List3[0].Li3[0].TaxSt_cb[0]CheckBox
FL-150[0].Page1[0].List3[0].Li3[0].TaxSt_CB[0]CheckBox
FL-150[0].Page1[0].List3[0].Li3[0].FillText109[0]TextField
FL-150[0].Page1[0].List3[0].Li4[0].FillText1[0]TextField
FL-150[0].Page1[0].List4[0].Li1[0].FillTextincm[0]TextField
FL-150[0].Page1[0].List4[0].Li1[0].FillText1[0]TextField
FL-150[0].Page1[0].FillTextpage[0]TextField
FL-150[0].Page1[0].Signdate[0]TextField
FL-150[0].Page1[0].FillText56[0]TextField
FL-150[0].Page2[0].PxCaption_sf[0].TitlePartyName[0].Party1_ft[0]TextField
FL-150[0].Page2[0].PxCaption_sf[0].TitlePartyName[0].Party2_ft[0]TextField
FL-150[0].Page2[0].PxCaption_sf[0].TitlePartyName[0].Party3_ft[0]TextField
FL-150[0].Page2[0].PxCaption_sf[0].CaseNumber[0].CaseNumber_ft[0]TextField
FL-150[0].Page2[0].List5[0].Li1[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li1[0].TextField7[0]TextField
FL-150[0].Page2[0].List5[0].Li2[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li2[0].TextField8[0]TextField
FL-150[0].Page2[0].List5[0].Li3[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li3[0].TextField9[0]TextField
FL-150[0].Page2[0].List5[0].Li4[0].CBChoice1_cb[0]CheckBox
FL-150[0].Page2[0].List5[0].Li4[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li4[0].TextField10[0]TextField
FL-150[0].Page2[0].List5[0].Li5[0].CBChoice1_cb[0]CheckBox
FL-150[0].Page2[0].List5[0].Li5[0].CBChoice1_cb2[0]CheckBox
FL-150[0].Page2[0].List5[0].Li5[0].CBChoice1_cb3[0]CheckBox
FL-150[0].Page2[0].List5[0].Li5[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li5[0].TextField11[0]TextField
FL-150[0].Page2[0].List5[0].Li6[0].CBChoice1_cb[0]CheckBox
FL-150[0].Page2[0].List5[0].Li6[0].CBChoice1_cb2[0]CheckBox
FL-150[0].Page2[0].List5[0].Li6[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li6[0].TextField12[0]TextField
FL-150[0].Page2[0].List5[0].Li7[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li7[0].TextField13[0]TextField
FL-150[0].Page2[0].List5[0].Li8[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li8[0].TextField14[0]TextField
FL-150[0].Page2[0].List5[0].Li9[0].CBChoice1_cb[0]CheckBox
FL-150[0].Page2[0].List5[0].Li9[0].CBChoice1_cb1[0]CheckBox
FL-150[0].Page2[0].List5[0].Li9[0].CBChoice1_cb2[0]CheckBox
FL-150[0].Page2[0].List5[0].Li9[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li9[0].TextField15[0]TextField
FL-150[0].Page2[0].List5[0].Li10[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li10[0].TextField16[0]TextField
FL-150[0].Page2[0].List5[0].Li11[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li11[0].TextField17[0]TextField
FL-150[0].Page2[0].List5[0].Li12[0].FillText1[0]TextField
FL-150[0].Page2[0].List5[0].Li12[0].FillText2[0]TextField
FL-150[0].Page2[0].List5[0].Li12[0].TextField18[0]TextField
FL-150[0].Page2[0].List6[0].Li1[0].FillText1[0]TextField
FL-150[0].Page2[0].List6[0].Li1[0].TextField23[0]TextField
FL-150[0].Page2[0].List6[0].L2[0].FillText1[0]TextField
FL-150[0].Page2[0].List6[0].L2[0].TextField22[0]TextField
FL-150[0].Page2[0].List6[0].L3[0].FillText1[0]TextField
FL-150[0].Page2[0].List6[0].L3[0].TextField21[0]TextField
FL-150[0].Page2[0].List6[0].L4[0].FillText1[0]TextField
FL-150[0].Page2[0].List6[0].L4[0].FillText2[0]TextField
FL-150[0].Page2[0].List6[0].L4[0].TextField20[0]TextField
FL-150[0].Page2[0].List7[0].L1[0].FillTxt1[0]TextField
FL-150[0].Page2[0].List7[0].L1[0].TextField[0]TextField
FL-150[0].Page2[0].List7[0].L1[0].CBChoice1_cb[0]CheckBox
FL-150[0].Page2[0].List7[0].L1[0].CBChoice1_cb1[0]CheckBox
FL-150[0].Page2[0].List7[0].L1[0].RB2Choices[0]CheckBox
FL-150[0].Page2[0].List7[0].L1[0].FillText109[0]TextField
FL-150[0].Page2[0].List7[0].L1[0].FillText1[0]TextField
FL-150[0].Page2[0].List7[0].L1[0].FillText2[0]TextField
FL-150[0].Page2[0].List7[0].L1[0].FillText3[0]TextField
FL-150[0].Page2[0].List8[0].Li1[0].CheckBox19[0]CheckBox
FL-150[0].Page2[0].List8[0].Li1[0].TextField6[0]TextField
FL-150[0].Page2[0].List9[0].L1[0].CheckBox1[0]CheckBox
FL-150[0].Page2[0].List9[0].L1[0].TextField6[0]TextField
FL-150[0].Page2[0].List10[0].L1[0].FillText1[0]TextField
FL-150[0].Page2[0].List10[0].L2[0].FillText1[0]TextField
FL-150[0].Page2[0].List10[0].L3[0].FillText1[0]TextField
FL-150[0].Page2[0].List10[0].L4[0].FillText1[0]TextField
FL-150[0].Page2[0].List10[0].L5[0].CBChoice1_cb[0]CheckBox
FL-150[0].Page2[0].List10[0].L5[0].FillText1[0]TextField
FL-150[0].Page2[0].List10[0].L6[0].FillText1[0]TextField
FL-150[0].Page2[0].List10[0].L7[0].FillText1[0]TextField
FL-150[0].Page2[0].List11[0].L1[0].FillText1[0]TextField
FL-150[0].Page2[0].List11[0].L2[0].FillText1[0]TextField
FL-150[0].Page2[0].List11[0].L3[0].realcb[0]CheckBox
FL-150[0].Page2[0].List11[0].L3[0].persncb[0]CheckBox
FL-150[0].Page2[0].List11[0].L3[0].FillText1[0]TextField
FL-150[0].Page3[0].PxCaption_sf[0].TitlePartyName[0].Party1_ft[0]TextField
FL-150[0].Page3[0].PxCaption_sf[0].TitlePartyName[0].Party2_ft[0]TextField
FL-150[0].Page3[0].PxCaption_sf[0].TitlePartyName[0].Party3_ft[0]TextField
FL-150[0].Page3[0].PxCaption_sf[0].CaseNumber[0].CaseNumber_ft[0]TextField
FL-150[0].Page3[0].List12[0].L1[0].FillText1[0]TextField
FL-150[0].Page3[0].List12[0].L1[0].TextField1[0]TextField
FL-150[0].Page3[0].List12[0].L1[0].TextField2[0]TextField
FL-150[0].Page3[0].List12[0].L1[0].TextField3[0]TextField
FL-150[0].Page3[0].List12[0].L1[0].item12a_cb[0]CheckBox
FL-150[0].Page3[0].List12[0].L1[0].item12a_cb[1]CheckBox
FL-150[0].Page3[0].List12[0].L2[0].FillText1[0]TextField
FL-150[0].Page3[0].List12[0].L2[0].TextField[0]TextField
FL-150[0].Page3[0].List12[0].L2[0].TextField1[0]TextField
FL-150[0].Page3[0].List12[0].L2[0].TextField2[0]TextField
FL-150[0].Page3[0].List12[0].L2[0].People2_cb[0]CheckBox
FL-150[0].Page3[0].List12[0].L2[0].People2_cb[1]CheckBox
FL-150[0].Page3[0].List12[0].L3[0].FillText1[0]TextField
FL-150[0].Page3[0].List12[0].L3[0].TextField[0]TextField
FL-150[0].Page3[0].List12[0].L3[0].TextField1[0]TextField
FL-150[0].Page3[0].List12[0].L3[0].TextField6[0]TextField
FL-150[0].Page3[0].List12[0].L3[0].People3_cb[0]CheckBox
FL-150[0].Page3[0].List12[0].L3[0].People3_cb[1]CheckBox
FL-150[0].Page3[0].List12[0].L4[0].FillText1[0]TextField
FL-150[0].Page3[0].List12[0].L4[0].TextField[0]TextField
FL-150[0].Page3[0].List12[0].L4[0].TextField1[0]TextField
FL-150[0].Page3[0].List12[0].L4[0].TextField6[0]TextField
FL-150[0].Page3[0].List12[0].L4[0].People4_cb[0]CheckBox
FL-150[0].Page3[0].List12[0].L4[0].People4_cb[1]CheckBox
FL-150[0].Page3[0].List12[0].L5[0].FillText1[0]TextField
FL-150[0].Page3[0].List12[0].L5[0].TextField[0]TextField
FL-150[0].Page3[0].List12[0].L5[0].TextField1[0]TextField
FL-150[0].Page3[0].List12[0].L5[0].TextField6[0]TextField
FL-150[0].Page3[0].List12[0].L5[0].People5_cb[0]CheckBox
FL-150[0].Page3[0].List12[0].L5[0].People5_cb[1]CheckBox
FL-150[0].Page3[0].List13[0].MonthEx_cb[0]CheckBox
FL-150[0].Page3[0].List13[0].MonthEx_cb[1]CheckBox
FL-150[0].Page3[0].List13[0].MonthEx_cb[2]CheckBox
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L1[0].CBChoice1_cb[0]CheckBox
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L1[0].CBChoice1_cb1[0]CheckBox
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L1[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L1[0].List[0].L1[0].MortPrin[0]TextField
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L1[0].List[0].L2[0].MortInt[0]TextField
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L2[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L3[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li1[0].List[0].L4[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li2[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li3[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li4[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li5[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li6[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li7[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li8[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li9[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li10[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li11[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li12[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li13[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li14[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li15[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li16[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li17[0].FillText1[0]TextField
FL-150[0].Page3[0].List13[0].Li17[0].EXPN[0]TextField
FL-150[0].Page3[0].List13[0].Li18[0].TOTAL[0]TextField
FL-150[0].Page3[0].List13[0].Li19[0].EXPNother[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField1[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField2[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText1[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText2[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].DateField1[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField3[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField4[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText3[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText4[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].DateField2[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField5[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField6[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText5[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText6[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].DateField3[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField7[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField8[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText7[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText8[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].DateField4[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField9[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField10[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText9[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText10[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].DateField5[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField11[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].TextField12[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText11[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].FillText12[0]TextField
FL-150[0].Page3[0].List14[0].L1[0].DateField6[0]TextField
FL-150[0].Page3[0].List15[0].L1[0].FillText1[0]TextField
FL-150[0].Page3[0].List15[0].L2[0].FillText1[0]TextField
FL-150[0].Page3[0].List15[0].L3[0].FillText1[0]TextField
FL-150[0].Page3[0].List15[0].L4[0].FillText1[0]TextField
FL-150[0].Page3[0].Signsub[0].FillText1140[0]TextField
FL-150[0].Page3[0].Signsub[0].FillText56[0]TextField
FL-150[0].#pageSet[0].LastPage[0].T23[0]Unsupported
FL-150[0].#pageSet[0].LastPage[0].Print_bt[0]Unsupported
FL-150[0].#pageSet[0].LastPage[0].Save_bt[0]Unsupported
FL-150[0].#pageSet[0].LastPage[0].Reset_bt[0]Unsupported
FL-150[0].Page4[0].PxCaption_sf[0].CaseNumber[0].CaseNumber_ft[0]TextField
FL-150[0].Page4[0].PxCaption_sf[0].TitlePartyName[0].Party1_ft[0]TextField
FL-150[0].Page4[0].PxCaption_sf[0].TitlePartyName[0].Party2_ft[0]TextField
FL-150[0].Page4[0].PxCaption_sf[0].TitlePartyName[0].Party3_ft[0]TextField
FL-150[0].Page4[0].List17[0].L1[0].ChildHC_cb[0]CheckBox
FL-150[0].Page4[0].List17[0].L1[0].ChildHC_cb[1]CheckBox
FL-150[0].Page4[0].List17[0].L2[0].FillText1[0]TextField
FL-150[0].Page4[0].List17[0].L3[0].TextField6[0]TextField
FL-150[0].Page4[0].List17[0].L4[0].FillText1[0]TextField
FL-150[0].Page4[0].List16[0].L1[0].TextField6[0]TextField
FL-150[0].Page4[0].List16[0].L2[0].TextField[0]TextField
FL-150[0].Page4[0].List16[0].L2[0].TextField1[0]TextField
FL-150[0].Page4[0].List16[0].L2[0].TextField6[0]TextField
FL-150[0].Page4[0].List18[0].L1[0].FillText1[0]TextField
FL-150[0].Page4[0].List18[0].L2[0].FillText1[0]TextField
FL-150[0].Page4[0].List18[0].L3[0].FillText1[0]TextField
FL-150[0].Page4[0].List18[0].L4[0].FillText1[0]TextField
FL-150[0].Page4[0].List18[0].L4[0].FillText2[0]TextField
FL-150[0].Page4[0].List19[0].L1[0].FillText1[0]TextField
FL-150[0].Page4[0].List19[0].L1[0].TextField24[0]TextField
FL-150[0].Page4[0].List19[0].L2[0].FillText1[0]TextField
FL-150[0].Page4[0].List19[0].L2[0].TextField25[0]TextField
FL-150[0].Page4[0].List19[0].L3[0].List[0].L1[0].FillText1[0]TextField
FL-150[0].Page4[0].List19[0].L3[0].List[0].L1[0].TextField26[0]TextField
FL-150[0].Page4[0].List19[0].L3[0].List[0].L2[0].TextField6[0]TextField
FL-150[0].Page4[0].List19[0].L3[0].List[0].L3[0].FillText1[0]TextField
FL-150[0].Page4[0].List19[0].L3[0].TextField6[0]TextField
FL-150[0].Page4[0].List20[0].L1[0].TextField6[0]TextField
Frequently asked
Can I fill the FL-150 programmatically?
Yes — the blank Rev. September 1, 2024 FL-150 is a fillable AcroForm with 266 fields. In our tested run, all 249 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib cannot open it, and pypdf handled its text fields. Field names are listed in the schema on this page.
Why do PDF libraries reject the FL-150?
The blank is AES-encrypted with an empty user password: anyone can open it in a viewer, but the owner password restricts modification, and strict parsers refuse the file outright. The pdfops API opens owner-locked files like this directly, and a password form field covers files that need a user password. qpdf --decrypt removes the restriction losslessly; pypdf can open it directly when its optional cryptography dependency is installed; pdftk-java both reads and fills it natively (its output is decrypted).
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# T2200: 80 fillable PDF fields (T2200 E (25))
Source: https://pdfops.dev/registry/cra-t2200
Registry
T2200 — programmatic fill compatibility
Declaration of Conditions of Employment · Canada Revenue Agency (CRA) · T2200 E (25). Tested 2026-11-09 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-11-09verified + deterministic flatten80/80 supported fields landed; flatten=true byte-deterministic (sha256 0ac18f390363…)
pdf-lib1.17.1fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
@cantoo/pdf-lib (fork)2.6.5fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
pypdf6.15.0text fields verified (46/46)46 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (80/80)80 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render checkno filled output to renderno filled PDF from the pdf-lib leg to render
File facts
Source: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/t2200/t2200-fill-25e.pdf (issuer page: here)
Blank tested: cra-t2200.pdf · 329 KB · sha256 2e62314526f7a6f3c3a64f49d962d70a109500898e263066d7a899484aeeee89
License: Government of Canada (Crown copyright). Non-commercial reproduction is permitted without further permission provided the source URL and title are cited (Government of Canada terms).
Structure: ? pages · no AcroForm · encrypted
Fields: 84 (46 text, 34 radiogroup, 4 unsupported)
Quirks & limitations
Every Canadian employer with home-office employees signs a stack of these each tax season; HR platforms bulk-fill them.
canada.ca tarpits plain curl fetches; the blank was retrieved in-page through a real browser session (same behavior first seen on TD1). The revision fetched is the current 2025 English fillable (t2200-fill-25e).
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 80 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 0ac18f39036340166283a3cd6076eab325bf5f5387134ccb19f70dd92af5ee4f.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@cra-t2200.pdf" \
-F 'fields={"form1[0].Page1[0].PartA[0].Ident[0].Last_Name_Fill[0]":"Jane Doe","form1[0].Page1[0].PartA[0].Ident[0].First_Name_Fill[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 84 field names first with the inspector or POST /api/inspect.
Field schema
All 84 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
form1[0].#pageSet[0].Page1[0].ClearData_EN[0]Unsupported
form1[0].#pageSet[0].Page1[1].ClearData_EN[0]Unsupported
form1[0].#pageSet[0].Page1[2].ClearData_EN[0]Unsupported
form1[0].Page1[0].PartA[0].Ident[0].Last_Name_Fill[0]TextField
form1[0].Page1[0].PartA[0].Ident[0].First_Name_Fill[0]TextField
form1[0].Page1[0].PartA[0].Ident[0].Tax_Year_Fill[0]TextField
form1[0].Page1[0].PartA[0].Ident[0].Job_Title_Fill[0]TextField
form1[0].Page1[0].PartA[0].Ident[0].BriefDescription[0]TextField
form1[0].Page1[0].PartB[0].Name_Employer_Fill[0]TextField
form1[0].Page1[0].PartB[0].Address_Fill[0]TextField
form1[0].Page1[0].PartC[0].Q1[0].Q1[0].Line_1_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page1[0].PartC[0].Q1[0].Dates[0].FromToDates_Comb_Adv_EN[0].FromDate[0]TextField8
form1[0].Page1[0].PartC[0].Q1[0].Dates[0].FromToDates_Comb_Adv_EN[0].ToDate[0]TextField8
form1[0].Page1[0].PartC[0].Q1[0].Dates[0].Text_4_Fill[0]TextField
form1[0].Page1[0].PartC[0].Q2[0].Q1[0].Q1_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page1[0].PartC[0].Q2[0].List[0].List_Item1[0].Amount[0].NumWithoutCurrency[0]TextField
form1[0].Page1[0].PartC[0].Q2[0].List[0].List_Item2[0].Goods_Sold_Fill[0]TextField
form1[0].Page1[0].PartC[0].Q2[0].Q2[0].Q2_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page1[0].PartC[0].Q2[0].Q3[0].Q2_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page1[0].PartC[0].Q3[0].List[0].Item1[0].Q3_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page1[0].PartC[0].Q3[0].List[0].Item2[0].Q3_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page1[0].PartC[0].Q3[0].List[0].Item3[0].Q3_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page1[0].PartC[0].Q3[0].List[0].Item4[0].Q3_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q4[0].Q1[0].Q4_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q4[0].Q2[0].Q4_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q4[0].Q3[0].Q4_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q5[0].Q1[0].Q5_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line1[0].Amount[0].NumWithoutCurrency[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line1[0].Amount[0].Expense_Fill[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line1[0].Line_1_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line2[0].Amount[0].Amount2[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line2[0].Amount[0].Expense_Fill[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line2[0].Line_2_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line3[0].Amount3[0].NumWithoutCurrency[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line3[0].Amount3[0].Expense_Fill[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q5[0].Reimbursed[0].Line3[0].Line_3_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q6[0].Q1[0].Q6_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q6[0].Q2[0].Text_2_Fill[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q7[0].Q1[0].Q7_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q7[0].Q2[0].Text_2_Fill[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q8[0].Q1[0].Q8_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q8[0].Q2[0].List[0].Item1[0].NumWithoutCurrency[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q8[0].Q2[0].List[0].Item2[0].Amount_1[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q8[0].Q2[0].List[0].Item2[0].NumWithoutCurrency[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q8[0].Q2[0].List[0].Item3[0].NumWithoutCurrency[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q1[0].Q9_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q2[0].Q9_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q3[0].Line1[0].Amount_1[0].NumWithoutCurrency_Amount_1[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q3[0].Line1[0].Expense_Fill_1[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q3[0].Line2[0].Amount_2[0].NumWithoutCurrency_Amount_2[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q3[0].Line2[0].Expense_Fill_2[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q3[0].Line3[0].Amount_3[0].NumWithoutCurrency_Amount_3[0]TextField
form1[0].Page2[0].PartC_Continued[0].Q9[0].Q3[0].Line3[0].Expense_Fill_3[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q10[0].Q1[0].Q10_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line1[0].Amount[0].NumWithoutCurrency[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line1[0].Amount[0].Expense_Fill[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line1[0].Line_1_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line2[0].Amount[0].Amount2[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line2[0].Amount[0].Expense_Fill[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line2[0].Line_2_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line3[0].Amount3[0].NumWithoutCurrency[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line3[0].Amount3[0].Expense_Fill[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q10[0].Reimbursed[0].Line3[0].Line_3_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q11[0].Q1[0].Q11_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q11[0].Q2[0].Text_2_Fill[0]TextField
form1[0].Page3[0].PartC_Continued[0].Q12[0].Q1[0].Q12_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q12[0].Q2[0].Q12_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q12[0].Q3[0].Q12_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q13[0].Q1[0].Q13_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q13[0].Q2[0].Q13_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q13[0].Q3[0].Q13_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q13[0].Q4[0].Q13_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q14[0].Q1[0].Q14_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartC_Continued[0].Q14[0].Q2[0].Q14_RadioButtonGroup[0]RadioGroup2 options
form1[0].Page3[0].PartD[0].Declaration1[0].Name_Authorized_Fill[0]TextField
form1[0].Page3[0].PartD[0].Declaration1[0].Title_Fill[0]TextField
form1[0].Page3[0].PartD[0].Declaration1[0].Date[0]TextField
form1[0].Page3[0].PartD[0].Declaration1[0].PhoneNumber[0].Telephone_Fill[0]TextField
form1[0].Page3[0].PartD[0].Declaration1[0].PhoneNumber[0].Ext_Fill[0]TextField
form1[0].Page3[0].PartD[0].Declaration1[0].Footnote[0]Unsupported
form1[0].Page3[0].PartE[0].Declaration2[0].Name_Employee_Fill[0]TextField
form1[0].Page3[0].PartE[0].Declaration2[0].SIN_BordersAll_EN[0]TextField9
form1[0].Page3[0].PartE[0].Declaration2[0].Date[0]TextField
form1[0].Page3[0].PartE[0].Declaration2[0].HomeAddress[0]TextField
Frequently asked
Can I fill the T2200 programmatically?
Yes — the blank T2200 E (25) T2200 is a fillable AcroForm with 84 fields. In our tested run, all 80 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib cannot open it, and pypdf handled its text fields. Field names are listed in the schema on this page.
Why do PDF libraries reject the T2200?
The blank is AES-encrypted with an empty user password: anyone can open it in a viewer, but the owner password restricts modification, and strict parsers refuse the file outright. The pdfops API opens owner-locked files like this directly, and a password form field covers files that need a user password. qpdf --decrypt removes the restriction losslessly; pypdf can open it directly when its optional cryptography dependency is installed; pdftk-java both reads and fills it natively (its output is decrypted).
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# CRA TD1 (2026): 27 fillable PDF fields (TD1 E (26))
Source: https://pdfops.dev/registry/cra-td1
Registry
CRA TD1 (2026) — programmatic fill compatibility
Personal Tax Credits Return · Canada Revenue Agency (CRA) · TD1 E (26). Tested 2026-11-09 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-11-09verified + deterministic flatten27/27 supported fields landed; flatten=true byte-deterministic (sha256 2c200977f9c5…)
pdf-lib1.17.1fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
@cantoo/pdf-lib (fork)2.6.5fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
pypdf6.15.0text fields verified (24/24)24 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (27/27)27 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render checkno filled output to renderno filled PDF from the pdf-lib leg to render
File facts
Source: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1/td1-fill-26e.pdf (issuer page: here)
Blank tested: cra-td1.pdf · 229 KB · sha256 4792ecda7b50345d299eeeccd970e0d196103a00c0382cc4dc9b550b2539f18d
License: Government of Canada (Crown copyright). Non-commercial reproduction is permitted without further permission provided the source URL and title are cited (Government of Canada Terms and Conditions, canada.ca/en/transparency/terms.html); commercial redistribution requires separate permission from the responsible institution. Unlike this registry's US federal entries (public domain, 17 U.S.C. § 105), Crown-copyright material is reproduced here under those non-commercial terms, with attribution as given above.
Structure: ? pages · no AcroForm · encrypted
Fields: 29 (24 text, 2 unsupported, 2 checkbox, 1 radiogroup)
Quirks & limitations
First non-US jurisdiction in this registry, and it lands on BOTH known failure classes at once. `Producer`/`Creator: Designer 6.3` (Adobe LiveCycle Designer) and dotted field names (`form1[0].Page1[0].Subform1[0].Identification[0].Last_name[0]`) confirm the same LiveCycle hybrid-XFA authoring this registry's IRS entries use — but TD1 is ALSO AES-encrypted (R=4/AESv2) with an empty user password, the same owner-locked pattern documented in ca-fl-100. No other entry in this registry combines hybrid-XFA and owner-password encryption; each of the other two forms with either trait has only one.
Verified directly with `qpdf --show-encryption`: R=4, empty user password, 'modify forms: allowed' and 'modify annotations: allowed' are both permitted, but 'modify document assembly' and 'modify other' are not — a different permission profile from ca-fl-100 (P=-1036 here vs. P=-1084 there, which additionally blocks 'extract for any purpose' and 'modify annotations'). The two encrypted forms in this registry are not interchangeable cases; the restriction bits differ per-issuer.
pypdf opens the encrypted original directly with an empty-string decrypt call (`reader.decrypt('')` returns PasswordType.USER_PASSWORD) and reports 55 fields with no extra `cryptography` dependency needed — friendlier than ca-fl-100, which pypdf can only open at all with `pypdf[crypto]` installed. pdfops' own `/api/inspect` rejects the raw file outright with `encrypted_pdf` (status 400), and cantoo/pdf-lib fail the same way they do on ca-fl-100: `ignoreEncryption: true` lets `PDFDocument.load` return without throwing, but the very next call (`getPageCount()`) throws, because the page tree's own object streams are still encrypted and `ignoreEncryption` never actually decrypts them — this registry's own machine-tested legs against the raw blank stop right there, which is why this entry's `machine` block has no pdf-lib/cantoo/render data. `qpdf --decrypt` losslessly strips the encryption first (as with ca-fl-100), after which cantoo/pdf-lib read it as a normal hybrid AcroForm/XFA form.
Manually verified on a `qpdf --decrypt`'d copy (outside this registry's automated legs, which correctly refuse the raw encrypted blank): pdf-lib/cantoo see only 29 AcroForm-fallback fields (2 buttons, 24 text, 2 checkbox, 1 radio group) on the decrypted file, well under pypdf's 55 (recorded above, read from the original encrypted blank via pypdf's own internal decrypt) — the same AcroForm-vs-fuller-enumeration gap this registry's IRS hybrid-XFA entries show, here measured on a non-IRS, non-US form for the first time.
The one RadioGroup (non-resident status, page 2) exports bare numeric strings `["1","2"]` rather than semantic values like the ao-440/opm-of-306 radio groups in this registry use — LiveCycle Designer's default export-value behavior when the form author doesn't hand-set one. A filler has to consult the printed form text (or Designer's own field labels, not exposed via AcroForm) to know '1' means one option and '2' the other; the PDF alone doesn't say.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 27 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 2c200977f9c57bdd0e727259ee4d9e40d3ac75a21867802bcefcba58ccd9da09.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@cra-td1.pdf" \
-F 'fields={"form1[0].Page1[0].Subform1[0].Identification[0].Last_name[0]":"Jane Doe","form1[0].Page1[0].Subform1[0].Identification[0].First_name[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 29 field names first with the inspector or POST /api/inspect.
Field schema
All 29 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
form1[0].#pageSet[0].Page1[0].ClearData_EN[0]Unsupported
form1[0].#pageSet[0].Page1[1].ClearData_EN[0]Unsupported
form1[0].Page1[0].Subform1[0].Identification[0].Last_name[0]TextField
form1[0].Page1[0].Subform1[0].Identification[0].First_name[0]TextField
form1[0].Page1[0].Subform1[0].Identification[0].DOB[0]TextField
form1[0].Page1[0].Subform1[0].Identification[0].Employee_number[0]TextField
form1[0].Page1[0].Subform1[0].Identification[0].Address[0]TextField
form1[0].Page1[0].Subform1[0].Identification[0].PostalCode_Comb_BordersAll[0].PostalCode[0]TextField6
form1[0].Page1[0].Subform1[0].Identification[0].NR_country_name[0]TextField
form1[0].Page1[0].Subform1[0].Identification[0].SIN_Comb_BordersAll[0].SIN_Comb[0]TextField9
form1[0].Page1[0].Subform1[0].number1_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number2_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number3_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number4_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number5_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number6_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number7_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number8_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number9_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number10_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number11_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number12_subform[0].Amount_fld[0]TextField
form1[0].Page1[0].Subform1[0].number13_subform[0].Amount_fld[0]TextField
form1[0].Page2[0].Subform2[0].MoreThan_chk[0]CheckBox
form1[0].Page2[0].Subform2[0].TotalIncome_chk[0]CheckBox
form1[0].Page2[0].Subform2[0].NonRes_sf[0].RadioButtonGroup[0]RadioGroup2 options
form1[0].Page2[0].Subform2[0].Amount1[0]TextField
form1[0].Page2[0].Subform2[0].Amount2[0]TextField
form1[0].Page2[0].Certification_subform[0].DateYYYYMMDD_BordersAll[0]TextField
Frequently asked
Can I fill the CRA TD1 (2026) programmatically?
Yes — the blank TD1 E (26) CRA TD1 (2026) is a fillable AcroForm with 29 fields. In our tested run, all 27 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib cannot open it, and pypdf handled its text fields. Field names are listed in the schema on this page.
Why do PDF libraries reject the CRA TD1 (2026)?
The blank is AES-encrypted with an empty user password: anyone can open it in a viewer, but the owner password restricts modification, and strict parsers refuse the file outright. The pdfops API opens owner-locked files like this directly, and a password form field covers files that need a user password. qpdf --decrypt removes the restriction losslessly; pypdf can open it directly when its optional cryptography dependency is installed; pdftk-java both reads and fills it natively (its output is decrypted).
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Form WH-347: no fillable fields — flat PDF (OMB expires 2028)
Source: https://pdfops.dev/registry/dol-wh-347
Registry
Form WH-347 — programmatic fill compatibility
Payroll (For Contractor's Optional Use) — certified payroll for federally financed construction · US Department of Labor, Wage and Hour Division · OMB expires 2028. Tested 2026-08-07 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-07no form fields (flat PDF)error:
pdf-lib1.17.1verified (0/0)0 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (0/0)0 fields filled in-process
pypdf6.15.0text fields verified (0/0)0 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (0/0)0 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values missing from render0/0 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 29f509d5c983…
File facts
Source: https://www.dol.gov/sites/dolgov/files/WHD/legacy/files/wh347.pdf (issuer page: here)
Blank tested: dol-wh-347.pdf · 298 KB · sha256 fa28f033a8250dc3c209fe9c8e7f5cfcde70f8f0cb11a6ab2486eaebdd5db557
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 2 pages · AcroForm
Fields: 0 ()
Quirks & limitations
Weekly certified payroll for every Davis-Bacon federal construction contract — construction-payroll SaaS exists largely to generate this form.
dol.gov blocks scripted fetches of the blank; retrieved via a real browser session (same lane as SSA-89).
Tested request
The unmodified blank is rejected at parse time, so there is no working direct request to show — see the quirks above for the verified decrypt-first workaround.
Frequently asked
Can I fill the Form WH-347 programmatically?
Not by writing field values — the unmodified blank carries zero AcroForm fields; every page is flat content. All seven tools in the matrix agree (0 fields enumerated everywhere). To produce a completed Form WH-347 you either generate the document, overlay text at coordinates, or add real fields to the blank first — drawing them in the browser at pdfops.dev/tools/make-fillable exports a standard AcroForm version that any filler (including the pdfops API) then handles.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# HMRC 64-8: 76 fillable PDF fields (HMRC 05/25)
Source: https://pdfops.dev/registry/hmrc-64-8
Registry
HMRC 64-8 — programmatic fill compatibility
Authorising your agent · HM Revenue & Customs (HMRC) · HMRC 05/25. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten76/76 supported fields landed; flatten=true byte-deterministic (sha256 a1b9fc23a24f…)
pdf-lib1.17.1verified (76/76)76 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (76/76)76 fields filled in-process
pypdf6.15.0text fields verified (59/59)59 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (76/76)76 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/hmrc-64-8.pdf: page 2: shared object 570: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render check24.02.0values render (59/59)59/59 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 0c08158ddb19…
File facts
Source: https://assets.publishing.service.gov.uk/media/6852e9f02b367fdd44c15e8a/64-8.pdf (issuer page: here)
Blank tested: hmrc-64-8.pdf · 1038 KB · sha256 9b52438ecc4d9e4aa4e67d4a61c21043b5419b755c111dcddf76b9fb1abaafc4
License: Crown copyright, published under the Open Government Licence v3.0. The hash-verified blank is redistributed here unmodified.
Structure: 3 pages · AcroForm
Fields: 77 (59 text, 17 checkbox, 1 button)
Quirks & limitations
The first non-US, non-XFA jurisdiction in this registry: a plain AcroForm (no XFA layer at all) from HMRC, the UK's tax authority — useful as a check that this registry's US-federal-heavy findings (XFA drop, maxLength enforcement) generalize outside the IRS/USCIS family rather than being an artifact of US agencies' specific tooling.
A4 page size (595 x 842pt), not US Letter — a real-world reminder that page-geometry assumptions baked into a filler (e.g. fixed-DPI raster preview sizing) can't be hardcoded to Letter.
Carries field-level JavaScript (/AA actions) like the US federal forms in this registry, but built with Adobe InDesign CS4 exporting through Adobe PDF Library 9.0 rather than LiveCycle Designer — a different production pipeline arriving at the same 'JS the non-Adobe fillers won't run' outcome.
77 fields covering both the individual/Self Assessment authorisation (page 1) and the business-tax authorisation (page 2) sections on one combined form, plus signature/date fields on page 3.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 76 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 a1b9fc23a24febe9ad8a9ecb3123a127eb7a1f1282bdfdfe8f019fc1d3b24f1f.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@hmrc-64-8.pdf" \
-F 'fields={"txtName":"PDFops","txtCompanyName":"PDFops"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 77 field names first with the inspector or POST /api/inspect.
Field schema
All 77 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
txtNameTextField26
txtCompanyNameTextField40
AgentNameTextField26
YourAddress1TextField30
YourAddress2TextField30
YourAddress3TextField40
YourPost codeTextField20
YourPhoneNumberTextField30
AgentsAddress1TextField30
AgentsAddress2TextField30
AgentsAddress3TextField40
AgentsPostCodeTextField20
AgentsPhoneNumberTextField30
Agent code SATextField26
Agent code CTTextField30
Client refTextField20
chkSACheckBox
chkPartnershipCheckBox
SA NI 12TextField2
SA NI 34TextField2
SA NI 56TextField2
SA NI 78TextField2
SA NI 9TextField1
UTR 1-5TextField5
UTR 6-10TextField5
chkUTRCheckBox
chk to agentCheckBox
chkTrustCheckBox
TR UTR 1-5TextField5
TR UTR 6-10TextField5
chkPAYECheckBox
PAYE NI 12TextField2
PAYE NI 34TextField2
PAYE NI 56TextField2
PAYE NI 78TextField2
PAYE NI 9TextField1
Clear formButton
chkCorpTaxCheckBox
CRNTextField8
CT UTR 1-5TextField5
CT UTR 6-10TextField5
chkTaxcreditsCheckBox
TC NI 12TextField2
TC NI 34TextField2
TC NI 56TextField2
TC NI 78TextField2
TC NI 9TextField1
Joint claimants nameTextField50
JC NI 12TextField2
JC NI 34TextField2
JC NI 56TextField2
JC NI 78TextField2
JC NI 9TextField1
chkVATCheckBox
VATTextField9
chkVAT not registeredCheckBox
chkCISCheckBox
CIS reference numberTextField50
CIS PAYE Ref no 1-3TextField3
CIS PAYE Ref no 4-13TextField10
CIS Agent Gateway IDTextField50
CIS PAYE IDTextField50
chkAuthAgentCIS1CheckBox
chkAuthAgent CIS2CheckBox
chkEmp PAYE schemeCheckBox
Emp PAYE Ref no 1-3TextField3
Emp PAYE Ref no 4-13TextField10
EMP PAYE Agent Gateway IDTextField50
EMP PAYE IDTextField50
EMPchkAuthAgentPAYECheckBox
EMPchkAuthAgent CISCheckBox
chkVATDIYCheckBox
VATDIY NI 12TextField2
VATDIY NI 34TextField2
VATDIY NI 56TextField2
VATDIY NI 78TextField2
VATDIY NI 9TextField1
Frequently asked
Can I fill the HMRC 64-8 programmatically?
Yes — the blank HMRC 05/25 HMRC 64-8 is a fillable AcroForm with 77 fields. In our tested run, all 76 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# PDF form compatibility registry — can you fill it programmatically?
Source: https://pdfops.dev/registry
Registry
PDF form compatibility registry
Can that government form actually be filled programmatically? Each entry is a real public form tested on its unmodified upstream blank — field schema, XFA and encryption quirks, per-tool results, provenance hash, and the exact request that worked. No vendor-doc claims: every cell traces to a recorded run.
The forms
FormJurisdictionFieldsTraitspdfops APIpdf-lib@cantoo/pdf-libpypdfrenders?
California DE 1
California (state)
112
clean AcroForm
verified + deterministic flatten
verified (111/111)
verified (111/111)
text fields verified (91/91)
values render (91/91)
California FL-100
California (state)
158
encrypted
verified + deterministic flatten
fails at load
fails at load
text fields verified (66/66)
no filled output to render
FL-150
California (state)
266
encrypted
verified + deterministic flatten
fails at load
fails at load
text fields verified (212/212)
no filled output to render
T2200
Canada federal
84
encrypted
verified + deterministic flatten
fails at load
fails at load
text fields verified (46/46)
no filled output to render
CRA TD1 (2026)
Canada federal
29
encrypted
verified + deterministic flatten
fails at load
fails at load
text fields verified (24/24)
no filled output to render
Form WH-347
US federal
0
clean AcroForm
no form fields (flat PDF)
verified (0/0)
verified (0/0)
text fields verified (0/0)
values missing from render
HMRC 64-8
United Kingdom
77
clean AcroForm
verified + deterministic flatten
verified (76/76)
verified (76/76)
text fields verified (59/59)
values render (59/59)
IRS Form 1040
US federal
199
hybrid XFA
verified + deterministic flatten
verified (199/199)
verified (199/199)
text fields verified (126/126)
values render (126/126)
IRS Form 2848
US federal
92
hybrid XFA
verified + deterministic flatten
verified (91/91)
verified (91/91)
text fields verified (70/70)
values render (70/70)
Form 941
US federal
116
hybrid XFA
verified + deterministic flatten
verified (116/116)
verified (116/116)
text fields verified (92/92)
values render (92/92)
Form SS-4
US federal
89
hybrid XFA
verified + deterministic flatten
verified (89/89)
verified (89/89)
text fields verified (45/45)
values render (45/45)
Form W-2
US federal
568
hybrid XFA
verified + deterministic flatten
verified (568/568)
verified (568/568)
text fields verified (528/528)
values render (528/528)
IRS Form W-4
US federal
48
hybrid XFA
verified + deterministic flatten
verified (48/48)
verified (48/48)
text fields verified (43/43)
values render (43/43)
Form W-8BEN
US federal
23
hybrid XFA, signature fields
verified + deterministic flatten
verified (22/22)
verified (22/22)
text fields verified (20/20)
values render (20/20)
IRS Form W-9
US federal
23
hybrid XFA
verified + deterministic flatten
verified (23/23)
verified (23/23)
text fields verified (15/15)
values render (15/15)
Form IT-2104
New York (state)
25
clean AcroForm
verified + deterministic flatten
verified (25/25)
verified (25/25)
text fields verified (19/19)
values render (19/19)
OPM Optional Form 306
US federal
40
signature fields
verified + deterministic flatten
verified (38/38)
verified (38/38)
text fields verified (25/25)
values render (25/25)
Form SSA-89
US federal
23
encrypted
verified + deterministic flatten
fails at load
fails at load
text fields verified (15/15)
no filled output to render
DS-11
US federal
84
clean AcroForm
verified + deterministic flatten
verified (83/83)
verified (83/83)
text fields verified (63/63)
values render (63/63)
USCIS Form I-9
US federal
128
clean AcroForm
verified + deterministic flatten
verified (128/128)
verified (128/128)
text fields verified (115/115)
values render (115/115)
Official Form 101
US federal courts
271
signature fields
verified + deterministic flatten
verified (268/268)
verified (268/268)
text fields verified (176/176)
values render (176/176)
AO 440
US federal courts
34
clean AcroForm
verified + deterministic flatten
verified (31/31)
verified (31/31)
text fields verified (29/29)
values render (29/29)
Machine-readable version of everything on these pages: registry.json. Last test run: 2026-11-16.
Methodology
Each blank is fetched from the issuer's own URL (recorded per entry, pinned by sha256 — several issuers re-publish changed files at the same URL). Six independent legs then run against the same bytes:
pdfops API — inspect → fill every supported field → re-inspect the output to verify each value landed → fill twice with flatten=true and compare sha256 (byte-determinism check) → re-inspect the flattened output (expect zero remaining fields).
pdf-lib (upstream 1.17.1) — load, enumerate, fill, save, reload, verify each value in-process.
@cantoo/pdf-lib (the maintained fork, 2.6.5) — the exact same steps as the pdf-lib leg, run separately so fork-vs-upstream divergence on real forms shows up as data instead of folklore.
poppler render check — pdftotext over the pdf-lib-filled output must contain every filled text value: a value that lands in /V but never paints is not filled in any way a human reviewer accepts. A pdftoppm page-1 raster sha256 is recorded alongside (font-stack-sensitive, so informational rather than pass/fail).
pypdf — load (including empty-user-password decryption where its optional cryptography dependency allows), enumerate, fill text fields, write, re-read, verify. Fill scope is text fields only — claiming checkbox/radio success across viewers would overstate it.
qpdf — structural --check and --show-encryption.
Values are synthesized per field type and honor maxLength (the 1040's 2-character split boxes are why that matters). Signature and pushbutton fields are skipped by design — a value-filling API should not fake a cryptographic signature. Failures are recorded as results, not retried into silence: the registry exists as much for the form that breaks tooling as for the one that works.
An automated weekly recheck re-downloads every source URL and compares hashes; when an issuer revs a form, the entry is re-tested against the new file before the page changes.
Limitations, honestly
22 forms today — a corpus, not a census. Entries are added where the quirk teaches something (XFA hybrids, encryption, signature fields), not to inflate the count.
Some issuers (USCIS, SSA, DOL) block automated fetching of their blanks; forms from those sources (e.g. the I-9) are on the roadmap but need a manual-fetch lane before they can be re-verified automatically, so they are not listed yet.
ACORD forms (e.g. ACORD 25) are license-restricted and cannot be redistributed here; an entry that links out without hosting the blank may come later.
"Verified" means the value round-tripped through re-inspection on the tested date with the listed versions — not a guarantee about other versions, viewers, or e-filing portals' server-side validation.
Test your own form
The same chain that produced these results runs on any PDF: drop yours into the inspector to see its fields and the exact fill call, or start from a flat scan with make-fillable. The fill itself is one request — POST /api/fill-form, no key needed for the first 100 calls/IP each month (docs).
← PDFops home · API docs · Comparisons
---
# IRS Form 1040: 199 fillable PDF fields (2025 tax year)
Source: https://pdfops.dev/registry/irs-f1040
Registry
IRS Form 1040 — programmatic fill compatibility
U.S. Individual Income Tax Return · Internal Revenue Service (IRS) · 2025 tax year. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten199/199 supported fields landed; flatten=true byte-deterministic (sha256 294cf3d8659b…)
pdf-lib1.17.1verified (199/199)199 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (199/199)199 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (126/126)126 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (199/199)199 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (126/126)126/126 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 f67b561b0b10…
File facts
Source: https://www.irs.gov/pub/irs-pdf/f1040.pdf (issuer page: here)
Blank tested: irs-f1040.pdf · 215 KB · sha256 3d31c226df0d189ced80e039d01cf0f8820c1019681a0f0ca6264de277b7e982
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 2 pages · AcroForm + XFA layer (hybrid)
Fields: 199 (126 text, 73 checkbox)
Quirks & limitations
The stress test of this corpus: ~200 fields on 2 pages, including split character-box fields with maxLength as low as 2. Any filler that synthesizes values without honoring maxLength gets a hard reject — the pdfops API returns a 400 naming the exact offending field rather than silently truncating.
Re-issued every tax year at the same URL — pin by hash, not URL.
Hybrid AcroForm/XFA, same fill-then-drop-XFA behavior as the other IRS forms.
Several dollar-amount lines are text fields with no numeric format enforcement at the AcroForm level; validation lives in the form's JavaScript, which non-Adobe fillers do not execute. Validate amounts in your own layer.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 199 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 294cf3d8659be52d36c571b2086e2bc01139a0df649461211e30fc50e051c1c2.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-f1040.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].f1_01[0]":"Jane Doe","topmostSubform[0].Page1[0].f1_02[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 199 field names first with the inspector or POST /api/inspect.
Field schema
All 199 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].Page1[0].f1_01[0]TextField
topmostSubform[0].Page1[0].f1_02[0]TextField
topmostSubform[0].Page1[0].f1_03[0]TextField2
topmostSubform[0].Page1[0].c1_1[0]CheckBox
topmostSubform[0].Page1[0].c1_2[0]CheckBox
topmostSubform[0].Page1[0].f1_04[0]TextField
topmostSubform[0].Page1[0].c1_3[0]CheckBox
topmostSubform[0].Page1[0].f1_05[0]TextField2
topmostSubform[0].Page1[0].f1_06[0]TextField2
topmostSubform[0].Page1[0].f1_07[0]TextField4
topmostSubform[0].Page1[0].f1_08[0]TextField2
topmostSubform[0].Page1[0].f1_09[0]TextField2
topmostSubform[0].Page1[0].f1_10[0]TextField4
topmostSubform[0].Page1[0].c1_4[0]CheckBox
topmostSubform[0].Page1[0].f1_11[0]TextField
topmostSubform[0].Page1[0].f1_12[0]TextField
topmostSubform[0].Page1[0].f1_13[0]TextField
topmostSubform[0].Page1[0].f1_14[0]TextField
topmostSubform[0].Page1[0].f1_15[0]TextField
topmostSubform[0].Page1[0].f1_16[0]TextField9
topmostSubform[0].Page1[0].f1_17[0]TextField
topmostSubform[0].Page1[0].f1_18[0]TextField
topmostSubform[0].Page1[0].f1_19[0]TextField9
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_20[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_21[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_22[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_23[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_24[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_25[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_26[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_27[0]TextField
topmostSubform[0].Page1[0].c1_5[0]CheckBox
topmostSubform[0].Page1[0].c1_6[0]CheckBox
topmostSubform[0].Page1[0].c1_7[0]CheckBox
topmostSubform[0].Page1[0].Checkbox_ReadOrder[0].c1_8[0]CheckBox
topmostSubform[0].Page1[0].Checkbox_ReadOrder[0].c1_8[1]CheckBox
topmostSubform[0].Page1[0].Checkbox_ReadOrder[0].c1_8[2]CheckBox
topmostSubform[0].Page1[0].Checkbox_ReadOrder[0].f1_28[0]TextField
topmostSubform[0].Page1[0].c1_8[0]CheckBox
topmostSubform[0].Page1[0].c1_8[1]CheckBox
topmostSubform[0].Page1[0].f1_29[0]TextField
topmostSubform[0].Page1[0].c1_9[0]CheckBox
topmostSubform[0].Page1[0].f1_30[0]TextField
topmostSubform[0].Page1[0].c1_10[0]CheckBox
topmostSubform[0].Page1[0].c1_10[1]CheckBox
topmostSubform[0].Page1[0].Dependents_ReadOrder[0].c1_11[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row1[0].f1_31[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row1[0].f1_32[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row1[0].f1_33[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row1[0].f1_34[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row2[0].f1_35[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row2[0].f1_36[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row2[0].f1_37[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row2[0].f1_38[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row3[0].f1_39[0]TextField9
topmostSubform[0].Page1[0].Table_Dependents[0].Row3[0].f1_40[0]TextField9
topmostSubform[0].Page1[0].Table_Dependents[0].Row3[0].f1_41[0]TextField9
topmostSubform[0].Page1[0].Table_Dependents[0].Row3[0].f1_42[0]TextField9
topmostSubform[0].Page1[0].Table_Dependents[0].Row4[0].f1_43[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row4[0].f1_44[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row4[0].f1_45[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row4[0].f1_46[0]TextField
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent1[0].c1_12[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent1[0].c1_13[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent2[0].c1_14[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent2[0].c1_15[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent3[0].c1_16[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent3[0].c1_17[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent4[0].c1_18[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row5[0].Dependent4[0].c1_19[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent1[0].c1_20[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent1[0].c1_21[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent2[0].c1_22[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent2[0].c1_23[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent3[0].c1_24[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent3[0].c1_25[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent4[0].c1_26[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row6[0].Dependent4[0].c1_27[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent1[0].c1_28[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent1[0].c1_28[1]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent2[0].c1_29[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent2[0].c1_29[1]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent3[0].c1_30[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent3[0].c1_30[1]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent4[0].c1_31[0]CheckBox
topmostSubform[0].Page1[0].Table_Dependents[0].Row7[0].Dependent4[0].c1_31[1]CheckBox
topmostSubform[0].Page1[0].c1_32[0]CheckBox
topmostSubform[0].Page1[0].f1_47[0]TextField
topmostSubform[0].Page1[0].f1_48[0]TextField
topmostSubform[0].Page1[0].f1_49[0]TextField
topmostSubform[0].Page1[0].f1_50[0]TextField
topmostSubform[0].Page1[0].f1_51[0]TextField
topmostSubform[0].Page1[0].f1_52[0]TextField
topmostSubform[0].Page1[0].f1_53[0]TextField
topmostSubform[0].Page1[0].f1_54[0]TextField
topmostSubform[0].Page1[0].f1_55[0]TextField
topmostSubform[0].Page1[0].f1_56[0]TextField
topmostSubform[0].Page1[0].f1_57[0]TextField
topmostSubform[0].Page1[0].f1_58[0]TextField
topmostSubform[0].Page1[0].f1_59[0]TextField
topmostSubform[0].Page1[0].f1_60[0]TextField
topmostSubform[0].Page1[0].f1_61[0]TextField
topmostSubform[0].Page1[0].c1_33[0]CheckBox
topmostSubform[0].Page1[0].c1_34[0]CheckBox
topmostSubform[0].Page1[0].f1_62[0]TextField
topmostSubform[0].Page1[0].f1_63[0]TextField
topmostSubform[0].Page1[0].c1_35[0]CheckBox
topmostSubform[0].Page1[0].c1_36[0]CheckBox
topmostSubform[0].Page1[0].c1_37[0]CheckBox
topmostSubform[0].Page1[0].f1_64[0]TextField
topmostSubform[0].Page1[0].f1_65[0]TextField
topmostSubform[0].Page1[0].f1_66[0]TextField
topmostSubform[0].Page1[0].c1_38[0]CheckBox
topmostSubform[0].Page1[0].c1_39[0]CheckBox
topmostSubform[0].Page1[0].c1_40[0]CheckBox
topmostSubform[0].Page1[0].f1_67[0]TextField
topmostSubform[0].Page1[0].f1_68[0]TextField
topmostSubform[0].Page1[0].f1_69[0]TextField
topmostSubform[0].Page1[0].c1_41[0]CheckBox
topmostSubform[0].Page1[0].c1_42[0]CheckBox
topmostSubform[0].Page1[0].f1_70[0]TextField
topmostSubform[0].Page1[0].c1_43[0]CheckBox
topmostSubform[0].Page1[0].c1_44[0]CheckBox
topmostSubform[0].Page1[0].f1_71[0]TextField
topmostSubform[0].Page1[0].f1_72[0]TextField
topmostSubform[0].Page1[0].f1_73[0]TextField
topmostSubform[0].Page1[0].f1_74[0]TextField
topmostSubform[0].Page1[0].f1_75[0]TextField
topmostSubform[0].Page2[0].f2_01[0]TextField
topmostSubform[0].Page2[0].c2_1[0]CheckBox
topmostSubform[0].Page2[0].c2_2[0]CheckBox
topmostSubform[0].Page2[0].c2_3[0]CheckBox
topmostSubform[0].Page2[0].c2_4[0]CheckBox
topmostSubform[0].Page2[0].c2_5[0]CheckBox
topmostSubform[0].Page2[0].c2_6[0]CheckBox
topmostSubform[0].Page2[0].c2_7[0]CheckBox
topmostSubform[0].Page2[0].c2_8[0]CheckBox
topmostSubform[0].Page2[0].f2_02[0]TextField
topmostSubform[0].Page2[0].f2_03[0]TextField
topmostSubform[0].Page2[0].f2_04[0]TextField
topmostSubform[0].Page2[0].f2_05[0]TextField
topmostSubform[0].Page2[0].f2_06[0]TextField
topmostSubform[0].Page2[0].c2_9[0]CheckBox
topmostSubform[0].Page2[0].c2_10[0]CheckBox
topmostSubform[0].Page2[0].c2_11[0]CheckBox
topmostSubform[0].Page2[0].f2_07[0]TextField
topmostSubform[0].Page2[0].f2_08[0]TextField
topmostSubform[0].Page2[0].f2_09[0]TextField
topmostSubform[0].Page2[0].f2_10[0]TextField
topmostSubform[0].Page2[0].f2_11[0]TextField
topmostSubform[0].Page2[0].f2_12[0]TextField
topmostSubform[0].Page2[0].f2_13[0]TextField
topmostSubform[0].Page2[0].f2_14[0]TextField
topmostSubform[0].Page2[0].f2_15[0]TextField
topmostSubform[0].Page2[0].f2_16[0]TextField
topmostSubform[0].Page2[0].f2_17[0]TextField
topmostSubform[0].Page2[0].f2_18[0]TextField
topmostSubform[0].Page2[0].f2_19[0]TextField
topmostSubform[0].Page2[0].f2_20[0]TextField
topmostSubform[0].Page2[0].f2_21[0]TextField
topmostSubform[0].Page2[0].SSN_ReadOrder[0].f2_22[0]TextField9
topmostSubform[0].Page2[0].f2_23[0]TextField
topmostSubform[0].Page2[0].c2_12[0]CheckBox
topmostSubform[0].Page2[0].c2_13[0]CheckBox
topmostSubform[0].Page2[0].Line28_ReadOrder[0].c2_14[0]CheckBox
topmostSubform[0].Page2[0].f2_24[0]TextField
topmostSubform[0].Page2[0].f2_25[0]TextField
topmostSubform[0].Page2[0].f2_26[0]TextField
topmostSubform[0].Page2[0].f2_27[0]TextField
topmostSubform[0].Page2[0].f2_28[0]TextField
topmostSubform[0].Page2[0].f2_29[0]TextField
topmostSubform[0].Page2[0].f2_30[0]TextField
topmostSubform[0].Page2[0].c2_15[0]CheckBox
topmostSubform[0].Page2[0].f2_31[0]TextField
topmostSubform[0].Page2[0].RoutingNo[0].f2_32[0]TextField9
topmostSubform[0].Page2[0].c2_16[0]CheckBox
topmostSubform[0].Page2[0].c2_16[1]CheckBox
topmostSubform[0].Page2[0].AccountNo[0].f2_33[0]TextField17
topmostSubform[0].Page2[0].f2_34[0]TextField
topmostSubform[0].Page2[0].f2_35[0]TextField
topmostSubform[0].Page2[0].f2_36[0]TextField
topmostSubform[0].Page2[0].c2_17[0]CheckBox
topmostSubform[0].Page2[0].c2_17[1]CheckBox
topmostSubform[0].Page2[0].f2_37[0]TextField
topmostSubform[0].Page2[0].f2_38[0]TextField
topmostSubform[0].Page2[0].f2_39[0]TextField5
topmostSubform[0].Page2[0].f2_40[0]TextField
topmostSubform[0].Page2[0].f2_41[0]TextField6
topmostSubform[0].Page2[0].f2_42[0]TextField
topmostSubform[0].Page2[0].f2_43[0]TextField6
topmostSubform[0].Page2[0].f2_44[0]TextField
topmostSubform[0].Page2[0].f2_45[0]TextField
topmostSubform[0].Page2[0].f2_46[0]TextField
topmostSubform[0].Page2[0].f2_47[0]TextField11
topmostSubform[0].Page2[0].c2_18[0]CheckBox
topmostSubform[0].Page2[0].f2_48[0]TextField
topmostSubform[0].Page2[0].f2_49[0]TextField
topmostSubform[0].Page2[0].f2_50[0]TextField
topmostSubform[0].Page2[0].f2_51[0]TextField10
Frequently asked
Can I fill the IRS Form 1040 programmatically?
Yes — the blank 2025 tax year IRS Form 1040 is a fillable AcroForm with 199 fields. In our tested run, all 199 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the IRS Form 1040 an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# IRS Form 2848: 91 fillable PDF fields (Rev. January 2021)
Source: https://pdfops.dev/registry/irs-f2848
Registry
IRS Form 2848 — programmatic fill compatibility
Power of Attorney and Declaration of Representative · Internal Revenue Service (IRS) · Rev. January 2021. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten91/91 supported fields landed; flatten=true byte-deterministic (sha256 bcaaacb06222…)
pdf-lib1.17.1verified (91/91)91 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (91/91)91 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (70/70)70 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (91/91)91 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (70/70)70/70 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 7100c1e3f1ce…
File facts
Source: https://www.irs.gov/pub/irs-pdf/f2848.pdf (issuer page: here)
Blank tested: irs-f2848.pdf · 139 KB · sha256 14377021f95856c453d903aae6a178d8371b3a96e65c28418862394d9f8c2d8e
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 2 pages · AcroForm + XFA layer (hybrid)
Fields: 92 (70 text, 21 checkbox, 1 button)
Quirks & limitations
Common in tax-practice automation: CPA and enrolled-agent tooling generates one per client engagement.
Hybrid AcroForm/XFA, same fill-then-drop-XFA behavior as the other IRS forms.
Contains a document-level 'Check Form for Common Errors' button backed by JavaScript — the button survives programmatic fill but its checks only run in viewers that execute AcroForm JavaScript (Adobe). Do not rely on it as validation in an automated pipeline.
Signature lines are plain text fields, not digital-signature fields — filling them types a name; it does not cryptographically sign anything.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 91 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 bcaaacb06222c4904c95ffb6e7ec98a97ada96154d6a07e51c3a35033aa66789.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-f2848.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].TaxpayerName[0]":"Jane Doe","topmostSubform[0].Page1[0].TaxpayerAddress[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 92 field names first with the inspector or POST /api/inspect.
Field schema
All 92 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].Page1[0].CheckForm[0]Button
topmostSubform[0].Page1[0].TaxpayerName[0]TextField
topmostSubform[0].Page1[0].TaxpayerAddress[0]TextField
topmostSubform[0].Page1[0].TaxpayerIDSSN[0]TextField11
topmostSubform[0].Page1[0].TaxpayerIDITIN[0]TextField11
topmostSubform[0].Page1[0].TaxpayerIDEIN[0]TextField10
topmostSubform[0].Page1[0].TaxpayerTelephone[0]TextField
topmostSubform[0].Page1[0].TaxpayerPlanNumber[0]TextField
topmostSubform[0].Page1[0].RepresentativesName1[0]TextField
topmostSubform[0].Page1[0].RepresentativesAddress1[0]TextField
topmostSubform[0].Page1[0].SentCopies1[0]CheckBox
topmostSubform[0].Page1[0].CAFNumber1[0]TextField11
topmostSubform[0].Page1[0].PTIN1[0]TextField11
topmostSubform[0].Page1[0].TelephoneNo1[0]TextField
topmostSubform[0].Page1[0].FaxNo1[0]TextField
topmostSubform[0].Page1[0].NewAddress1[0]CheckBox
topmostSubform[0].Page1[0].NewTelephoneNo1[0]CheckBox
topmostSubform[0].Page1[0].NewFaxNo1[0]CheckBox
topmostSubform[0].Page1[0].RepresentativesName2[0]TextField
topmostSubform[0].Page1[0].RepresentativesAddress2[0]TextField
topmostSubform[0].Page1[0].SentCopies2[0]CheckBox
topmostSubform[0].Page1[0].CAFNumber2[0]TextField11
topmostSubform[0].Page1[0].PTIN2[0]TextField11
topmostSubform[0].Page1[0].TelephoneNo2[0]TextField
topmostSubform[0].Page1[0].FaxNo2[0]TextField
topmostSubform[0].Page1[0].NewAddress2[0]CheckBox
topmostSubform[0].Page1[0].NewTelephoneNo2[0]CheckBox
topmostSubform[0].Page1[0].NewFaxNo2[0]CheckBox
topmostSubform[0].Page1[0].RepresentativesName3[0]TextField
topmostSubform[0].Page1[0].RepresentativesAddress3[0]TextField
topmostSubform[0].Page1[0].CAFNumber3[0]TextField11
topmostSubform[0].Page1[0].PTIN3[0]TextField11
topmostSubform[0].Page1[0].TelephoneNo3[0]TextField
topmostSubform[0].Page1[0].FaxNo3[0]TextField
topmostSubform[0].Page1[0].NewAddress3[0]CheckBox
topmostSubform[0].Page1[0].NewTelephoneNo3[0]CheckBox
topmostSubform[0].Page1[0].NewFaxNo3[0]CheckBox
topmostSubform[0].Page1[0].RepresentativesName4[0]TextField
topmostSubform[0].Page1[0].RepresentativesAddress4[0]TextField
topmostSubform[0].Page1[0].CAFNumber4[0]TextField11
topmostSubform[0].Page1[0].PTIN4[0]TextField11
topmostSubform[0].Page1[0].TelephoneNo4[0]TextField
topmostSubform[0].Page1[0].FaxNo4[0]TextField
topmostSubform[0].Page1[0].NewAddress4[0]CheckBox
topmostSubform[0].Page1[0].NewTelephoneNo4[0]CheckBox
topmostSubform[0].Page1[0].NewFaxNo4[0]CheckBox
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow1[0].Description1[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow1[0].TaxForm1[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow1[0].Years1[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow2[0].Description2[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow2[0].TaxForm2[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow2[0].Years2[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow3[0].Description3[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow3[0].TaxForm3[0]TextField
topmostSubform[0].Page1[0].Table_Line3[0].BodyRow3[0].Years3[0]TextField
topmostSubform[0].Page1[0].SpecificUse[0]CheckBox
topmostSubform[0].Page1[0].AccessRecords[0]CheckBox
topmostSubform[0].Page1[0].AuthorizeDisclosure[0]CheckBox
topmostSubform[0].Page1[0].SubtituteOrAdd[0]CheckBox
topmostSubform[0].Page1[0].SignReturn[0]CheckBox
topmostSubform[0].Page1[0].AdditionalActs1[0]TextField
topmostSubform[0].Page1[0].AdditionalActs2[0]TextField
topmostSubform[0].Page1[0].AdditionalActs3[0]TextField
topmostSubform[0].Page1[0].OtherActs[0]CheckBox
topmostSubform[0].Page1[0].OtherActs1[0]TextField
topmostSubform[0].Page1[0].OtherActs2[0]TextField
topmostSubform[0].Page2[0].SpecificDeletions1[0]TextField
topmostSubform[0].Page2[0].SpecificDeletions2[0]TextField
topmostSubform[0].Page2[0].RetentionRevocation[1]CheckBox
topmostSubform[0].Page2[0].Title[0]TextField
topmostSubform[0].Page2[0].PrintName[0]TextField
topmostSubform[0].Page2[0].PrintNameTaxpayer[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow1[0].Designation1[0]TextField1
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow1[0].Jurisdiction1[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow1[0].Bar1[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow1[0].Signature1[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow1[0].Date1[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow2[0].Designation2[0]TextField1
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow2[0].Jurisdiction2[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow2[0].Bar2[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow2[0].Signature2[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow2[0].Date2[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow3[0].Designation3[0]TextField1
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow3[0].Jurisdiction3[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow3[0].Bar3[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow3[0].Signature3[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow3[0].Date3[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow4[0].Designation4[0]TextField1
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow4[0].Jurisdiction4[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow4[0].Bar4[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow4[0].Signature4[0]TextField
topmostSubform[0].Page2[0].Table_PartII[0].BodyRow4[0].Date4[0]TextField
Frequently asked
Can I fill the IRS Form 2848 programmatically?
Yes — the blank Rev. January 2021 IRS Form 2848 is a fillable AcroForm with 92 fields. In our tested run, all 91 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the IRS Form 2848 an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Form 941: 116 fillable PDF fields (Rev. March 2026)
Source: https://pdfops.dev/registry/irs-f941
Registry
Form 941 — programmatic fill compatibility
Employer's Quarterly Federal Tax Return · Internal Revenue Service (IRS) · Rev. March 2026. Tested 2026-08-07 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-07verified + deterministic flatten116/116 supported fields landed; flatten=true byte-deterministic (sha256 2516f34ad02f…)
pdf-lib1.17.1verified (116/116)116 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (116/116)116 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (92/92)92 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (116/116)116 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (92/92)92/92 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 3d58635c7a8a…
File facts
Source: https://www.irs.gov/pub/irs-pdf/f941.pdf (issuer page: here)
Blank tested: irs-f941.pdf · 822 KB · sha256 38a3d8cf7a455101d52543c8c48e66202bc25c189ead878627e35c797c88e2ad
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 3 pages · AcroForm + XFA layer (hybrid)
Fields: 116 (92 text, 24 checkbox)
Quirks & limitations
Filed four times a year by nearly every US employer, which makes it one of the most automated forms in existence.
Dollar-and-cents amounts are split into separate whole/cents fields in places; fillers that format currency as a single string need a mapping layer.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 116 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 2516f34ad02f45ebc33a8bdbc0e35133f12a522c564a289d612772d0a3c48f52.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-f941.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_1[0]":"PD","topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_2[0]":"PDFops"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 116 field names first with the inspector or POST /api/inspect.
Field schema
All 116 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_1[0]TextField2
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_2[0]TextField7
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_3[0]TextField
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_4[0]TextField
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_5[0]TextField
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_6[0]TextField
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_7[0]TextField2
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_8[0]TextField10
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_9[0]TextField
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_10[0]TextField
topmostSubform[0].Page1[0].Header[0].EntityArea[0].f1_11[0]TextField
topmostSubform[0].Page1[0].Header[0].ReportForQuarter[0].c1_1[0]CheckBox
topmostSubform[0].Page1[0].Header[0].ReportForQuarter[0].c1_1[1]CheckBox
topmostSubform[0].Page1[0].Header[0].ReportForQuarter[0].c1_1[2]CheckBox
topmostSubform[0].Page1[0].Header[0].ReportForQuarter[0].c1_1[3]CheckBox
topmostSubform[0].Page1[0].Header[0].AggregateReturn[0].c1_2[0]CheckBox
topmostSubform[0].Page1[0].Header[0].AggregateReturn[0].c1_2[1]CheckBox
topmostSubform[0].Page1[0].Header[0].AggregateReturn[0].c1_2[2]CheckBox
topmostSubform[0].Page1[0].f1_12[0]TextField
topmostSubform[0].Page1[0].f1_13[0]TextField
topmostSubform[0].Page1[0].f1_14[0]TextField3
topmostSubform[0].Page1[0].f1_15[0]TextField
topmostSubform[0].Page1[0].f1_16[0]TextField3
topmostSubform[0].Page1[0].c1_3[0]CheckBox
topmostSubform[0].Page1[0].f1_17[0]TextField
topmostSubform[0].Page1[0].f1_18[0]TextField3
topmostSubform[0].Page1[0].f1_19[0]TextField
topmostSubform[0].Page1[0].f1_20[0]TextField3
topmostSubform[0].Page1[0].f1_21[0]TextField
topmostSubform[0].Page1[0].f1_22[0]TextField3
topmostSubform[0].Page1[0].f1_23[0]TextField
topmostSubform[0].Page1[0].f1_24[0]TextField3
topmostSubform[0].Page1[0].f1_25[0]TextField
topmostSubform[0].Page1[0].f1_26[0]TextField3
topmostSubform[0].Page1[0].f1_27[0]TextField
topmostSubform[0].Page1[0].f1_28[0]TextField3
topmostSubform[0].Page1[0].f1_29[0]TextField
topmostSubform[0].Page1[0].f1_30[0]TextField3
topmostSubform[0].Page1[0].f1_31[0]TextField
topmostSubform[0].Page1[0].f1_32[0]TextField3
topmostSubform[0].Page1[0].f1_33[0]TextField
topmostSubform[0].Page1[0].f1_34[0]TextField3
topmostSubform[0].Page1[0].f1_35[0]TextField
topmostSubform[0].Page1[0].f1_36[0]TextField3
topmostSubform[0].Page1[0].f1_37[0]TextField
topmostSubform[0].Page1[0].f1_38[0]TextField3
topmostSubform[0].Page1[0].f1_39[0]TextField
topmostSubform[0].Page1[0].f1_40[0]TextField3
topmostSubform[0].Page1[0].f1_41[0]TextField
topmostSubform[0].Page1[0].f1_42[0]TextField3
topmostSubform[0].Page1[0].f1_43[0]TextField
topmostSubform[0].Page1[0].f1_44[0]TextField3
topmostSubform[0].Page1[0].f1_45[0]TextField
topmostSubform[0].Page1[0].f1_46[0]TextField3
topmostSubform[0].Page1[0].f1_47[0]TextField
topmostSubform[0].Page1[0].f1_48[0]TextField3
topmostSubform[0].Page1[0].f1_49[0]TextField
topmostSubform[0].Page1[0].f1_50[0]TextField3
topmostSubform[0].Page1[0].f1_51[0]TextField
topmostSubform[0].Page1[0].f1_52[0]TextField3
topmostSubform[0].Page1[0].f1_53[0]TextField
topmostSubform[0].Page1[0].f1_54[0]TextField3
topmostSubform[0].Page1[0].f1_55[0]TextField
topmostSubform[0].Page1[0].f1_56[0]TextField3
topmostSubform[0].Page1[0].c1_4[0]CheckBox
topmostSubform[0].Page1[0].c1_4[1]CheckBox
topmostSubform[0].Page1[0].RoutingNo[0].f1_57[0]TextField9
topmostSubform[0].Page1[0].c1_5[0]CheckBox
topmostSubform[0].Page1[0].c1_5[1]CheckBox
topmostSubform[0].Page1[0].AccountNo[0].f1_58[0]TextField17
topmostSubform[0].Page2[0].Name_ReadOrder[0].f1_3[0]TextField
topmostSubform[0].Page2[0].EIN_Number[0].f1_1[0]TextField2
topmostSubform[0].Page2[0].EIN_Number[0].f1_2[0]TextField7
topmostSubform[0].Page2[0].c2_1[0]CheckBox
topmostSubform[0].Page2[0].c2_1[1]CheckBox
topmostSubform[0].Page2[0].f2_1[0]TextField
topmostSubform[0].Page2[0].f2_2[0]TextField3
topmostSubform[0].Page2[0].f2_3[0]TextField
topmostSubform[0].Page2[0].f2_4[0]TextField3
topmostSubform[0].Page2[0].f2_5[0]TextField
topmostSubform[0].Page2[0].f2_6[0]TextField3
topmostSubform[0].Page2[0].f2_7[0]TextField
topmostSubform[0].Page2[0].f2_8[0]TextField3
topmostSubform[0].Page2[0].c2_1[2]CheckBox
topmostSubform[0].Page2[0].c2_2[0]CheckBox
topmostSubform[0].Page2[0].f2_9[0]TextField8
topmostSubform[0].Page2[0].c2_3[0]CheckBox
topmostSubform[0].Page2[0].c2_4[0]CheckBox
topmostSubform[0].Page2[0].f2_10[0]TextField
topmostSubform[0].Page2[0].f2_11[0]TextField
topmostSubform[0].Page2[0].f2_12[0]TextField5
topmostSubform[0].Page2[0].c2_4[1]CheckBox
topmostSubform[0].Page2[0].f2_13[0]TextField
topmostSubform[0].Page2[0].f2_14[0]TextField
topmostSubform[0].Page2[0].f2_15[0]TextField
topmostSubform[0].Page2[0].c2_5[0]CheckBox
topmostSubform[0].Page2[0].f2_16[0]TextField
topmostSubform[0].Page2[0].f2_17[0]TextField11
topmostSubform[0].Page2[0].f2_18[0]TextField
topmostSubform[0].Page2[0].f2_19[0]TextField10
topmostSubform[0].Page2[0].f2_20[0]TextField
topmostSubform[0].Page2[0].f2_21[0]TextField
topmostSubform[0].Page2[0].f2_22[0]TextField
topmostSubform[0].Page2[0].f2_23[0]TextField2
topmostSubform[0].Page2[0].f2_24[0]TextField10
topmostSubform[0].Page3[0].EIN_Number[0].f1_1[0]TextField2
topmostSubform[0].Page3[0].EIN_Number[0].f1_2[0]TextField7
topmostSubform[0].Page3[0].f4_2[0]TextField
topmostSubform[0].Page3[0].f4_3[0]TextField3
topmostSubform[0].Page3[0].Line3_ReadOrder[0].c4_1[0]CheckBox
topmostSubform[0].Page3[0].Line3_ReadOrder[0].c4_1[1]CheckBox
topmostSubform[0].Page3[0].Line3_ReadOrder[0].c4_1[2]CheckBox
topmostSubform[0].Page3[0].Line3_ReadOrder[0].c4_1[3]CheckBox
topmostSubform[0].Page3[0].f1_3[0]TextField
topmostSubform[0].Page3[0].f4_5[0]TextField
topmostSubform[0].Page3[0].f4_6[0]TextField
Frequently asked
Can I fill the Form 941 programmatically?
Yes — the blank Rev. March 2026 Form 941 is a fillable AcroForm with 116 fields. In our tested run, all 116 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the Form 941 an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Form SS-4: 89 fillable PDF fields (Rev. December 2025)
Source: https://pdfops.dev/registry/irs-ss-4
Registry
Form SS-4 — programmatic fill compatibility
Application for Employer Identification Number · Internal Revenue Service (IRS) · Rev. December 2025. Tested 2026-08-07 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-07verified + deterministic flatten89/89 supported fields landed; flatten=true byte-deterministic (sha256 bfb967dd759e…)
pdf-lib1.17.1verified (89/89)89 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (89/89)89 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (45/45)45 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (89/89)89 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (45/45)45/45 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 dae27bd6ac1d…
File facts
Source: https://www.irs.gov/pub/irs-pdf/fss4.pdf (issuer page: here)
Blank tested: irs-ss-4.pdf · 120 KB · sha256 23d295529950b05979596cf58d559db6c433a4ec852407b1820265c117cb3ca2
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 2 pages · AcroForm + XFA layer (hybrid)
Fields: 89 (45 text, 44 checkbox)
Quirks & limitations
The EIN application — company-formation services (Stripe Atlas class) prepare these programmatically for every new entity.
Applied for by fax or mail when the online EIN assistant is unavailable to the applicant, which keeps the PDF path alive.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 89 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 bfb967dd759ee2f68c807d96b9827069467a57aa2daebdf4a4191eb68d2dea7a.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-ss-4.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].PgHeader[0].f1_1[0]":"PDFops","topmostSubform[0].Page1[0].f1_2[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 89 field names first with the inspector or POST /api/inspect.
Field schema
All 89 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].Page1[0].PgHeader[0].f1_1[0]TextField10
topmostSubform[0].Page1[0].f1_2[0]TextField
topmostSubform[0].Page1[0].f1_3[0]TextField
topmostSubform[0].Page1[0].f1_4[0]TextField
topmostSubform[0].Page1[0].Line4ReadOrder[0].f1_5[0]TextField
topmostSubform[0].Page1[0].Line4ReadOrder[0].f1_6[0]TextField
topmostSubform[0].Page1[0].f1_7[0]TextField
topmostSubform[0].Page1[0].f1_8[0]TextField
topmostSubform[0].Page1[0].f1_9[0]TextField
topmostSubform[0].Page1[0].f1_10[0]TextField
topmostSubform[0].Page1[0].f1_11[0]TextField11
topmostSubform[0].Page1[0].c1_1[0]CheckBox
topmostSubform[0].Page1[0].c1_1[1]CheckBox
topmostSubform[0].Page1[0].f1_12[0]TextField
topmostSubform[0].Page1[0].c1_2[0]CheckBox
topmostSubform[0].Page1[0].c1_2[1]CheckBox
topmostSubform[0].Page1[0].c1_3[0]CheckBox
topmostSubform[0].Page1[0].f1_13[0]TextField11
topmostSubform[0].Page1[0].c1_3[1]CheckBox
topmostSubform[0].Page1[0].f1_14[0]TextField11
topmostSubform[0].Page1[0].c1_3[2]CheckBox
topmostSubform[0].Page1[0].c1_3[3]CheckBox
topmostSubform[0].Page1[0].f1_15[0]TextField11
topmostSubform[0].Page1[0].c1_3[4]CheckBox
topmostSubform[0].Page1[0].f1_16[0]TextField
topmostSubform[0].Page1[0].c1_3[5]CheckBox
topmostSubform[0].Page1[0].f1_17[0]TextField11
topmostSubform[0].Page1[0].c1_3[6]CheckBox
topmostSubform[0].Page1[0].c1_3[7]CheckBox
topmostSubform[0].Page1[0].c1_3[8]CheckBox
topmostSubform[0].Page1[0].c1_3[9]CheckBox
topmostSubform[0].Page1[0].c1_3[10]CheckBox
topmostSubform[0].Page1[0].c1_3[11]CheckBox
topmostSubform[0].Page1[0].c1_3[12]CheckBox
topmostSubform[0].Page1[0].f1_18[0]TextField
topmostSubform[0].Page1[0].c1_3[13]CheckBox
topmostSubform[0].Page1[0].c1_3[14]CheckBox
topmostSubform[0].Page1[0].c1_3[15]CheckBox
topmostSubform[0].Page1[0].f1_19[0]TextField
topmostSubform[0].Page1[0].f1_20[0]TextField
topmostSubform[0].Page1[0].f1_21[0]TextField
topmostSubform[0].Page1[0].f1_22[0]TextField
topmostSubform[0].Page1[0].c1_4[0]CheckBox
topmostSubform[0].Page1[0].f1_25[0]TextField
topmostSubform[0].Page1[0].f1_26[0]TextField
topmostSubform[0].Page1[0].c1_4[1]CheckBox
topmostSubform[0].Page1[0].f1_27[0]TextField
topmostSubform[0].Page1[0].c1_4[2]CheckBox
topmostSubform[0].Page1[0].c1_4[3]CheckBox
topmostSubform[0].Page1[0].c1_4[4]CheckBox
topmostSubform[0].Page1[0].f1_28[0]TextField
topmostSubform[0].Page1[0].c1_4[5]CheckBox
topmostSubform[0].Page1[0].c1_4[6]CheckBox
topmostSubform[0].Page1[0].f1_29[0]TextField
topmostSubform[0].Page1[0].c1_4[7]CheckBox
topmostSubform[0].Page1[0].c1_4[8]CheckBox
topmostSubform[0].Page1[0].f1_24[0]TextField
topmostSubform[0].Page1[0].f1_30[0]TextField
topmostSubform[0].Page1[0].f1_31[0]TextField
topmostSubform[0].Page1[0].f1_32[0]TextField
topmostSubform[0].Page1[0].f1_33[0]TextField
topmostSubform[0].Page1[0].f1_34[0]TextField
topmostSubform[0].Page1[0].f1_35[0]TextField
topmostSubform[0].Page1[0].c1_5[0]CheckBox
topmostSubform[0].Page1[0].f1_36[0]TextField
topmostSubform[0].Page1[0].c1_6[0]CheckBox
topmostSubform[0].Page1[0].c1_6[1]CheckBox
topmostSubform[0].Page1[0].c1_6[2]CheckBox
topmostSubform[0].Page1[0].c1_6[3]CheckBox
topmostSubform[0].Page1[0].c1_6[4]CheckBox
topmostSubform[0].Page1[0].c1_6[5]CheckBox
topmostSubform[0].Page1[0].c1_6[6]CheckBox
topmostSubform[0].Page1[0].c1_6[7]CheckBox
topmostSubform[0].Page1[0].c1_6[8]CheckBox
topmostSubform[0].Page1[0].c1_6[9]CheckBox
topmostSubform[0].Page1[0].c1_6[10]CheckBox
topmostSubform[0].Page1[0].c1_6[11]CheckBox
topmostSubform[0].Page1[0].f1_37[0]TextField
topmostSubform[0].Page1[0].f1_38[0]TextField
topmostSubform[0].Page1[0].c1_7[0]CheckBox
topmostSubform[0].Page1[0].c1_7[1]CheckBox
topmostSubform[0].Page1[0].f1_39[0]TextField10
topmostSubform[0].Page1[0].f1_40[0]TextField
topmostSubform[0].Page1[0].f1_41[0]TextField
topmostSubform[0].Page1[0].f1_42[0]TextField
topmostSubform[0].Page1[0].f1_43[0]TextField
topmostSubform[0].Page1[0].f1_44[0]TextField
topmostSubform[0].Page1[0].f1_45[0]TextField
topmostSubform[0].Page1[0].f1_46[0]TextField
Frequently asked
Can I fill the Form SS-4 programmatically?
Yes — the blank Rev. December 2025 Form SS-4 is a fillable AcroForm with 89 fields. In our tested run, all 89 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the Form SS-4 an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Form W-2: 568 fillable PDF fields (2026)
Source: https://pdfops.dev/registry/irs-w-2
Registry
Form W-2 — programmatic fill compatibility
Wage and Tax Statement (2026) · Internal Revenue Service (IRS) · 2026. Tested 2026-09-09 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-09-09verified + deterministic flatten568/568 supported fields landed; flatten=true byte-deterministic (sha256 98c7b92babd5…)
pdf-lib1.17.1verified (568/568)568 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (568/568)568 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (528/528)528 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (568/568)568 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (528/528)528/528 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 d4188d4850c4…
File facts
Source: https://www.irs.gov/pub/irs-pdf/fw2.pdf (issuer page: here)
Blank tested: irs-w-2.pdf · 2100 KB · sha256 61eca7c81f16d3965819fe1f31be4fe68c1b2887a81f51172f1d2ed2b2b9f087
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 11 pages · AcroForm + XFA layer (hybrid)
Fields: 568 (528 text, 40 checkbox)
Quirks & limitations
The multi-copy annual wage statement: one PDF carrying Copy A (the red-ink scannable copy that must NOT be filed from a laser printout) plus copies B/C/D and instructions.
Payroll pipelines generate these in bulk every January; the machine block below records what the fillable field tree actually supports.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 568 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 98c7b92babd52e3c1302fd2b4763fece54467606724bee338148c0476b1cad1e.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-w-2.pdf" \
-F 'fields={"topmostSubform[0].CopyA[0].CopyA_Top[0].BoxA_ReadOrder[0].f1_01[0]":"PDFops","topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].f1_02[0]":"PDFops"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 568 field names first with the inspector or POST /api/inspect.
Field schema
All 568 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].CopyA[0].CopyA_Top[0].Void_ReadOrder[0].c1_1[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Top[0].BoxA_ReadOrder[0].f1_01[0]TextField11
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].f1_02[0]TextField10
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].f1_03[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].f1_04[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].FirstName_ReadOrder[0].f1_05[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].LastName_ReadOrder[0].f1_06[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].f1_07[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Left[0].f1_08[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Box1_ReadOrder[0].f1_09[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_10[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Box3_ReadOrder[0].f1_11[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_12[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Box5_ReadOrder[0].f1_13[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_14[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Box7_ReadOrder[0].f1_15[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_16[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_17[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Box10_ReadOrder[0].f1_18[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_19[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_20[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_21[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_22[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_23[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_24[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_25[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_26[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Line12_ReadOrder[0].f1_27[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Statutory_ReadOrder[0].c1_2[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].Retirement_ReadOrder[0].c1_3[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].c1_4[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_28[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_29[0]TextField3
topmostSubform[0].CopyA[0].CopyA_Top[0].Col_Right[0].f1_30[0]TextField3
topmostSubform[0].CopyA[0].CopyA_Top[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f1_31[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Boxes15_ReadOrder[0].f1_32[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Boxes15_ReadOrder[0].f1_33[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Boxes15_ReadOrder[0].f1_34[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box16_ReadOrder[0].f1_35[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box16_ReadOrder[0].f1_36[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box17_ReadOrder[0].f1_37[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box17_ReadOrder[0].f1_38[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box18_ReadOrder[0].f1_39[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box18_ReadOrder[0].f1_40[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box19_ReadOrder[0].f1_41[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].Box19_ReadOrder[0].f1_42[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].f1_43[0]TextField
topmostSubform[0].CopyA[0].CopyA_Top[0].f1_44[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Void_ReadOrder[0].c1_5[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Bottom[0].BoxA_ReadOrder[0].f1_45[0]TextField11
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Left[0].f1_46[0]TextField10
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Left[0].f1_47[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Left[0].f1_48[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Left[0].FirstName_ReadOrder[0].f1_49[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Left[0].LastName_ReadOrder[0].f1_50[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Left[0].f1_51[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Left[0].f1_52[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Box1_ReadOrder[0].f1_53[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_54[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Box3_ReadOrder[0].f1_55[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_56[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Box5_ReadOrder[0].f1_57[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_58[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Box7_ReadOrder[0].f1_59[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_60[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_61[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Box10_ReadOrder[0].f1_62[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_63[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_64[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_65[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_66[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_67[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_68[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_69[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_70[0]TextField2
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Line12_ReadOrder[0].f1_71[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Statutory_ReadOrder[0].c1_6[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].Retirement_ReadOrder[0].c1_7[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].c1_8[0]CheckBox
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_72[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_73[0]TextField3
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Col_Right[0].f1_74[0]TextField3
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f1_75[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Boxes15_ReadOrder[0].f1_76[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Boxes15_ReadOrder[0].f1_77[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Boxes15_ReadOrder[0].f1_78[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box16_ReadOrder[0].f1_79[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box16_ReadOrder[0].f1_80[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box17_ReadOrder[0].f1_81[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box17_ReadOrder[0].f1_82[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box18_ReadOrder[0].f1_83[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box18_ReadOrder[0].f1_84[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box19_ReadOrder[0].f1_85[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].Box19_ReadOrder[0].f1_86[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].f1_87[0]TextField
topmostSubform[0].CopyA[0].CopyA_Bottom[0].f1_88[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].BoxA_ReadOrder[0].f2_01[0]TextField11
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Left[0].f2_02[0]TextField10
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Left[0].f2_03[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Left[0].f2_04[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Left[0].FirstName_ReadOrder[0].f2_05[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Left[0].LastName_ReadOrder[0].f2_06[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Left[0].f2_07[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Left[0].f2_08[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box1_ReadOrder[0].f2_09[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_10[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box3_ReadOrder[0].f2_11[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_12[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box5_ReadOrder[0].f2_13[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_14[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box7_ReadOrder[0].f2_15[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_16[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_17[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box10_ReadOrder[0].f2_18[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_19[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_20[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_21[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_22[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_23[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_24[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_25[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_26[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_27[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Statutory_ReadOrder[0].c2_2[0]CheckBox
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].Retirement_ReadOrder[0].c2_3[0]CheckBox
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].c2_4[0]CheckBox
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_28[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_29[0]TextField3
topmostSubform[0].Copy1[0].Copy1_Top[0].Col_Right[0].f2_30[0]TextField3
topmostSubform[0].Copy1[0].Copy1_Top[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_31[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Boxes15_ReadOrder[0].f2_32[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Boxes15_ReadOrder[0].f2_33[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Boxes15_ReadOrder[0].f2_34[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box16_ReadOrder[0].f2_35[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box16_ReadOrder[0].f2_36[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box17_ReadOrder[0].f2_37[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box17_ReadOrder[0].f2_38[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box18_ReadOrder[0].f2_39[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box18_ReadOrder[0].f2_40[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box19_ReadOrder[0].f2_41[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].Box19_ReadOrder[0].f2_42[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].f2_43[0]TextField
topmostSubform[0].Copy1[0].Copy1_Top[0].f2_44[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].BoxA_ReadOrder[0].f2_45[0]TextField11
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Left[0].f2_46[0]TextField10
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Left[0].f2_47[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Left[0].f2_48[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Left[0].FirstName_ReadOrder[0].f2_49[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Left[0].LastName_ReadOrder[0].f2_50[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Left[0].f2_51[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Left[0].f2_52[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box1_ReadOrder[0].f2_53[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_54[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box3_ReadOrder[0].f2_55[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_56[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box5_ReadOrder[0].f2_57[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_58[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box7_ReadOrder[0].f2_59[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_60[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_61[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box10_ReadOrder[0].f2_62[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_63[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_64[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_65[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_66[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_67[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_68[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_69[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_70[0]TextField2
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_71[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Statutory_ReadOrder[0].c2_6[0]CheckBox
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].Retirement_ReadOrder[0].c2_7[0]CheckBox
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].c2_8[0]CheckBox
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_72[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_73[0]TextField3
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Col_Right[0].f2_74[0]TextField3
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_75[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Boxes15_ReadOrder[0].f2_76[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Boxes15_ReadOrder[0].f2_77[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Boxes15_ReadOrder[0].f2_78[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box16_ReadOrder[0].f2_79[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box16_ReadOrder[0].f2_80[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box17_ReadOrder[0].f2_81[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box17_ReadOrder[0].f2_82[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box18_ReadOrder[0].f2_83[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box18_ReadOrder[0].f2_84[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box19_ReadOrder[0].f2_85[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].Box19_ReadOrder[0].f2_86[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].f2_87[0]TextField
topmostSubform[0].Copy1[0].Copy1_Bottom[0].f2_88[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].BoxA_ReadOrder[0].f2_01[0]TextField11
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Left[0].f2_02[0]TextField10
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Left[0].f2_03[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Left[0].f2_04[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Left[0].FirstName_ReadOrder[0].f2_05[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Left[0].LastName_ReadOrder[0].f2_06[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Left[0].f2_07[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Left[0].f2_08[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box1_ReadOrder[0].f2_09[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_10[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box3_ReadOrder[0].f2_11[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_12[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box5_ReadOrder[0].f2_13[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_14[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box7_ReadOrder[0].f2_15[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_16[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_17[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box10_ReadOrder[0].f2_18[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_19[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_20[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_21[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_22[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_23[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_24[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_25[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_26[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_27[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Statutory_ReadOrder[0].c2_2[0]CheckBox
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].Retirement_ReadOrder[0].c2_3[0]CheckBox
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].c2_4[0]CheckBox
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_28[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_29[0]TextField3
topmostSubform[0].CopyB[0].CopyB_Top[0].Col_Right[0].f2_30[0]TextField3
topmostSubform[0].CopyB[0].CopyB_Top[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_31[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Boxes15_ReadOrder[0].f2_32[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Boxes15_ReadOrder[0].f2_33[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Boxes15_ReadOrder[0].f2_34[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box16_ReadOrder[0].f2_35[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box16_ReadOrder[0].f2_36[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box17_ReadOrder[0].f2_37[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box17_ReadOrder[0].f2_38[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box18_ReadOrder[0].f2_39[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box18_ReadOrder[0].f2_40[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box19_ReadOrder[0].f2_41[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].Box19_ReadOrder[0].f2_42[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].f2_43[0]TextField
topmostSubform[0].CopyB[0].CopyB_Top[0].f2_44[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].BoxA_ReadOrder[0].f2_45[0]TextField11
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Left[0].f2_46[0]TextField10
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Left[0].f2_47[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Left[0].f2_48[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Left[0].FirstName_ReadOrder[0].f2_49[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Left[0].LastName_ReadOrder[0].f2_50[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Left[0].f2_51[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Left[0].f2_52[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box1_ReadOrder[0].f2_53[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_54[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box3_ReadOrder[0].f2_55[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_56[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box5_ReadOrder[0].f2_57[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_58[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box7_ReadOrder[0].f2_59[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_60[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_61[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box10_ReadOrder[0].f2_62[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_63[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_64[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_65[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_66[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_67[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_68[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_69[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_70[0]TextField2
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_71[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Statutory_ReadOrder[0].c2_6[0]CheckBox
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].Retirement_ReadOrder[0].c2_7[0]CheckBox
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].c2_8[0]CheckBox
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_72[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_73[0]TextField3
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Col_Right[0].f2_74[0]TextField3
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_75[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Boxes15_ReadOrder[0].f2_76[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Boxes15_ReadOrder[0].f2_77[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Boxes15_ReadOrder[0].f2_78[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box16_ReadOrder[0].f2_79[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box16_ReadOrder[0].f2_80[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box17_ReadOrder[0].f2_81[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box17_ReadOrder[0].f2_82[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box18_ReadOrder[0].f2_83[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box18_ReadOrder[0].f2_84[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box19_ReadOrder[0].f2_85[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].Box19_ReadOrder[0].f2_86[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].f2_87[0]TextField
topmostSubform[0].CopyB[0].CopyB_Bottom[0].f2_88[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].BoxA_ReadOrder[0].f2_01[0]TextField11
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Left[0].f2_02[0]TextField10
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Left[0].f2_03[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Left[0].f2_04[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Left[0].FirstName_ReadOrder[0].f2_05[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Left[0].LastName_ReadOrder[0].f2_06[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Left[0].f2_07[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Left[0].f2_08[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box1_ReadOrder[0].f2_09[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_10[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box3_ReadOrder[0].f2_11[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_12[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box5_ReadOrder[0].f2_13[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_14[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box7_ReadOrder[0].f2_15[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_16[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_17[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box10_ReadOrder[0].f2_18[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_19[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_20[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_21[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_22[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_23[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_24[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_25[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_26[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_27[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Statutory_ReadOrder[0].c2_2[0]CheckBox
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].Retirement_ReadOrder[0].c2_3[0]CheckBox
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].c2_4[0]CheckBox
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_28[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_29[0]TextField3
topmostSubform[0].CopyC[0].CopyC_Top[0].Col_Right[0].f2_30[0]TextField3
topmostSubform[0].CopyC[0].CopyC_Top[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_31[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Boxes15_ReadOrder[0].f2_32[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Boxes15_ReadOrder[0].f2_33[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Boxes15_ReadOrder[0].f2_34[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box16_ReadOrder[0].f2_35[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box16_ReadOrder[0].f2_36[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box17_ReadOrder[0].f2_37[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box17_ReadOrder[0].f2_38[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box18_ReadOrder[0].f2_39[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box18_ReadOrder[0].f2_40[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box19_ReadOrder[0].f2_41[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].Box19_ReadOrder[0].f2_42[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].f2_43[0]TextField
topmostSubform[0].CopyC[0].CopyC_Top[0].f2_44[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].BoxA_ReadOrder[0].f2_45[0]TextField11
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Left[0].f2_46[0]TextField10
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Left[0].f2_47[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Left[0].f2_48[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Left[0].FirstName_ReadOrder[0].f2_49[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Left[0].LastName_ReadOrder[0].f2_50[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Left[0].f2_51[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Left[0].f2_52[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box1_ReadOrder[0].f2_53[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_54[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box3_ReadOrder[0].f2_55[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_56[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box5_ReadOrder[0].f2_57[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_58[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box7_ReadOrder[0].f2_59[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_60[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_61[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box10_ReadOrder[0].f2_62[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_63[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_64[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_65[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_66[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_67[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_68[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_69[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_70[0]TextField2
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_71[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Statutory_ReadOrder[0].c2_6[0]CheckBox
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].Retirement_ReadOrder[0].c2_7[0]CheckBox
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].c2_8[0]CheckBox
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_72[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_73[0]TextField3
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Col_Right[0].f2_74[0]TextField3
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_75[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Boxes15_ReadOrder[0].f2_76[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Boxes15_ReadOrder[0].f2_77[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Boxes15_ReadOrder[0].f2_78[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box16_ReadOrder[0].f2_79[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box16_ReadOrder[0].f2_80[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box17_ReadOrder[0].f2_81[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box17_ReadOrder[0].f2_82[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box18_ReadOrder[0].f2_83[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box18_ReadOrder[0].f2_84[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box19_ReadOrder[0].f2_85[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].Box19_ReadOrder[0].f2_86[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].f2_87[0]TextField
topmostSubform[0].CopyC[0].CopyC_Bottom[0].f2_88[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].BoxA_ReadOrder[0].f2_01[0]TextField11
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Left[0].f2_02[0]TextField10
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Left[0].f2_03[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Left[0].f2_04[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Left[0].FirstName_ReadOrder[0].f2_05[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Left[0].LastName_ReadOrder[0].f2_06[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Left[0].f2_07[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Left[0].f2_08[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box1_ReadOrder[0].f2_09[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_10[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box3_ReadOrder[0].f2_11[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_12[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box5_ReadOrder[0].f2_13[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_14[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box7_ReadOrder[0].f2_15[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_16[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_17[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box10_ReadOrder[0].f2_18[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_19[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_20[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_21[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_22[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_23[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_24[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_25[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_26[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_27[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Statutory_ReadOrder[0].c2_2[0]CheckBox
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].Retirement_ReadOrder[0].c2_3[0]CheckBox
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].c2_4[0]CheckBox
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_28[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_29[0]TextField3
topmostSubform[0].Copy2[0].Copy2_Top[0].Col_Right[0].f2_30[0]TextField3
topmostSubform[0].Copy2[0].Copy2_Top[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_31[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Boxes15_ReadOrder[0].f2_32[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Boxes15_ReadOrder[0].f2_33[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Boxes15_ReadOrder[0].f2_34[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box16_ReadOrder[0].f2_35[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box16_ReadOrder[0].f2_36[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box17_ReadOrder[0].f2_37[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box17_ReadOrder[0].f2_38[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box18_ReadOrder[0].f2_39[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box18_ReadOrder[0].f2_40[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box19_ReadOrder[0].f2_41[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].Box19_ReadOrder[0].f2_42[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].f2_43[0]TextField
topmostSubform[0].Copy2[0].Copy2_Top[0].f2_44[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].BoxA_ReadOrder[0].f2_45[0]TextField11
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Left[0].f2_46[0]TextField10
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Left[0].f2_47[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Left[0].f2_48[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Left[0].FirstName_ReadOrder[0].f2_49[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Left[0].LastName_ReadOrder[0].f2_50[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Left[0].f2_51[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Left[0].f2_52[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box1_ReadOrder[0].f2_53[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_54[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box3_ReadOrder[0].f2_55[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_56[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box5_ReadOrder[0].f2_57[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_58[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box7_ReadOrder[0].f2_59[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_60[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_61[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box10_ReadOrder[0].f2_62[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_63[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_64[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_65[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_66[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_67[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_68[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_69[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_70[0]TextField2
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_71[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Statutory_ReadOrder[0].c2_6[0]CheckBox
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].Retirement_ReadOrder[0].c2_7[0]CheckBox
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].c2_8[0]CheckBox
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_72[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_73[0]TextField3
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Col_Right[0].f2_74[0]TextField3
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_75[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Boxes15_ReadOrder[0].f2_76[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Boxes15_ReadOrder[0].f2_77[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Boxes15_ReadOrder[0].f2_78[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box16_ReadOrder[0].f2_79[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box16_ReadOrder[0].f2_80[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box17_ReadOrder[0].f2_81[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box17_ReadOrder[0].f2_82[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box18_ReadOrder[0].f2_83[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box18_ReadOrder[0].f2_84[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box19_ReadOrder[0].f2_85[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].Box19_ReadOrder[0].f2_86[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].f2_87[0]TextField
topmostSubform[0].Copy2[0].Copy2_Bottom[0].f2_88[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Void_ReadOrder[0].c2_1[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Top[0].BoxA_ReadOrder[0].f2_01[0]TextField11
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Left[0].f2_02[0]TextField10
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Left[0].f2_03[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Left[0].f2_04[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Left[0].FirstName_ReadOrder[0].f2_05[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Left[0].LastName_ReadOrder[0].f2_06[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Left[0].f2_07[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Left[0].f2_08[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box1_ReadOrder[0].f2_09[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_10[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box3_ReadOrder[0].f2_11[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_12[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box5_ReadOrder[0].f2_13[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_14[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box7_ReadOrder[0].f2_15[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_16[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_17[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box10_ReadOrder[0].f2_18[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_19[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_20[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_21[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_22[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_23[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_24[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_25[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_26[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Box12_ReadOrder[0].f2_27[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Statutory_ReadOrder[0].c2_2[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].Retirement_ReadOrder[0].c2_3[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].c2_4[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_28[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_29[0]TextField3
topmostSubform[0].CopyD[0].CopyD_Top[0].Col_Right[0].f2_30[0]TextField3
topmostSubform[0].CopyD[0].CopyD_Top[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_31[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Boxes15_ReadOrder[0].f2_32[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Boxes15_ReadOrder[0].f2_33[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Boxes15_ReadOrder[0].f2_34[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box16_ReadOrder[0].f2_35[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box16_ReadOrder[0].f2_36[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box17_ReadOrder[0].f2_37[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box17_ReadOrder[0].f2_38[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box18_ReadOrder[0].f2_39[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box18_ReadOrder[0].f2_40[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box19_ReadOrder[0].f2_41[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].Box19_ReadOrder[0].f2_42[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].f2_43[0]TextField
topmostSubform[0].CopyD[0].CopyD_Top[0].f2_44[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Void_ReadOrder[0].c2_5[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Bottom[0].BoxA_ReadOrder[0].f2_45[0]TextField11
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Left[0].f2_46[0]TextField10
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Left[0].f2_47[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Left[0].f2_48[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Left[0].FirstName_ReadOrder[0].f2_49[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Left[0].LastName_ReadOrder[0].f2_50[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Left[0].f2_51[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Left[0].f2_52[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box1_ReadOrder[0].f2_53[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_54[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box3_ReadOrder[0].f2_55[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_56[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box5_ReadOrder[0].f2_57[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_58[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box7_ReadOrder[0].f2_59[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_60[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_61[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box10_ReadOrder[0].f2_62[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_63[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_64[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_65[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_66[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_67[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_68[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_69[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_70[0]TextField2
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Box12_ReadOrder[0].f2_71[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Statutory_ReadOrder[0].c2_6[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].Retirement_ReadOrder[0].c2_7[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].c2_8[0]CheckBox
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_72[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_73[0]TextField3
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Col_Right[0].f2_74[0]TextField3
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Boxes15_ReadOrder[0].Box15_ReadOrder[0].f2_75[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Boxes15_ReadOrder[0].f2_76[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Boxes15_ReadOrder[0].f2_77[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Boxes15_ReadOrder[0].f2_78[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box16_ReadOrder[0].f2_79[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box16_ReadOrder[0].f2_80[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box17_ReadOrder[0].f2_81[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box17_ReadOrder[0].f2_82[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box18_ReadOrder[0].f2_83[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box18_ReadOrder[0].f2_84[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box19_ReadOrder[0].f2_85[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].Box19_ReadOrder[0].f2_86[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].f2_87[0]TextField
topmostSubform[0].CopyD[0].CopyD_Bottom[0].f2_88[0]TextField
Frequently asked
Can I fill the Form W-2 programmatically?
Yes — the blank 2026 Form W-2 is a fillable AcroForm with 568 fields. In our tested run, all 568 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the Form W-2 an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# IRS Form W-4: 48 fillable PDF fields (2026 edition)
Source: https://pdfops.dev/registry/irs-w-4
Registry
IRS Form W-4 — programmatic fill compatibility
Employee's Withholding Certificate · Internal Revenue Service (IRS) · 2026 edition. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten48/48 supported fields landed; flatten=true byte-deterministic (sha256 e7201382e5b8…)
pdf-lib1.17.1verified (48/48)48 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (48/48)48 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (43/43)43 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (48/48)48 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (43/43)43/43 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 b1199beefa49…
File facts
Source: https://www.irs.gov/pub/irs-pdf/fw4.pdf (issuer page: here)
Blank tested: irs-w-4.pdf · 204 KB · sha256 92444d8856ce55d9e25dca8b6d1420634fc68b11e1ab1f760916ea29ddd312b2
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 5 pages · AcroForm + XFA layer (hybrid)
Fields: 48 (43 text, 5 checkbox)
Quirks & limitations
Re-issued every tax year at the same URL — the upstream file at irs.gov/pub/irs-pdf/fw4.pdf changes content annually without the URL changing. Pin the revision you tested against by hash, not by URL.
Hybrid AcroForm/XFA, same behavior as the W-9: libraries fill the AcroForm layer and drop the XFA layer on save.
Only pages 1-4 of the 5-page PDF are the certificate + worksheets; field names are spread across all pages with the IRS's positional naming scheme (topmostSubform[0].Page1[0].f1_01[0] …) — map them via inspection, never by guessing.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 48 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 e7201382e5b88980fc6db7edc690357b72ac2350775684e5fe68c69cc70985ab.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-w-4.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].Step1a[0].f1_01[0]":"Jane Doe","topmostSubform[0].Page1[0].Step1a[0].f1_02[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 48 field names first with the inspector or POST /api/inspect.
Field schema
All 48 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].Page1[0].Step1a[0].f1_01[0]TextField
topmostSubform[0].Page1[0].Step1a[0].f1_02[0]TextField
topmostSubform[0].Page1[0].Step1a[0].f1_03[0]TextField
topmostSubform[0].Page1[0].Step1a[0].f1_04[0]TextField
topmostSubform[0].Page1[0].f1_05[0]TextField11
topmostSubform[0].Page1[0].c1_1[0]CheckBox
topmostSubform[0].Page1[0].c1_1[1]CheckBox
topmostSubform[0].Page1[0].c1_1[2]CheckBox
topmostSubform[0].Page1[0].c1_2[0]CheckBox
topmostSubform[0].Page1[0].Step3_ReadOrder[0].f1_06[0]TextField
topmostSubform[0].Page1[0].Step3_ReadOrder[0].f1_07[0]TextField
topmostSubform[0].Page1[0].f1_08[0]TextField
topmostSubform[0].Page1[0].f1_09[0]TextField
topmostSubform[0].Page1[0].f1_10[0]TextField
topmostSubform[0].Page1[0].f1_11[0]TextField
topmostSubform[0].Page1[0].c1_3[0]CheckBox
topmostSubform[0].Page1[0].f1_12[0]TextField
topmostSubform[0].Page1[0].f1_13[0]TextField
topmostSubform[0].Page1[0].f1_14[0]TextField10
topmostSubform[0].Page3[0].f3_01[0]TextField
topmostSubform[0].Page3[0].f3_02[0]TextField
topmostSubform[0].Page3[0].f3_03[0]TextField
topmostSubform[0].Page3[0].f3_04[0]TextField
topmostSubform[0].Page3[0].f3_05[0]TextField
topmostSubform[0].Page3[0].f3_06[0]TextField
topmostSubform[0].Page4[0].f4_01[0]TextField
topmostSubform[0].Page4[0].f4_02[0]TextField
topmostSubform[0].Page4[0].f4_03[0]TextField
topmostSubform[0].Page4[0].f4_04[0]TextField
topmostSubform[0].Page4[0].f4_05[0]TextField
topmostSubform[0].Page4[0].f4_06[0]TextField
topmostSubform[0].Page4[0].f4_07[0]TextField
topmostSubform[0].Page4[0].f4_08[0]TextField
topmostSubform[0].Page4[0].f4_09[0]TextField
topmostSubform[0].Page4[0].f4_10[0]TextField
topmostSubform[0].Page4[0].f4_11[0]TextField
topmostSubform[0].Page4[0].f4_12[0]TextField
topmostSubform[0].Page4[0].f4_13[0]TextField
topmostSubform[0].Page4[0].f4_14[0]TextField
topmostSubform[0].Page4[0].f4_15[0]TextField
topmostSubform[0].Page4[0].f4_16[0]TextField
topmostSubform[0].Page4[0].f4_17[0]TextField
topmostSubform[0].Page4[0].f4_18[0]TextField
topmostSubform[0].Page4[0].f4_19[0]TextField
topmostSubform[0].Page4[0].f4_20[0]TextField
topmostSubform[0].Page4[0].f4_21[0]TextField
topmostSubform[0].Page4[0].f4_22[0]TextField
topmostSubform[0].Page4[0].f4_23[0]TextField
Frequently asked
Can I fill the IRS Form W-4 programmatically?
Yes — the blank 2026 edition IRS Form W-4 is a fillable AcroForm with 48 fields. In our tested run, all 48 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the IRS Form W-4 an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Form W-8BEN: 22 fillable PDF fields (Rev. October 2021)
Source: https://pdfops.dev/registry/irs-w-8ben
Registry
Form W-8BEN — programmatic fill compatibility
Certificate of Foreign Status of Beneficial Owner for United States Tax Withholding and Reporting (Individuals) · Internal Revenue Service (IRS) · Rev. October 2021. Tested 2026-08-07 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-07verified + deterministic flatten22/22 supported fields landed; flatten=true byte-deterministic (sha256 7c06d83ae8a9…)
pdf-lib1.17.1verified (22/22)22 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (22/22)22 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (20/20)20 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (22/22)22 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (20/20)20/20 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 2822d1ab3920…
File facts
Source: https://www.irs.gov/pub/irs-pdf/fw8ben.pdf (issuer page: here)
Blank tested: irs-w-8ben.pdf · 66 KB · sha256 b821dc1172c91b348a65675529cc792782f11fc1ae8579df92d627113203f918
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 1 pages · AcroForm + XFA layer (hybrid)
Fields: 23 (20 text, 2 checkbox, 1 signature)
Quirks & limitations
The onboarding form every US platform collects from non-US contractors and creators; fintech and marketplace KYC flows fill it programmatically at volume.
Single page, small field count — a good smoke-test form for a fill pipeline.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 22 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 7c06d83ae8a9c664a286eea96d343311eb6831fa404b76ba70003bd94f493d76.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-w-8ben.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].f_1[0]":"Jane Doe","topmostSubform[0].Page1[0].f_2[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 23 field names first with the inspector or POST /api/inspect.
Field schema
All 23 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].Page1[0].f_1[0]TextField
topmostSubform[0].Page1[0].f_2[0]TextField
topmostSubform[0].Page1[0].f_3[0]TextField
topmostSubform[0].Page1[0].f_4[0]TextField
topmostSubform[0].Page1[0].f_5[0]TextField
topmostSubform[0].Page1[0].f_6[0]TextField
topmostSubform[0].Page1[0].f_7[0]TextField
topmostSubform[0].Page1[0].f_8[0]TextField
topmostSubform[0].Page1[0].f_9[0]TextField11
topmostSubform[0].Page1[0].f_10[0]TextField
topmostSubform[0].Page1[0].c1_01[0]CheckBox
topmostSubform[0].Page1[0].f_11[0]TextField
topmostSubform[0].Page1[0].f_12[0]TextField10
topmostSubform[0].Page1[0].f_13[0]TextField
topmostSubform[0].Page1[0].f_14[0]TextField
topmostSubform[0].Page1[0].f_15[0]TextField
topmostSubform[0].Page1[0].f_16[0]TextField
topmostSubform[0].Page1[0].f_17[0]TextField
topmostSubform[0].Page1[0].f_18[0]TextField
topmostSubform[0].Page1[0].c1_02[0]CheckBox
topmostSubform[0].Page1[0].f_20[0]Signature
topmostSubform[0].Page1[0].Date[0]TextField10
topmostSubform[0].Page1[0].f_21[0]TextField
Frequently asked
Can I fill the Form W-8BEN programmatically?
Yes — the blank Rev. October 2021 Form W-8BEN is a fillable AcroForm with 23 fields. In our tested run, all 22 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the Form W-8BEN an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
Can the Form W-8BEN's signature fields be filled via API?
No — the form has 1 true digital-signature field(s), which require a certificate-based signing workflow. Value-filling APIs (pdfops included) list them at inspection but skip them rather than faking a value. All other field types on the form filled and verified normally.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# IRS Form W-9: 23 fillable PDF fields (Rev. March 2024)
Source: https://pdfops.dev/registry/irs-w-9
Registry
IRS Form W-9 — programmatic fill compatibility
Request for Taxpayer Identification Number and Certification · Internal Revenue Service (IRS) · Rev. March 2024. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten23/23 supported fields landed; flatten=true byte-deterministic (sha256 839629ab6af4…)
pdf-lib1.17.1verified (23/23)23 fields filled in-process; XFA layer dropped on save
@cantoo/pdf-lib (fork)2.6.5verified (23/23)23 fields filled in-process; XFA layer dropped on save
pypdf6.15.0text fields verified (15/15)15 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (23/23)23 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (15/15)15/15 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 5bd3e897396f…
File facts
Source: https://www.irs.gov/pub/irs-pdf/fw9.pdf (issuer page: here)
Blank tested: irs-w-9.pdf · 138 KB · sha256 2d420cbb4123dcf1fb82595b2359cfbb5d81f00b9df9d359fcc7af361d093f53
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 6 pages · AcroForm + XFA layer (hybrid)
Fields: 23 (15 text, 8 checkbox)
Quirks & limitations
The most-requested form in US contractor onboarding: payers collect it from every freelancer and vendor, so it is the highest-volume automation target in this registry.
Hybrid AcroForm/XFA: the PDF carries both a standard AcroForm field tree and an XFA (XML Forms Architecture) layer. pdf-lib-family libraries fill the AcroForm layer and drop the XFA layer on save — the output is a plain AcroForm PDF. Viewers that render the XFA layer (older Adobe products) will show the pre-fill template; every mainstream viewer renders the filled AcroForm.
The federal tax classification is 7 individual checkboxes plus a free-text 'other' line, not a radio group — nothing stops you from checking several. Enforce single-choice in your own layer.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 23 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 839629ab6af446b43adc6894d0e767f82e2dfc69936e96dc439ea80a4e3608b9.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@irs-w-9.pdf" \
-F 'fields={"topmostSubform[0].Page1[0].f1_01[0]":"Jane Doe","topmostSubform[0].Page1[0].f1_02[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 23 field names first with the inspector or POST /api/inspect.
Field schema
All 23 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
topmostSubform[0].Page1[0].f1_01[0]TextField
topmostSubform[0].Page1[0].f1_02[0]TextField
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[0]CheckBox
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[1]CheckBox
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[2]CheckBox
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[3]CheckBox
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[4]CheckBox
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[5]CheckBox
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].f1_03[0]TextField1
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_1[6]CheckBox
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].f1_04[0]TextField
topmostSubform[0].Page1[0].Boxes3a-b_ReadOrder[0].c1_2[0]CheckBox
topmostSubform[0].Page1[0].f1_05[0]TextField
topmostSubform[0].Page1[0].f1_06[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_07[0]TextField
topmostSubform[0].Page1[0].Address_ReadOrder[0].f1_08[0]TextField
topmostSubform[0].Page1[0].f1_09[0]TextField
topmostSubform[0].Page1[0].f1_10[0]TextField
topmostSubform[0].Page1[0].f1_11[0]TextField3
topmostSubform[0].Page1[0].f1_12[0]TextField2
topmostSubform[0].Page1[0].f1_13[0]TextField4
topmostSubform[0].Page1[0].f1_14[0]TextField2
topmostSubform[0].Page1[0].f1_15[0]TextField7
Frequently asked
Can I fill the IRS Form W-9 programmatically?
Yes — the blank Rev. March 2024 IRS Form W-9 is a fillable AcroForm with 23 fields. In our tested run, all 23 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are positional (e.g. topmostSubform[0].Page1[0].f1_01[0]) — enumerate them via inspection rather than guessing.
Is the IRS Form W-9 an XFA form?
It is a hybrid: the PDF carries both a standard AcroForm field tree and an XFA layer. Programmatic fillers in the pdf-lib family fill the AcroForm layer and drop the XFA layer on save, so the output is a plain AcroForm PDF — which every mainstream viewer renders. Only XFA-first viewers (older Adobe products) behave differently.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Form IT-2104: 25 fillable PDF fields (2026)
Source: https://pdfops.dev/registry/ny-it-2104
Registry
Form IT-2104 — programmatic fill compatibility
Employee's Withholding Allowance Certificate · New York State Department of Taxation and Finance · 2026. Tested 2026-08-07 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-07verified + deterministic flatten25/25 supported fields landed; flatten=true byte-deterministic (sha256 bd00f11519cf…)
pdf-lib1.17.1verified (25/25)25 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (25/25)25 fields filled in-process
pypdf6.15.0text fields verified (19/19)19 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (23/23)23 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (19/19)19/19 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 9e9861480ea0…
File facts
Source: https://www.tax.ny.gov/pdf/current_forms/it/it2104_fill_in.pdf (issuer page: here)
Blank tested: ny-it-2104.pdf · 471 KB · sha256 04eb718666ba50f87183daf1581489354a23ac55b7f66997a8b10913a70dbea7
License: New York State government form, published for public employee-onboarding use. The hash-verified blank is redistributed here unmodified.
Structure: 1 pages · AcroForm
Fields: 25 (19 text, 6 checkbox)
Quirks & limitations
The NY state analog of the W-4 — every onboarding platform that fills a federal W-4 for a New York hire fills this next.
A first sample of the NY state form class in this corpus.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 25 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 bd00f11519cf26262ac4edfc3d0444b5dbb76a48177e3a944f4373811bd06e45.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@ny-it-2104.pdf" \
-F 'fields={"First name and middle initial":"PDFops","Last name":"PDFops"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 25 field names first with the inspector or POST /api/inspect.
Field schema
All 25 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
First name and middle initialTextField40
Last nameTextField30
Permanent mailing addressTextField55
Apartment numberTextField10
City, village or post officeTextField40
StateTextField2
ZIP codeTextField10
Your SSNTextField9
StatusCheckBox
ResidentCheckBox
Resident of YonkersCheckBox
line 1TextField2
line 2TextField2
line 3TextField8
line 4TextField8
line 5TextField8
DateTextField10
employee is a new hireCheckBox
employee claims more than 14 exemptionCheckBox
Employer's name and addressTextField75
Employer's name and address-2TextField75
EINTextField9
insurance benefitsCheckBox
empl qualify dateTextField10
service dateTextField10
Frequently asked
Can I fill the Form IT-2104 programmatically?
Yes — the blank 2026 Form IT-2104 is a fillable AcroForm with 25 fields. In our tested run, all 25 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# OPM Optional Form 306: 38 fillable PDF fields (Revised October 2019)
Source: https://pdfops.dev/registry/opm-of-306
Registry
OPM Optional Form 306 — programmatic fill compatibility
Declaration for Federal Employment · US Office of Personnel Management (OPM) · Revised October 2019. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten38/38 supported fields landed; flatten=true byte-deterministic (sha256 8a2c33f31d3c…)
pdf-lib1.17.1verified (38/38)38 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (38/38)38 fields filled in-process
pypdf6.15.0text fields verified (25/25)25 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (38/38)38 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/opm-of-306.pdf: page 2: shared object 633: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render check24.02.0values render (25/25)25/25 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 8ddb82581522…
File facts
Source: https://www.opm.gov/forms/pdf_fill/of0306.pdf (issuer page: here)
Blank tested: opm-of-306.pdf · 167 KB · sha256 3229d821dd6b07b2f38c73fa5be4ce87276a09f03df881fab2be9ef3bd5b6261
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 3 pages · AcroForm
Fields: 40 (25 text, 13 radiogroup, 2 signature)
Quirks & limitations
The field-type sampler of this corpus: real radio groups (13 of them — the Yes/No question pairs), plus two true digital-signature fields, alongside plain text fields.
Radio groups expose their selectable options at inspection; set the option string, not 'true'.
The two signature fields are actual /Sig fields: programmatic form-fillers list them but cannot fill them — signing requires a certificate-based signature workflow, which is out of scope for AcroForm value-filling APIs. Both pdfops and the local libraries report them as unsupported rather than faking a value.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 38 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 8a2c33f31d3c234e0369ef8e9e55b05ecfba8ddccddef665a9ec02abaacfb4c5.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@opm-of-306.pdf" \
-F 'fields={"Name":"Jane Doe","SSN":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 40 field names first with the inspector or POST /api/inspect.
Field schema
All 40 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
NameTextField
SSNTextField
PlaceBirthTextField
CitizenRadioGroup2 options
CitizenCountryTextField
BirthdateTextField
OtherNamesTextField
DayPhoneTextField
NightPhoneTextField
MaleRadioGroup2 options
SelectiveServiceRadioGroup2 options
MilitaryRadioGroup2 options
Branch1TextField
From1TextField
To1TextField
Discharge1TextField
Branch2TextField
Branch3TextField
From2TextField
From3TextField
To2TextField
To3TextField
Discharge2TextField
Discharge3TextField
ConvixtedRadioGroup2 options
Court-MartialRadioGroup2 options
CurrentChargesRadioGroup2 options
FiredRadioGroup2 options
DebtRadioGroup2 options
RelativesRadioGroup2 options
RetirementRadioGroup2 options
ExplanationTextField
LeaveLastJobTextField
CancelWaiverRadioGroup3 options
BasicLifeInsuranceRadioGroup3 options
ApplicantDateTextField
AppointingOfficerDateTextField
AppointeeDateTextField
ApplicantSignSignature
AppointeeSignSignature
Frequently asked
Can I fill the OPM Optional Form 306 programmatically?
Yes — the blank Revised October 2019 OPM Optional Form 306 is a fillable AcroForm with 40 fields. In our tested run, all 38 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
Can the OPM Optional Form 306's signature fields be filled via API?
No — the form has 2 true digital-signature field(s), which require a certificate-based signing workflow. Value-filling APIs (pdfops included) list them at inspection but skip them rather than faking a value. All other field types on the form filled and verified normally.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Form SSA-89: 21 fillable PDF fields (05-2025)
Source: https://pdfops.dev/registry/ssa-89
Registry
Form SSA-89 — programmatic fill compatibility
Authorization for the Social Security Administration to Release Social Security Number Verification · Social Security Administration (SSA) · 05-2025. Tested 2026-11-09 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-11-09verified + deterministic flatten21/21 supported fields landed; flatten=true byte-deterministic (sha256 c05f5f8c4dfd…)
pdf-lib1.17.1fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
@cantoo/pdf-lib (fork)2.6.5fails at loadError: Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.
pypdf6.15.0text fields verified (15/15)15 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (23/23)23 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/ssa-89.pdf: page 0: shared object 209: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render checkno filled output to renderno filled PDF from the pdf-lib leg to render
File facts
Source: https://www.ssa.gov/forms/ssa-89.pdf (issuer page: here)
Blank tested: ssa-89.pdf · 51 KB · sha256 c47e19193c0d1f4897f82f4ac07d866e3e818f478a31ad8070156dfcefc49f7a
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: ? pages · no AcroForm · encrypted
Fields: 23 (15 text, 8 checkbox)
Quirks & limitations
Signed by borrowers in nearly every US mortgage closing (SSN verification consent under the CBSV program), so document-prep systems fill it constantly.
ssa.gov refuses plain curl/script fetches of this file; the blank here was retrieved through a real browser session. Automate the FILL, and fetch the blank once by hand or through a browser lane.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 21 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 c05f5f8c4dfd0651a8f2cd14db0824e34733060a9ad1e26cbc48f4e1d88bbed7.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@ssa-89.pdf" \
-F 'fields={"form1[0].#subform[0].p1_PrintedName_FLD[0]":"Jane Doe","form1[0].#subform[0].p1_DOB_FLD[0]":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 23 field names first with the inspector or POST /api/inspect.
Field schema
All 23 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
form1[0].#subform[0].p1_PrintedName_FLD[0]TextField
form1[0].#subform[0].p1_DOB_FLD[0]TextField
form1[0].#subform[0].P1_SSN_FLD[0]TextField
form1[0].#subform[0].P1_Mortgage_CB[0]CheckBox
form1[0].#subform[0].P1_Bankacct_CB[0]CheckBox
form1[0].#subform[0].P1_CreditCard_CB[0]CheckBox
form1[0].#subform[0].p1_Loan_CB[0]CheckBox
form1[0].#subform[0].p1_Retirement_CB[0]CheckBox
form1[0].#subform[0].P1_applyforajob_CB[0]CheckBox
form1[0].#subform[0].P1_licensingrequriement_CB[0]CheckBox
form1[0].#subform[0].P1_Other_CB[0]CheckBox
form1[0].#subform[0].P1_OtherText_FLD[0]TextField
form1[0].#subform[0].P1_CompanyName_FLD[0]TextField
form1[0].#subform[0].p1_CompanyAddress_FLD[0]TextField
form1[0].#subform[0].P1_AgentsName_FLD[0]TextField
form1[0].#subform[0].P1_AgentAddress_FLD[0]TextField
form1[0].#subform[0].p1_ValidFor_FLD[0]TextField4
form1[0].#subform[0].p1_Initial_FLD[0]TextField5
form1[0].#subform[0].p1_Signature_FLD[0]TextField
form1[0].#subform[0].p1_DateSigned_FLD[0]TextField
form1[0].#subform[0].p1_Relationship_FLD[0]TextField
form1[0].#subform[0].P1_PAReadonly_FLD[0]TextField
form1[0].#subform[0].P1_PRAReadOnly_FLD[0]TextField
Frequently asked
Can I fill the Form SSA-89 programmatically?
Yes — the blank 05-2025 Form SSA-89 is a fillable AcroForm with 23 fields. In our tested run, all 21 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib cannot open it, and pypdf handled its text fields. Field names are listed in the schema on this page.
Why do PDF libraries reject the Form SSA-89?
The blank is AES-encrypted with an empty user password: anyone can open it in a viewer, but the owner password restricts modification, and strict parsers refuse the file outright. The pdfops API opens owner-locked files like this directly, and a password form field covers files that need a user password. qpdf --decrypt removes the restriction losslessly; pypdf can open it directly when its optional cryptography dependency is installed; pdftk-java both reads and fills it natively (its output is decrypted).
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# DS-11: 83 fillable PDF fields (DS-11 04-2025)
Source: https://pdfops.dev/registry/state-ds-11
Registry
DS-11 — programmatic fill compatibility
Application for a U.S. Passport · US Department of State, Bureau of Consular Affairs · DS-11 04-2025. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten83/83 supported fields landed; flatten=true byte-deterministic (sha256 2bf6aa870757…)
pdf-lib1.17.1verified (83/83)83 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (83/83)83 fields filled in-process
pypdf6.15.0text fields verified (63/63)63 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (83/83)83 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/state-ds-11.pdf: page 5: shared object 671: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render check24.02.0values render (63/63)63/63 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 014ecc455e42…
File facts
Source: https://eforms.state.gov/Forms/ds11_pdf.PDF (issuer page: here)
Blank tested: state-ds-11.pdf · 2508 KB · sha256 6b30860f0b54cba9df1a54d4eb007dc93a6c785b5253516604530b1c1898e2f6
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 6 pages · AcroForm
Fields: 84 (63 text, 20 checkbox, 1 button)
Quirks & limitations
The class-pattern question this entry was fetched to answer: is a State Department form built like USCIS's (dynamic XFA wrapped in owner-password AES encryption, verified in this registry's uscis-i-9 entry) or like the courts' (plain AcroForm, verified in uscourts-ao-440 and uscourts-101)? Measured directly: DS-11 is a plain, unencrypted AcroForm with no XFA dictionary on /AcroForm at all — confirmed via cantoo/pdf-lib load plus `qpdf --show-encryption` reporting 'File is not encrypted'. State's sibling renewal form DS-82 (checked alongside it for this entry, not itself added to the registry) is the same shape — plain AcroForm, unencrypted, 71 fields including 6 real RadioGroups — so this isn't a one-off; State's form family reads as its own class, distinct from both USCIS and the IRS's hybrid-XFA pattern.
eforms.state.gov has no bot-wall: a plain `curl` with a browser User-Agent fetched this 2.5 MB, 6-page blank on the first try, no 403 and no residential-IP/CDP workaround needed — a contrast worth recording next to uscis.gov's Akamai 403-to-datacenter-IPs behavior in the i-9 entry.
84 fields (63 TextField, 20 CheckBox, 1 pushbutton). Several visually-mutually-exclusive questions are built as sets of independent, ungrouped CheckBox fields rather than a single RadioGroup — verified field-by-field via pypdf's raw field dict: the 'previous passport status' question (Submitting/Stolen/Lost/In your possession) is four separate /Btn fields ('Book Status Submitting', 'Book Status Stolen', 'Book Status Lost', 'Book Status Possession'), each with Ff=0 (no radio flag set) and its own independent /Off + one on-state pair. Nothing in the AcroForm structure stops a filler from checking more than one simultaneously — a filler has to enforce mutual exclusivity itself. This is the same failure shape this registry separately documents in uscourts-101's Yes/No questions; seeing it twice, from two unrelated agencies' Acrobat-authored forms, is what turns it from an anecdote into a pattern worth checking for on any new form.
6 pages, but all 84 fields sit on the last two — pages 1-4 are eligibility rules, document checklists, and the privacy-act notice with zero form fields; the entire fillable application (identity, parents, spouse, passport book/card status) is packed onto pages 5-6. Verified by walking each field's widget /P (page) reference against the page tree, not by eyeballing the render: page 5 carries 30 widgets, page 6 carries 69. A filler that assumes fields are spread evenly across a 6-page form, or front-loaded like most other forms in this registry, will misjudge this one.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 83 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 2bf6aa87075741910fbf1ff37396af06d98f1effb1f934de1a9e63c6ec158dd3.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@state-ds-11.pdf" \
-F 'fields={"Address Line 2":"PDFops","List all other name you have used":"PDFops"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 84 field names first with the inspector or POST /api/inspect.
Field schema
All 84 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
Address Line 2TextField36
List all other name you have usedTextField13
List all other names you have usedTextField13
Hair ColorTextField
Eye ColorTextField
Emergency Contact NameTextField
Emergency Contact AddressTextField
Emergency Contact CityTextField
Emergency Contact Zip CodeTextField6
Emergency Contact PhoneTextField
Relationship to ApplicantTextField
Countries to be visitedTextField
Travel Return DateTextField
Your name as printed on your most recent U.S. passport book and/or passport cardTextField
SelectionCheckBox
Regular or Large BookCheckBox
GenderCheckBox
Parent 1 GenderCheckBox
Parent 2 US CitizenCheckBox
Parent 2 GenderCheckBox
Parent 1 US CitizenCheckBox
Spouse US CitizenCheckBox
Additional #CheckBox
Ever Applied or IssuedCheckBox
Ever MarriedCheckBox
Applicant Place of BirthTextField18
Applicant Last NameTextField21
Applicant First NameTextField17
Applicant Middle NameTextField16
Applicant DOB MTextField2
Applicant DOB YTextField4
Applicant SSN 1TextField3
Applicant Address StateTextField2
Applicant Address Zip CodeTextField6
Applicant Address CountryTextField12
Applicant Address StreetTextField36
Applicant Phone 3TextField4
Applicant SSN 3TextField4
Applicant DOB DTextField2
Applicant SSN 2TextField2
Applicant Phone 1TextField3
Applicant Phone 2TextField3
Emergency Contact Apartment/UnitTextField
Permanent Address CityTextField
Permanent Address StreetTextField
Permanent Address Apartment/UnitTextField
Permanent Address StateTextField2
Permanent Address Zip CodeTextField6
Applicant DOB 2TextField
Name of Applicant 2TextField
Parent 1 FM NameTextField
Parent 1 Last NameTextField
Parent 1 DOBTextField
Parent 2 FM NameTextField
Parent 2 Last NameTextField
Parent 2 DOBTextField
Full Name of Current Spouse or Most Recent Spouse (Last, first, Middle)TextField
Current Spouse Date of BirthTextField
Current Spouse Place of BirthTextField
Date of Marriage (mm/dd/yyyy)TextField
Widow/Divorce Date (mm/dd/yyyy)TextField
Applicant Additional Contact Phone NumbersTextField
OccupationTextField
Employer or SchoolTextField
HeightTextField
Travel Departure DateTextField
ClearButton
Circumstances of lost/stolen book/cardTextField250
Alien NumberTextField9
Applicant EmailTextField
Applicant Address CityTextField14
Name as printed on your most recent passport cardTextField
Parent 2 Place of BirthTextField
Parent 1 Place of BirthTextField
DivorcedCheckBox
Book Status SubmittingCheckBox
Book Status StolenCheckBox
Book Status LostCheckBox
Book Status PossessionCheckBox
Card Status SubmittingCheckBox
Card Status StolenCheckBox
Card Status LostCheckBox
Card Status PossessionCheckBox
Emergency Contact StateTextField2
Frequently asked
Can I fill the DS-11 programmatically?
Yes — the blank DS-11 04-2025 DS-11 is a fillable AcroForm with 84 fields. In our tested run, all 83 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# USCIS Form I-9: 128 fillable PDF fields (Edition 01/20/25)
Source: https://pdfops.dev/registry/uscis-i-9
Registry
USCIS Form I-9 — programmatic fill compatibility
Employment Eligibility Verification · US Citizenship and Immigration Services (USCIS), Department of Homeland Security · Edition 01/20/25. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten128/128 supported fields landed; flatten=true byte-deterministic (sha256 32dcfd756fa8…)
pdf-lib1.17.1verified (128/128)128 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (128/128)128 fields filled in-process
pypdf6.15.0text fields verified (115/115)115 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (127/127)127 fields filled via FDF and re-dumped
qpdf --check11.9.0structurally cleanerrors that qpdf cannot detect
poppler render check24.02.0values render (115/115)115/115 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 66d1b21734e9…
File facts
Source: https://www.uscis.gov/sites/default/files/document/forms/i-9.pdf (issuer page: here)
Blank tested: uscis-i-9.pdf · 512 KB · sha256 780f348c34df694bb0b4dbbfaf9f22b99b9757b80d16a37ba89aadf069597281
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 4 pages · AcroForm
Fields: 128 (115 text, 8 checkbox, 5 dropdown)
Quirks & limitations
uscis.gov sits behind Akamai and returns 403 to datacenter-IP fetchers (verified: plain curl from a cloud box gets blocked). A residential IP with a browser-shaped request passes fine — this blank was fetched over Playwright/CDP driving a real Chrome on a residential connection, not curl.
The one outlier in USCIS's own catalog: every other current USCIS form checked alongside it for this entry (N-400, I-131, I-485, I-765, I-90, I-864, I-751, G-28) is a dynamic-XFA PDF additionally wrapped in AES encryption with an empty user password (same owner-locked pattern as this registry's ca-fl-100) — pdf-lib and cantoo refuse to even load them. I-9 alone is a plain, unencrypted AcroForm with real baked appearances, which is the only reason it's fillable by this registry's tooling at all.
Field-level JavaScript is extensive — 24+ /JS actions wired to field /AA (additional-actions) triggers for formatting and validation (e.g. SSN and date masks). These only execute in Adobe products; non-Adobe fillers (this registry's included) skip them silently, so format enforcement has to happen in your own layer.
4 pages: Section 1 (employee), Section 2 (employer, page 2), a preparer/translator supplement (page 3), and a Reverification and Rehire supplement (page 4, formerly 'Section 3'). Most automation only needs Section 1 + 2.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 128 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 32dcfd756fa84b4b9466ca46cac0c6549087bd4a9753bce2c8d3ce0eeaaa6088.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@uscis-i-9.pdf" \
-F 'fields={"3 A lawful permanent resident Enter USCIS or ANumber":"Jane Doe","Signature of Employee":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 128 field names first with the inspector or POST /api/inspect.
Field schema
All 128 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
3 A lawful permanent resident Enter USCIS or ANumberTextField
Signature of EmployeeTextField
Last Name Family Name from Section 1TextField
First Name Given Name from Section 1TextField
Middle initial if any from Section 1TextField
First Name Given NameTextField
Employee Middle Initial (if any)TextField1
Employee Other Last Names Used (if any)TextField
Today's Date mmddyyyTextField
List A. Document 2. Expiration Date (if any)TextField
List A. Document Title 3. If anyTextField
List A. Document 3. Enter Issuing AuthorityTextField
List A. Document 3 Number. If anyTextField
List B Document 1 TitleTextField
Additional InformationTextField
Middle initial if any from Section 1-2TextField
Sig Date mmddyyyy 1TextField
Sig Date mmddyyyy 0TextField
Sig Date mmddyyyy 2TextField
Sig Date mmddyyyy 3TextField
Signature of Preparer or Translator 0TextField
Signature of Preparer or Translator 1TextField
Signature of Preparer or Translator 2TextField
Signature of Preparer or Translator 3TextField
Preparer or Translator Last Name (Family Name) 0TextField
Preparer or Translator Last Name (Family Name) 2TextField
Preparer or Translator Last Name (Family Name) 3TextField
Preparer or Translator Address (Street Number and Name) 0TextField
Preparer or Translator Address (Street Number and Name) 1TextField
Preparer or Translator Address (Street Number and Name) 2TextField
Preparer or Translator Address (Street Number and Name) 3TextField
Preparer or Translator First Name (Given Name) 0TextField
Preparer or Translator Last Name (Family Name) 1TextField
Preparer or Translator First Name (Given Name) 2TextField
Preparer or Translator First Name (Given Name) 3TextField
Preparer or Translator City or Town 0TextField
Preparer or Translator City or Town 1TextField
Preparer or Translator City or Town 2TextField
Preparer or Translator City or Town 3TextField
Preparer State 0Dropdown59 options
Preparer State 1Dropdown59 options
Preparer State 2Dropdown59 options
Preparer State 3Dropdown59 options
Zip Code 0TextField6
Zip Code 1TextField6
Zip Code 2TextField6
Zip Code 3TextField6
CB_1CheckBox
CB_2CheckBox
CB_3CheckBox
CB_4CheckBox
Date of Rehire 0TextField
Date of Rehire 1TextField
Date of Rehire 2TextField
Todays Date 0TextField
Todays Date 1TextField
Todays Date 2TextField
Last Name 0TextField
Last Name 1TextField
Last Name 2TextField
First Name 0TextField
First Name 1TextField
First Name 2TextField
Middle Initial 0TextField1
Middle Initial 1TextField1
Middle Initial 2TextField1
PT Middle Initial 0TextField1
PT Middle Initial 1TextField1
PT Middle Initial 2TextField1
PT Middle Initial 3TextField1
Document Title 0TextField
Document Title 2TextField
Document Number 0TextField
Document Number 1TextField
Document Number 2TextField
Expiration Date 0TextField
Expiration Date 2TextField
Expiration Date 1TextField
Name of Emp or Auth Rep 0TextField
Name of Emp or Auth Rep 1TextField
Name of Emp or Auth Rep 2TextField
Signature of Emp Rep 0TextField
Signature of Emp Rep 1TextField
Signature of Emp Rep 2TextField
CB_Alt_0CheckBox
CB_Alt_1CheckBox
CB_Alt_2CheckBox
Addtl Info 0TextField
Addtl Info 2TextField
Addtl Info 1TextField
CB_AltCheckBox
Last Name Family Name from Section 1-2TextField
First Name Given Name from Section 1-2TextField
StateDropdown59 options
ZIP CodeTextField6
Date of Birth mmddyyyyTextField
US Social Security NumberTextField9
Telephone NumberTextField
Last Name (Family Name)TextField
Address Street Number and NameTextField
Apt Number (if any)TextField
City or TownTextField
Employees E-mail AddressTextField
Exp Date mmddyyyyTextField
USCIS ANumberTextField10
Form I94 Admission NumberTextField11
Foreign Passport Number and Country of IssuanceRow1TextField
Document Title 1TextField
Issuing Authority 1TextField
Document Number 0 (if any)TextField
Document Title 2 If anyTextField
Issuing Authority_2TextField
Document Number If any_2TextField
Document Number if any_3TextField
List C Expiration Date 1TextField
List C Document Number 1TextField
List C Issuing Authority 1TextField
List C Document Title 1TextField
FirstDayEmployed mmddyyyyTextField
S2 Todays Date mmddyyyyTextField
Last Name First Name and Title of Employer or Authorized RepresentativeTextField
Signature of Employer or ARTextField
Employers Business or Org NameTextField
Employers Business or Org AddressTextField
Expiration Date if anyTextField
List B Issuing Authority 1TextField
List B Document Number 1TextField
List B Expiration Date 1TextField
Frequently asked
Can I fill the USCIS Form I-9 programmatically?
Yes — the blank Edition 01/20/25 USCIS Form I-9 is a fillable AcroForm with 128 fields. In our tested run, all 128 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Official Form 101: 268 fillable PDF fields (06/24)
Source: https://pdfops.dev/registry/uscourts-101
Registry
Official Form 101 — programmatic fill compatibility
Voluntary Petition for Individuals Filing for Bankruptcy · Administrative Office of the US Courts · 06/24. Tested 2026-11-16 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-11-16verified + deterministic flatten268/268 supported fields landed; flatten=true byte-deterministic (sha256 c5ed4c9664cd…)
pdf-lib1.17.1verified (268/268)268 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (268/268)268 fields filled in-process
pypdf6.15.0text fields verified (176/176)176 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (268/268)268 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/uscourts-101.pdf: page 7: shared object 1663: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render check24.02.0values render (176/176)176/176 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 a5d6d96a452a…
File facts
Source: https://www.uscourts.gov/sites/default/files/form_b_101_0624_fillable_clean.pdf (issuer page: here)
Blank tested: uscourts-101.pdf · 422 KB · sha256 f9b8f6b2d11540fce286914c153003aa058ca125b6171e78f3bb440f810c5950
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 8 pages · AcroForm
Fields: 271 (176 text, 85 checkbox, 7 radiogroup, 3 signature)
Quirks & limitations
Plain AcroForm, no XFA, not encrypted — the same clean shape as this registry's other uscourts.gov entry (ao-440), reinforcing 'courts = clean AcroForm' as an actual class pattern rather than a single data point. 159 fields: 127 text, 27 checkbox, 4 pushbutton, 1 dropdown.
The under-covered quirk this entry was fetched for: every visually mutually-exclusive Yes/No question on the form (dozens of them — 'Are you filing under Chapter 7/11/12/13', debtor questions throughout the petition) and even the chapter-selection checkboxes are built as fully independent CheckBox fields with Ff=0 (verified field-by-field via pypdf's raw /Ff flag — none of the 27 has the radio bit set, none is grouped under a shared parent). Nothing in the AcroForm stops a filler from checking both 'Chapter 7' and 'Chapter 13', or both 'Yes' and 'No' on the same question. This registry's uscis-i-9/opm-of-306/ca-edd-de1 entries show real RadioGroup fields elsewhere in government forms, so this isn't universal — it's a per-form authoring choice, and this form chose the unsafe one.
Field names are generic and non-semantic — 'Check Box1' through 'Check Box26', plus three inserted-later variants suffixed 'A' ('Check Box16A', 'Check Box17A', 'Check Box20A', breaking the numeric sequence, likely a later revision that added items without renumbering). None of the 27 names hint at which question they answer; mapping them to meaning requires visually cross-referencing rendered field positions against the printed form, not just reading the AcroForm field tree.
The single Dropdown ('Bankruptcy District Information', 95 options — every federal judicial district) is the identical component this registry's uscourts-ao-440 entry documents under the name 'Dist.Info' — same 95-entry option list, same first blank option, evidently a shared component reused across US Courts forms rather than authored per-form.
Fetched cleanly with a plain `curl` and a browser User-Agent — no 403, no CDP workaround needed, consistent with this registry's other uscourts.gov entry.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 268 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 c5ed4c9664cd1cbb2501c6fcaba98227a86758fa909044945431de4b799c48fc.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@uscourts-101.pdf" \
-F 'fields={"State":"Jane Doe","First name":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 271 field names first with the inspector or POST /api/inspect.
Field schema
All 271 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
StateTextField
Chapter 7CheckBox
Chapter 11CheckBox
Chapter 12CheckBox
Chapter 13CheckBox
Check if this is anCheckBox
First nameTextField
First name_2TextField
Middle nameTextField
Middle name_2TextField
Last nameTextField
Last name_2TextField
Suffix Sr Jr II IIITextField
Suffix Sr Jr II III_2TextField
First name_3TextField
First name_4TextField
Middle name_3TextField
Middle name_4TextField
Last name_3TextField
Last name_4TextField
First name_5TextField
First name_6TextField
Middle name_5TextField
Middle name_6TextField
Last name_5TextField
Business name if applicableTextField
Business name if applicable_2TextField
Last name_6TextField
Business name if applicable_3TextField
Business name if applicable_4TextField
xxTextField
undefinedTextField
undefined_2TextField
undefined_3TextField
xx_2TextField
undefined_4TextField
undefined_5TextField
undefined_6TextField
undefined_7TextField
undefined_8TextField
undefined_9TextField
undefined_10TextField
9 xx xxTextField
undefined_11TextField
undefined_12TextField
undefined_13TextField
First NameTextField
Middle NameTextField
Last NameTextField
Case number if knownTextField
undefined_14TextField
undefined_15TextField
EINTextField
EIN_2TextField
EIN_3TextField
undefined_16TextField
EIN_4TextField
undefined_17TextField
NumberTextField
StreetTextField
undefined_18TextField
CityTextField
State_2TextField
ZIP CodeTextField
CountyTextField
Number_2TextField
Street_2TextField
PO BoxTextField
City_2TextField
State_3TextField
ZIP Code_2TextField
Number_3TextField
Street_3TextField
undefined_19TextField
City_3TextField
State_4TextField
ZIP Code_3TextField
County_2TextField
Number_4TextField
Street_4TextField
PO Box_2TextField
City_4TextField
State_5TextField
ZIP Code_4TextField
Over the last 180 days before filing this petitionCheckBox
I have another reason ExplainCheckBox
Over the last 180 days before filing this petition_2CheckBox
I have another reason Explain_2CheckBox
See 28 USC 1408 1TextField
See 28 USC 1408 2TextField
See 28 USC 1408 3TextField
See 28 USC 1408 4TextField
See 28 USC 1408 1_2TextField
See 28 USC 1408 2_2TextField
See 28 USC 1408 3_2TextField
See 28 USC 1408 4_2TextField
Debtor 1TextField
Case number if known_2TextField
Chapter 7_2CheckBox
Chapter 11_2CheckBox
Chapter 12_2CheckBox
Chapter 13_2CheckBox
I will pay the entire fee when I file my petition Please check with the clerks office in yourCheckBox
I need to pay the fee in installments If you choose this option sign and attach theCheckBox
I request that my fee be waived You may request this option only if you are filing for Chapter 7CheckBox
bankruptcy within theRadioGroup2 options
WhenTextField
Case numberTextField
District_2TextField
When_2TextField
Case number_2TextField
District_3TextField
When_3TextField
Case number_3TextField
filed by a spouse who isRadioGroup2 options
DebtorTextField
Relationship to youTextField
District_4TextField
When_4TextField
Case number if known_3TextField
Debtor_2TextField
Relationship to you_2TextField
District_5TextField
When_5TextField
Case number if known_4TextField
Go to line 12RadioGroup2 options
No Go to line 12CheckBox
Yes Fill out Initial Statement About an Eviction Judgment Against You Form 101A and file it asCheckBox
First Name_2TextField
Middle Name_2TextField
Last Name_2TextField
Case number if known_5TextField
No Go to Part 4CheckBox
Yes Name and location of businessCheckBox
Name of business if anyTextField
Number_5TextField
Street_5TextField
1TextField
2TextField
State_6TextField
ZIP Code_5TextField
Health Care Business as defined in 11 USC 10127ACheckBox
Single Asset Real Estate as defined in 11 USC 10151BCheckBox
Stockbroker as defined in 11 USC 10153ACheckBox
Commodity Broker as defined in 11 USC 1016CheckBox
None of the aboveCheckBox
No_4CheckBox
No_5CheckBox
Yes I am filing under Chapter 11 I am a small business debtor according to the definition in theCheckBox
Yes I am filing under Chapter 11 I am a debtor according to the definition in 11821 of the BankruptcyCheckBox
property that poses or isRadioGroup2 options
What is the hazardTextField
undefined_20TextField
If immediate attention is needed why is it neededTextField
undefined_21TextField
Number_6TextField
Street_6TextField
1_2TextField
2_2TextField
State_7TextField
ZIP Code_6TextField
Debtor 1_2TextField
Case number if known_6TextField
I received a briefing from an approved creditCheckBox
I received a briefing from an approved credit_2CheckBox
I certify that I asked for credit counselingCheckBox
I am not required to receive a briefing aboutCheckBox
IncapacityCheckBox
DisabilityCheckBox
Active duty I am currently on active militaryCheckBox
I received a briefing from an approved credit_3CheckBox
I received a briefing from an approved credit_4CheckBox
I certify that I asked for credit counseling_2CheckBox
I am not required to receive a briefing about_2CheckBox
Incapacity_2CheckBox
Disability_2CheckBox
Active duty I am currently on active military_2CheckBox
Debtor 1_3TextField
Case number if known_7TextField
No Go to line 16bCheckBox
Yes Go to line 17CheckBox
No Go to line 16cCheckBox
Yes Go to line 17_2CheckBox
16c State the type of debts you owe that are not consumer debts or business debtsTextField
No I am not filing under Chapter 7 Go to line 18CheckBox
Yes I am filing under Chapter 7 Do you estimate that after any exempt property is excluded andCheckBox
administrative expenses are paid that funds will be available to distribute to unsecured creditorsRadioGroup2 options
149CheckBox
5099CheckBox
100199CheckBox
200999CheckBox
10005000CheckBox
500110000CheckBox
1000125000CheckBox
2500150000CheckBox
50001100000CheckBox
More than 100000CheckBox
050000CheckBox
50001100000_2CheckBox
100001500000CheckBox
5000011 millionCheckBox
100000110 millionCheckBox
1000000150 millionCheckBox
50000001100 millionCheckBox
100000001500 millionCheckBox
5000000011 billionCheckBox
100000000110 billionCheckBox
1000000000150 billionCheckBox
More than 50 billionCheckBox
050000_2CheckBox
50001100000_3CheckBox
100001500000_2CheckBox
5000011 million_2CheckBox
100000110 million_2CheckBox
1000000150 million_2CheckBox
50000001100 million_2CheckBox
100000001500 million_2CheckBox
5000000011 billion_2CheckBox
100000000110 billion_2CheckBox
1000000000150 billion_2CheckBox
More than 50 billion_2CheckBox
First Name_3TextField
Middle Name_3TextField
Last Name_3TextField
Case number if known_8TextField
Part 7 Sign BelowTextField
Signature of Debtor 1Signature
Signature of Debtor 2Signature
MMTextField
DDTextField
YYYYTextField
MM DDTextField
YYYY_2TextField
Signature of Attorney for DebtorSignature
MM_2TextField
fill_28TextField
DD_2TextField
YYYY_3TextField
Printed nameTextField
Firm nameTextField
Number_7TextField
Street_7TextField
1_3TextField
2_3TextField
State_8TextField
ZIP Code_7TextField
Contact phoneTextField
Email addressTextField
Bar numberTextField
State_9TextField
Debtor 1_4TextField
Case number if known_9TextField
consequencesRadioGroup2 options
inaccurate or incomplete you could be fined or imprisonedRadioGroup2 options
undefined_22TextField
No_10CheckBox
Yes Name of PersonCheckBox
undefined_23TextField
undefined_24TextField
MM DD_2TextField
YYYY_4TextField
MM_3TextField
DD YYYYTextField
Contact phone_2TextField
Contact phone_3TextField
Cell phoneTextField
Cell phone_2TextField
Email address_2TextField
Email address_3TextField
DistrictTextField
Case number (if known)TextField
Frequently asked
Can I fill the Official Form 101 programmatically?
Yes — the blank 06/24 Official Form 101 is a fillable AcroForm with 271 fields. In our tested run, all 268 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
Can the Official Form 101's signature fields be filled via API?
No — the form has 3 true digital-signature field(s), which require a certificate-based signing workflow. Value-filling APIs (pdfops included) list them at inspection but skip them rather than faking a value. All other field types on the form filled and verified normally.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# AO 440: 31 fillable PDF fields (Rev. 06/12)
Source: https://pdfops.dev/registry/uscourts-ao-440
Registry
AO 440 — programmatic fill compatibility
Summons in a Civil Action · Administrative Office of the US Courts · Rev. 06/12. Tested 2026-08-06 on the unmodified upstream blank — every number below comes from a recorded run, not from documentation.
Verdict at a glance
ToolVersionResultDetail
pdfops APIhosted, tested 2026-08-06verified + deterministic flatten31/31 supported fields landed; flatten=true byte-deterministic (sha256 89a7ad9f10b6…)
pdf-lib1.17.1verified (31/31)31 fields filled in-process
@cantoo/pdf-lib (fork)2.6.5verified (31/31)31 fields filled in-process
pypdf6.15.0text fields verified (29/29)29 text fields written and re-read (text fields only)
pdftk-java3.3.3verified (31/31)31 fields filled via FDF and re-dumped
qpdf --check11.9.0warningsWARNING: public/registry/blank/uscourts-ao-440.pdf: page 1: shared object 119: in hint table but not computed list | qpdf: operation succeeded with warnings
poppler render check24.02.0values render (29/29)29/29 filled text values present in pdftotext output of the pdf-lib-filled file; page-1 raster sha256 afb42d2b185c…
File facts
Source: https://www.uscourts.gov/sites/default/files/ao440.pdf (issuer page: here)
Blank tested: uscourts-ao-440.pdf · 25 KB · sha256 2df4ff1d30d123b8a3591d158816940712e0da0189b47ca0abf780579895fbae
License: US federal government work — public domain (17 U.S.C. § 105). The hash-verified blank is redistributed here unmodified.
Structure: 2 pages · AcroForm
Fields: 34 (29 text, 3 button, 1 dropdown, 1 checkbox)
Quirks & limitations
The cleanest form in this corpus — a well-behaved AcroForm with no XFA layer, no encryption, and a dropdown of US district courts. A good first target when testing a fill pipeline end-to-end.
Litigation tooling fills these in bulk — one summons per defendant.
The court dropdown is a combo box whose option list is the full set of district-court names; setting a value not in the list is rejected by strict fillers.
Tested request
This exact shape ran against the live API during the recorded test (values here shortened to two fields; the test filled all 31 supported fields). With flatten=true, two identical runs produced byte-identical output — sha256 89a7ad9f10b67c71024cf69ecb8e7cc87ac542ee52dccbdd8bd08628593109da.
curl -X POST https://pdfops.dev/api/fill-form \
-F "pdf=@uscourts-ao-440.pdf" \
-F 'fields={"Date_Today":"Jane Doe","Plaintiff":"Jane Doe"}' \
-F "flatten=true" \
-o filled.pdf
Enumerate all 34 field names first with the inspector or POST /api/inspect.
Field schema
All 34 fields (name, type, maxLength, options)
Field nameTypemaxLengthOptions
Dist.InfoDropdown95 options
Date_TodayTextField
PlaintiffTextField
DefendantTextField
Defendant addressTextField
Plaintiff addressTextField
Deputy Clerk SignatureTextField
Civil action numberTextField
Button.Print1Button
Button.SaveAsButton
Button.ResetButton
Date_ReceivedTextField
Place Served2TextField
MethodCheckBox
Left With2TextField
Date_Served1TextField
Served OnTextField
Organization2TextField
OtherTextField
Travel FeeTextField
Date_Today2TextField
Server SignatureTextField
Server NameTextField
Server AddressTextField
Additional informationTextField
Defendant2TextField
Place ServedTextField
Date_ServedTextField
Left WithTextField
OrganizationTextField
Date_Served2TextField
Unexecuted ReasonTextField
Service FeeTextField
Total FeeTextField
Frequently asked
Can I fill the AO 440 programmatically?
Yes — the blank Rev. 06/12 AO 440 is a fillable AcroForm with 34 fields. In our tested run, all 31 supported fields were filled through the pdfops API and verified by re-inspecting the output; upstream pdf-lib also round-trips it, and pypdf handled its text fields. Field names are listed in the schema on this page.
← All forms in the registry · Inspect your own PDF · Make a flat PDF fillable
---
# Turn a Google Sheets row into a PDF invoice | PDFops
Source: https://pdfops.dev/guides/google-sheets-row-to-pdf-invoice
Guide
Turn a Google Sheets row into a PDF invoice
One row in, one invoice out
Get a free API key
See the templates
Rowclientinvoice_no+8 more
2Harbour Dental Group2026-0042…
One row of the sheet
PDFops builds the invoice
/api/invoice, once per row. Done by the Zapier template below.
The invoice it becomes. Open the invoice PDF. The sample was made with a paid key; output from a free key adds a small footer line.
Plenty of small businesses keep their billing in a Google Sheet and still type each invoice out by hand. PDFops draws a complete invoice from structured data, with no template to prepare, so a sheet row can become the invoice directly. This page shows the Zapier template that already exists, the column mapping, and the cell values that make the invoice step fail.
What you get
Add a row to a billing sheet and get back one PDF invoice, with the row's client, line item, rate and dates laid out as a finished document. See a sample invoice PDF.
Set it up
Set up the sheet columns. Put one header per column in row 1 and one invoice per row below it. The example uses the client, an invoice number, an invoice date, a due date, one service, hours, a rate, a currency, a tax percentage and a note. Your own name or company goes in the From field of the PDFops step, typed once, so it needs no column.
Write the client and the dates so the invoice step takes them. An invoice needs a client name, so keep the client column filled on every row. In the Zapier action the invoice date and the due date are date fields, and the action sends only the first ten characters of each, so write both as YYYY-MM-DD, for example 2026-11-27. A due date such as On receipt of invoice would print as On receipt. Write the date columns as plain text so they reach the step in that form. Hours and rate must be plain numbers, with no currency symbol.
Get a free key and connect PDFops. Create a free API key, then paste it into the PDFops connection in Zapier.
Test on a scratch folder, and leave the Zap off. Open the template and pick a scratch Google Drive folder in the Upload File step: testing that step saves a real invoice to the folder you chose. Map each invoice field to its column once in the PDFops step, run the test on a row you added for the purpose, and open the PDF.
Compare the invoice with its row. Check the invoice against the row it came from: the client, the currency, the hours times the rate, the tax and the total. Fix the mapping if any of them is off.
Pick the real folder, then turn it on. Choose the real Google Drive folder in the Upload File step again, then turn the Zap on. From then on every row added to the sheet becomes an invoice in that folder.
Column to invoice field mapping
Each row becomes one POST call to /api/invoice (endpoint reference). In Zapier you choose the column for each invoice field once, in the PDFops step; after that every new row fills the same fields. The invoice layout is fixed, so there is no template PDF to prepare.
Sheet columnInvoice fieldExample value
clienttoHarbour Dental Group
invoice_noinvoice_number2026-0042
invoice_datedate2026-11-27
due_datedue2026-12-27
serviceitems.descriptionWebsite maintenance, November
hoursitems.quantity6
rateitems.unit_price85
currencycurrencyCAD
tax_pcttax_rate13
notesnotesPayment by bank transfer.
typed once in the PDFops stepfromNorthwind Studio
Templates
Zapier
Open the template in Zapier: Create PDFops invoice PDFs from new Google Sheets rows and save them to Google Drive. It is also on its listing page.
Steps: Google Sheets (New Spreadsheet Row), then PDFops (Create Invoice PDF), then Google Drive (Upload File).
Before you run it. Testing the Upload File step saves a real invoice to the Drive folder you picked, so choose a scratch folder first and pick the real folder again before you turn the Zap on. Leave the Zap off until the sample invoice reads right; once it is on, every row added to the sheet becomes an invoice in that folder.
Needs a paid plan. Three steps (trigger, PDFops, Google Drive). Zapier's Free plan allows two-step Zaps only (zapier.com/pricing.md, read 2026-11-27). A trigger plus the PDFops step alone would run on Free but would deliver the invoice nowhere.
Get a free PDFops key for Zapier
Frequently asked
Which columns does the sheet need?
At least a client name, a line item description and a unit price, plus your own name or company in the From field. Everything else is optional: an invoice number, an invoice date, a due date, a quantity that defaults to 1, a currency that defaults to USD, a tax percentage and a note. In Zapier you choose the column for each field in the PDFops step, so the headers can be anything.
Why does the invoice step fail on some rows?
Check two things first: the client cell is filled, and the invoice date and due date are written YYYY-MM-DD. Write the date columns as plain text in the form 2026-11-27, so every value reaches the step in the one form the Zapier action expects.
Can an invoice have more than one line item?
This guide maps one line item per row, so one row makes one invoice with one line. The invoice endpoint reference describes the full request, which takes up to 100 line items.
Does this run on a free Zapier plan?
No. The template has three steps, and Zapier's Free plan allows two-step Zaps, so it needs a paid Zapier plan. A PDFops key itself is free.
Is there an n8n workflow for this?
Not for this exact flow. n8n has an Invoice operation in the PDFops node, and the Stripe invoice guide on this site links a workflow that uses it.
Does the invoice carry a PDFops footer?
Invoices made with a free key, or with no key, carry a one-line footer saying Generated with pdfops.dev. Paid keys get clean output.
Try it
Get a free API key, then open a template above. You can also build a sample invoice in the free invoice generator first.
Related guides: Turn a Stripe payment into a PDF invoice and email it · Fill a PDF form from Google Sheets · Merge every PDF in a Google Drive folder into one file · Turn HTML into a PDF over a webhook in n8n
← PDFops home · Zapier guide · Free key · Pricing
---
# Fill a PDF form from Google Sheets | PDFops
Source: https://pdfops.dev/guides/google-sheets-to-filled-pdf-form
Guide
Fill a PDF form from Google Sheets
One row in, one filled PDF out
Get a free API key
See the templates
Rowapplicant_nameemail_addr+6 more
2Maya Okaformaya.okafor@example.com…
One row of the sheet
PDFops fills the form
/api/fill-form, once per row. Done by the Zapier template and the n8n workflow below.
The PDF it becomes. Open the filled PDF.
Applicant lists, onboarding sheets and registration logs usually live in Google Sheets, and each line often needs a form filled out by hand. PDFops fills fillable PDF forms from a set of field values, so a sheet row can become those values directly. This page shows the two templates that already exist, the column mapping, and which plans each one needs.
What you get
Add a row to a Google Sheet and get back one filled PDF form, with that row's values written into the form's fields. See a filled sample PDF.
Prepare a reusable blank PDF master in n8n
Start with a flat, digitally drawn application. Review the proposed fields, keep only the ones you approve and download a blank master. The example keeps Full name, then fills a separate copy with Example Supplier. This preparation workflow does not read a Google Sheet.
Prepare a reusable blank PDF master in n8n
This tutorial prepares a blank master and checks a separate filled copy. It does not run recurring Google Sheets automation.
Your browser cannot play this video. Download the tutorial or read the transcript below.
Jump to a step0:00 Result: an approved field and a blank master
0:22 Get the matching workflow and sample PDFs
0:35 Install the PDFops community node
0:50 Import into an empty workflow
1:04 Select the credential on all three PDFops steps
1:23 Protect the form with a separate login
1:35 Publish and open the protected form
1:49 Upload the blank digital PDF
2:01 Compare the source and candidate fields
2:12 Approve a subset and verify the saved fields
2:33 Inspect the blank master
2:45 Fill a separate copy
2:57 Reopen both files and compare
3:11 Cancel without creating a master
3:21 Handle incomplete detection
3:34 Image scans and manual fields
3:45 Use the matching guide and samples
Download the tutorial · Download captions
Read the tutorial transcript
This application started as a flat PDF. Now it has one approved field, and the original master is still blank. You need n8n, a PDFops credential and a separate form login.
We will prepare a digital PDF master once, then verify a filled copy. Open the guide and download the workflow, the sample application and the expected master. Keep the guide beside your editor.
In n8n, add the PDFops community node. Check the version before you import the workflow. This example needs version 0.6 or later. Copy the workflow JSON. On an empty n8n canvas, paste it, then save. The notes explain how to review fields and check the master.
Add your PDFops credential to all three PDFops steps. Keep your key in the credential, not in a node value or a shared file. On Upload Blank PDF, keep basic authentication enabled and select the separate login for the people who prepare your forms.
Publish the workflow, then open its production form address. This demonstration uses a disposable instance. Keep the form protected with its separate login.
Choose the blank sample application and submit it. PDFops looks for candidate fields while preserving the source document. Keep the original page open beside the review form.
Compare the names, field types and positions before approving anything. Select Full name and leave the other fields unchecked. For your own form, choose the subset you actually need.
Submit your selection. The workflow adds only the approved fields, reopens the master and checks its saved field names and types. Open the blank master in the PDFops Playground.
Click Full name to check the placement. The field should still be empty. Enter Example Supplier in Full name and fill a separate copy.
In your workflow, use the same field name for each new record. Save the filled PDF as a separate file. Open it, then reopen the master.
One should contain the example name; the other should still be blank. To cancel a review, submit with no boxes selected. The workflow ends without creating a master.
If detection is incomplete or there are no usable candidates, the workflow withholds the master. Review the source before trying again.
For an image scan, get a digitally drawn original or place the fields manually. Check their positions before using the master. The guide links the workflow and sample files.
Start with one field, inspect both outputs, then reuse your verified master.
Download transcript.
Download the n8n preparation workflow
Try it with the blank source PDF. Select Full name and compare the result with the reviewed blank master.
For a visual check, open the PDFops Playground and choose that downloaded master. Focus its empty field, enter an example value and fill a separate copy. Reopen the master to check it stayed blank. The automated workflow below uses its own sample form; if you replace it with this new master, inspect the field names and update the mapping. It does not rebind automatically.
Prepare and verify your blank master
Get the three matching downloads. Save the preparation workflow, blank source PDF and reviewed blank master linked above. Keep the source open for comparison. You need an n8n instance, a PDFops API key and a separate login for the upload form. The setup shown here was replayed in self-hosted n8n; n8n Cloud installation has not been independently replayed for this tutorial.
Install PDFops and import the workflow. In self-hosted n8n, open Settings, Community nodes and install n8n-nodes-pdfops. Check that the installed version is 0.6.0 or a later compatible version. Open a fresh workflow, import the downloaded JSON, or copy its JSON text and paste it onto the empty canvas. Save, then read the overview and the four section notes.
Connect each PDFops step. Create a PDFops API credential with your key. Select it on Detect Candidates, Create Blank Master and Read Back Master. These are three separate node selections. Keep the key in the credential; do not put it in a node parameter or exported JSON.
Protect and open the form. On Upload Blank PDF, keep Basic Auth enabled and create/select a separate Basic Auth credential for the people preparing forms. This login is different from your PDFops API key. Publish the workflow, select Production URL in the form node and open that address. Sign in with the form login. The demonstration uses a disposable self-hosted instance.
Upload the blank source. Choose the downloaded blank source PDF and submit. The next page lists eight candidate fields for this example. Keep the PDF beside it and compare names, types and positions. Coordinates are PDF points measured from the bottom left, not screen pixels. Automatic candidates still require human inspection.
Approve one field and inspect the result. Check only Full name and submit. Create Blank Master adds that approved field; Read Back Master reopens the result; Check Master Field Names verifies its saved name and type. This example should return one text field named Full name, with an empty value. Save approved-master.pdf from the form download.
Check placement and fill a separate copy. Open your downloaded master in the PDFops Playground. Click Full name to inspect its placement and confirm it is empty. Enter Example Supplier, click Fill PDF and download the filled copy. Open it and confirm the name appears in the intended place. Start over and reopen the original master: its field must still be blank.
Reuse the exact field names. Keep the blank master as your reusable input. For this example the field key is Full name, including its space and capital F. The recurring Sheets workflow later on this page uses a different sample with applicant_name. If you replace its PDF with your new master, inspect the new field names and update the mapping before processing rows. The preparation tutorial does not demonstrate a Sheets run.
Check cancellation and recovery
No fields selected. Restart the upload and submit the review with every checkbox empty. Expect No fields approved. The original stays unchanged and no master should be created or downloaded.
Image scan or reported incomplete detection. If detection reports an incomplete result or no usable candidates, expect Manual review needed and no master download. This check cannot discover every omitted field: compare every label, proposed name, type and position with the source before approval. Use a digital original or add fields manually. For a large document, split it into smaller sections, retry and reconcile the complete form; a partial detection is not a checked full master.
Processing failure. Expect Could not prepare a master, with no delivered master. Read the failed workflow step, check the selected PDFops credential and confirm the source opens without a password. Correct the cause before retrying.
Incorrect placement or names. Do not start bulk fills. Correct the source or field definition, prepare another blank master and repeat the visual and saved-field checks. Matching names and types alone do not prove correct placement.
Set it up
Find the form's field names. Open the blank PDF in the free Form-Field Inspector, or run the Inspect PDF Form Fields action. Labels printed on a page often differ from the field names inside the file. The sample form prints Full name, but its field is called applicant_name.
Set up the sheet columns. Put one header per column in row 1 and the values below. The n8n workflow reads every column by its header, so name each column after the PDF field it fills. In Zapier you pick the column for each field once, inside the action, so any headers work.
Get a free key and connect PDFops. Create a free API key, then paste it into the PDFops connection in Zapier or the PDFops credential in n8n.
Test on a copy of the sheet with one row. Make a copy of the sheet that holds a single row, with your own address in its email column, and point the template at the copy and at your blank PDF. In the n8n workflow, open the Set Batch Config node and change maxRowsPerRun from 50 to 1 before you run anything: every row with a blank status counts as pending, and each pending row is filled, saved to Drive and emailed to the address in its row, so a first run on a real sheet would email up to 50 people. Run it once by hand, and keep the workflow inactive, so the Schedule Hourly trigger never fires on its own, until the result is right, because an active workflow runs every hour. In Zapier, testing the Dropbox step can upload a real file to the folder you chose.
Column to field mapping
Each row becomes one POST call to /api/fill-form (endpoint reference). In Zapier you choose the column for each form field once, in the PDFops step; after that every new row fills the same fields. In n8n every column is read by its header, so a column named like a form field fills that field. The example row fills the blank template PDF, and the result is flattened, so its fields are no longer interactive.
Sheet columnPDF fieldExample value
applicant_nameapplicant_nameMaya Okafor
email_addremail_addrmaya.okafor@example.com
dobdob1991-04-17
addr_line1addr_line142 Harbour Street
citycityHalifax
postal_codepostal_codeB3H 1A1
phone_nophone_no902-555-0143
notesnotesRow 2 of the intake sheet.
Templates
Zapier
Open the template in Zapier: Fill PDF forms in PDFops from new Google Sheets rows and upload them to Dropbox. It is also on its listing page.
Steps: Google Sheets (New Spreadsheet Row), then PDFops (Fill PDF Form), then Dropbox (Upload File).
Before you run it. Testing the Dropbox step can upload a real file to the folder you picked.
Needs a paid plan. Three steps (trigger, PDFops, Dropbox). Zapier's Free plan allows two-step Zaps only (zapier.com/pricing.md, read 2026-11-27). A trigger plus the PDFops step alone would run on Free but would deliver the PDF nowhere.
Get a free PDFops key for Zapier
n8n
Open the template on n8n: Fill PDF forms in bulk from Google Sheets with PDFops and Google Drive. Or download the workflow JSON and import it. It uses the n8n-nodes-pdfops community node.
Steps: Schedule (Schedule Hourly), then Google Sheets (Read Sheet Rows, keep rows with a blank status), then PDFops (Inspect PDF Fields once, check every column header), then PDFops (Fill Form for Row), then Google Drive (Save Filled PDF to Drive), then Gmail (Email Filled PDF), then Google Sheets (Write done or the error back to the row), then Slack (Post Run Summary).
Before you run it. Each pending row is emailed to the address in its email column, and a summary is posted to the Slack channel you set. Set maxRowsPerRun to 1 in Set Batch Config and test on a copy of the sheet first.
Can run without a paid plan. n8n has no free Cloud plan (n8n.io/pricing, read 2026-11-27). The workflow runs without a licence fee on self-hosted Community Edition with the n8n-nodes-pdfops community node installed, and with a free PDFops key.
Get a free PDFops key for n8n
Frequently asked
Which columns does the sheet need?
For n8n, one column for each PDF field you want filled, named exactly like the field; a header that matches no field stops the batch, so remove or rename helper columns. The n8n workflow also expects status and pdf_link columns, and an email column for the copy it sends. For Zapier you choose the column for each field in the action, so the headers can be anything.
Can I fill a PDF that has no form fields?
Prepare the blank master first using the review workflow above. Once it contains fillable AcroForm fields, the same master can receive any number of rows.
Do these templates run on free plans?
The Zapier template has three steps, and Zapier's Free plan allows two-step Zaps, so it needs a paid Zapier plan. The n8n workflow runs on a self-hosted n8n, which has no licence fee, because n8n Cloud has no free plan. A PDFops key itself is free.
How is a checkbox or dropdown filled?
A checkbox takes the text true or false. A dropdown or radio group takes one of the field's listed options exactly. The sample form used here has text fields only.
Try it
Get a free API key, then open a template above. You can also test your own PDF in the playground first.
Related guides: Turn a Stripe payment into a PDF invoice and email it · Turn a Google Sheets row into a PDF invoice · Merge every PDF in a Google Drive folder into one file
← PDFops home · Zapier guide · n8n guide · Free key · Pricing
---
# Extract invoice data from PDF attachments into Google Sheets | PDFops
Source: https://pdfops.dev/guides/invoice-pdf-extract-to-google-sheets
Guide
Extract invoice data from PDF attachments into Google Sheets
Invoice PDFs in, one sheet row each
Get a free API key
See the workflow
The PDF it reads. Open the sample invoice PDF. It has a text layer, which is what makes it readable.
PDFops reads the text, a model fills the columns
/api/extract-text, once per PDF. Done by the n8n workflow below.
RowVendorTotal+6 more
2Harbour Supplies Ltd116.60…
The row it adds to the sheet
Supplier invoices arrive as PDF attachments and end up re-typed into a spreadsheet. This n8n workflow reads their text with PDFops, asks a chat model for invoice fields, then appends one row per PDF to Google Sheets. Rows needing attention also go to Slack. It checks required fields, arithmetic and whether the total appears numerically in the extracted text. These checks do not establish accuracy: read every row against its PDF before paying. Image-only PDFs are recorded as Needs OCR; PDFops does not perform OCR.
What you get
Each PDF in labelled Gmail mail produces a sheet row with invoice fields, source metadata, a Status and a Reason. A matching Source id is skipped on the normal polling path. A repeated vendor and invoice number is flagged for review rather than silently discarded. See the sample invoice PDF.
Set up a Gmail invoice review ledger
This tutorial uses a controlled manual run and rerun. Test your Gmail polling and separate Error workflow before unattended use.
Your browser cannot play this video. Download the tutorial or read the transcript below.
Jump to a step0:00 An actual invoice row, then a deliberate rerun
0:16 Build a controlled first run
0:31 Get the complete matching package
0:47 Check Extract Text and the installed version
1:05 Import into an empty workflow
1:21 Select Gmail and Sheets connections
1:39 Select the PDFops credential
1:56 Choose the model and API mode
2:17 Connect the test Slack channel
2:31 Prepare all sixteen headers
2:48 Set the scratch destinations and limits
3:11 Look up one controlled test email
3:31 Use the Gmail API id in Set Message Id
3:49 Select Reprocess One Email before execution
4:05 Actual manual replay with the real provider binding
4:24 Compare the actual row with the supplied invoice
4:42 Verify line items, tax and the total
5:03 Treat Extracted as a check, not an approval
5:20 Rerun explicitly and inspect both appended rows
5:39 Read the duplicate warning
5:55 Test the exception paths on your own inputs
6:15 Reconcile earlier rows before reprocessing
6:36 Test automatic failure handling separately
6:53 Complete the checks before enabling polling
7:13 Use the complete matching guide and sample
Download the tutorial · Download captions
Read the tutorial transcript
This PDF attachment became a complete row in the sheet. The first read passed the checks. An explicit rerun added a second row. Marked check and sent a possible duplicate notice to Slack.
We will configure the Gmail, PDFops model, sheets and Slack connections, then inspect a controlled manual test. Keep the Gmail trigger inactive while you set this up.
Open the invoice guide, download the workflow, the 16 column header row and the complete example. The example is for comparison. Do not put it in your processing sheet.
Use a PDFops community node that provides extract text. This example uses version 0.6 in self-hosted n8n. The guide links the separate cloud installation instructions.
On an empty workflow, paste the downloaded JSON and save it. Keep both starting points Gmail trigger for polling, and reprocess one email for a deliberate manual test.
Select your Gmail connection on Gmail trigger and get Gmail message. Select your Google Sheets connection on read existing rows and append row to sheet. Here those connections already exist.
On extract PDF text, choose your PDFops credential. Keep its API key inside the credential. This step reads the PDF text layer. It does not run OCR.
On Chat Model, select a compatible model connection. The template uses GPT-4.1 mini at temperature zero. The guide explains credentials and API modes.
A different endpoint alone does not establish compatibility. On Notify in Slack, choose your Slack connection. Invite the app to the channel you will use for test notices.
Keep the test channel separate from your normal alerts. Create an empty scratch sheet. Paste the downloaded header row into cell A1.
All 16 columns are required, including Source id, Status, Reason and Line items. Open Set Run Options. Set the spreadsheet address to your scratch sheet and sheet name to its exact tab name. Set the notification channel to your test channel.
For the first test, keep the character limit at 20,000 and amount tolerance at 0.02. Use one controlled message with the sample invoice attached.
In a separate Gmail Get Many step, search its test label and unique subject. Limit the result to one and include both read and unread messages.
Confirm the subject in the result and copy its Gmail message identifier. Paste that value into message id in Set Message Id. Use the Gmail identifier rather than the Message ID email header.
Open Select trigger node at the bottom of the editor. Choose Reprocess One Email. Check that the Execute Workflow button names the selected starting point before you click it.
Run the controlled test. This native execution fetched the existing lab message, selected its PDF attachment, extracted the text and appended one row.
It did not enable automatic polling. Compare the row against the original PDF. Check Harbour supplies the document number and its date.
The currency is euros. The two line items total 106 before tax. Tax is EUR 10.60, and the final total is EUR 116.60. Check quantities, unit prices and serialized line items too.
The model can return values that add up correctly, but are still wrong. Extracted means the required fields. Amount checks and total in text check passed.
It is not approval to pay. The workflow records a row but sends no Slack message for this status. now deliberately rerun that same message in the scratch sheet.
Manual reprocessing appends again. It does not replace the first row. The existing vendor and invoice number produce a possible duplicate reason.
The second row is marked check. The real Slack notice identifies the duplicate and links to the sheet. Inspect both rows and their reasons before deciding what to keep.
An image only PDF needs OCR. Incomplete text, missing values and amount mismatches need checking. Extraction or model failure records error.
The guide includes the exceptional input checks to run on your own instance. After a partial failure, a message rerun reads every PDF attached to that message.
Reconcile rows already appended. The manual control cannot target just one attachment, and the append step is not automatically retried.
Before enabling polling, configure a separate error workflow and test it with a controlled automatic run. An editor run cannot trigger that error handler.
The guide gives the setup and test sequence. After your rows and failure alerts are correct, choose the intended sheet and channel, confirm the Gmail search, then publish that begins real polling.
Publishing and automatic failure testing are not replayed in this manual demonstration. Start with the matching guide, header row and sample invoice.
Verify the complete result against the PDF. Keep the first tests isolated and review the first automatic run before relying on the intake.
Download transcript.
Set it up
Download the complete sheet header row · Download the full example row. The example CSV uses invoice values observed in a native replay of the supplied PDF. Mail metadata, filename and processing time are placeholders; model wording can vary on another run. Use the header-only file for setup, keep the example out of the processing sheet and compare your own row with its PDF.
Install and import into a test workflow. Use a PDFops node version exposing Extract Text. The replayed self-hosted setup uses n8n-nodes-pdfops 0.6.0. Import the downloaded JSON into a fresh workflow, or copy the JSON and paste it onto an empty canvas, then save. Keep Gmail Trigger inactive during testing. For n8n Cloud, an instance owner/admin installs the available community node from the nodes panel; confirm Extract Text is available before importing.
Connect all five integrations. Select your Gmail credential on Gmail Trigger and Get Gmail Message; your Google Sheets credential on Read Existing Rows and Append Row to Sheet; your PDFops API credential on Extract PDF Text; your OpenAI API credential on Chat Model; and your Slack credential on Notify in Slack. The supplied model is gpt-4.1-mini with temperature 0. Invite the Slack app to your chosen test channel. Keep keys in credentials rather than node values or shared JSON. n8n Cloud supports managed Google sign-in; self-hosted Google connections need an OAuth client. Follow the credential references below for Google, Slack and OpenAI. For an alternate model provider, use its supported n8n node or API mode rather than only changing the endpoint URL.
Create the sheet with all sixteen headers. Download the header row above and paste it into cell A1 of an empty sheet tab named Invoices, or import the tab-separated file. Do not add the example row to the live processing sheet: it is a comparison target. The header check accepts any order, but requires every column. The workflow reads the whole sheet each run and skips recorded Source ids on the polling path.
Set the five run options. In Set Run Options, set spreadsheetUrl to your scratch Google Sheet URL, sheetName to Invoices and notifyChannel to your test Slack channel. Leave maxTextChars at 20000 and amountTolerance at 0.02 for the first test. The character limit caps text sent to the model and adds a Check reason when it cuts text. The tolerance governs the amount checks; 0 requires exact minor-unit sums.
Label one controlled test message. Create a Gmail label named invoices and apply it to a test message with the sample invoice PDF attached. The supplied trigger search is label:invoices has:attachment; Pick PDF Attachments selects PDFs only. Keep Gmail Trigger inactive while you prepare and inspect this manual test.
Find the Gmail API message id. In a separate temporary workflow, add a Gmail node using the same lab/test connection. Choose Resource Message and Operation Get Many. Turn Return All off, set Limit to 1, use Search to select the test label and its unique subject, and set Read Status to Unread and read emails so an already-opened test message is included. Execute step, confirm the returned Subject and copy its id. Paste that id into messageId in Set Message Id in the imported intake workflow. It is the Gmail API id, not the Message-ID email header. The temporary lookup workflow does not call PDFops or the model.
Run one PDF and inspect the complete row. At the bottom of the editor, open Select trigger node, choose Reprocess One Email and click Execute workflow. Confirm the button names that manual start before running it. Compare Vendor, Invoice number, Invoice date, Currency, Total, Tax and the serialized Line items with the PDF. The sample has two items totalling 106.00 before tax, tax 10.60 and total 116.60. Its Currency is EUR. Expect an Extracted row with no Slack message only when the required fields, amount checks and total-in-text check pass. The model can still return wrong but self-consistent values.
Test exceptional inputs and notifications. Use a separate image-only PDF, a non-invoice PDF and an invoice already recorded in the sheet. Inspect Status and Reason before relying on Slack. Needs OCR means no page has readable text. Check includes missing values, amount mismatches, incomplete text, a total absent from the text or a possible duplicate. Error records extraction or model failure. A Slack failure leaves the appended sheet row in place and fails the run after processing; the sheet remains the record.
Handle reprocessing deliberately. Reprocess One Email bypasses Source-id skipping and appends a new row; it does not update or replace the old row. Existing vendor/invoice-number matches can still produce a possible-duplicate reason. Keep test reruns in a scratch sheet. If a published run stops midway, identify the PDFs not recorded and manually reprocess their message ids. The append step is not retried automatically because a retry can duplicate a row. A message rerun processes every PDF attached to that message, including PDFs already appended before a partial failure. Reconcile those existing rows; the control cannot target just one attachment.
Configure the error workflow. Open this workflow’s Settings and choose an Error workflow. To create one, start another workflow with Error Trigger, connect a notification step and include the failed workflow name, any available execution link and error message in its alert. Save and Publish the error workflow, then select it in the invoice workflow. Error Trigger only responds to failures of automatic runs; a manual editor run cannot test it.
Verify alerts with a controlled automatic test. Use a scratch copy and narrow Gmail Trigger to a unique test label before publishing it. With only controlled test messages in scope, check that a normal run appends the expected row and that an intentional automatic failure invokes the selected error workflow. Stop the scratch workflow after the test and restore the correct settings. Read the failed execution as well as the alert; trigger failures may have no execution link.
Publish the intended intake workflow. Once the rows and failure alerts are correct, set the intended spreadsheetUrl, sheetName and notifyChannel, confirm the Gmail search, then Publish. Gmail Trigger polls every minute and starts real processing of matching messages. Watch the first run, compare its sheet rows with their PDFs and confirm that only rows needing attention are announced in Slack.
What lands in the sheet
Each PDF becomes one POST call to /api/extract-text (endpoint reference). The call returns the text of each page, and the chat model fills the fields from that text. The table shows eight of the sheet's columns for the sample invoice, and says which values appear in the PDF's own text; the setup steps list every column. The sample row shows what a correct read looks like, and a model can still get a real invoice wrong.
Sheet columnExample valueFound in the PDF text?
VendorHarbour Supplies LtdIn the sample PDF text
Total116.60In the sample PDF text
Invoice numberHS-2026-0417In the sample PDF text
Invoice date2026-11-12In the sample PDF text
CurrencyEURIn the sample PDF text
Tax10.60In the sample PDF text
Line item count2Set by the workflow
StatusExtractedSet by the workflow
Workflow
n8n
Download the n8n workflow JSON: Extract invoice data from PDF attachments to Google Sheets with an AI step and checks. It is not in n8n's template gallery, so import the file into your own n8n. It uses the n8n-nodes-pdfops community node.
Steps: Gmail (New email with the invoices label and a PDF attached), then Google Sheets (Read the sheet, check its header, skip PDFs already in it), then PDFops (Extract Text from each PDF), then OpenAI (A chat model fills the invoice fields from that text), then n8n (Set a status: Extracted, Check, Needs OCR or Error), then Google Sheets (Append one row per PDF), then Slack (Post every row that is not Extracted).
Before you run it. Keep Gmail Trigger inactive while testing. Point spreadsheetUrl at a scratch sheet and notifyChannel at a test Slack channel. Run Reprocess One Email with one known Gmail API message id and inspect the appended row before publishing. Each PDF goes to PDFops; eligible text goes to the configured model. Check, Needs OCR and Error rows are written to Sheets before Slack notification. The total receives a numeric text-presence check; other fields have no document-presence check, and a matching number does not prove it is the invoice total. Read every row against its PDF before payment. After a partial run, manually reprocess emails whose PDFs were not recorded.
Hosting and model usage. Choose an n8n Cloud plan or self-hosted n8n; hosting and model usage are separate costs. A PDFops free key can cover calls within its quota. The supplied Chat Model uses gpt-4.1-mini through your OpenAI API credential, with usage charged to that account. You also need Gmail, Google Sheets and Slack access. Reprocessing repeats extraction and eligible model calls; extraction can retry after a failed attempt.
Get a free PDFops key for n8n
Setup and usage references: Google OAuth setup · Slack credential setup · OpenAI credential setup · Model API mode · Cloud node installation · Gmail message IDs · Error workflows · Testing Error Trigger · n8n hosting plans · Model usage pricing · PDFops quota.
Separate workflow: invoice tables to Excel
For digitally generated invoices, you can extract aligned tables directly into Excel. Each detected table gets its own worksheet. Compare quantities, amounts and column positions with the PDF before using them. A scan needs a digital original or OCR followed by inspection. The raw workbook API can omit scanned pages without setting the truncation flag; the n8n workflow below adds a separate page-coverage check before building Excel.
Export invoice tables with source-page review
Follow the protected upload, page-scope review, confirmation and workbook inspection.
Your browser cannot play this video. Download the tutorial or read the transcript below.
Jump to a step0:00 Result and scope
0:29 Matching workflow and examples
0:44 Install and import
1:18 Credentials and output settings
2:06 Publish the protected form
2:23 Upload and confirm the scope
3:11 Inspect the actual workbook
3:44 Cancellation and mixed pages
4:28 Two layouts, two worksheets
4:43 Limits and source checks
Download the tutorial · Download captions
Read the tutorial transcript
These two invoice lines are now in an Excel workbook. The quantities, unit prices and amounts are preserved as text, ready to compare with the original PDF.
This tutorial uses a protected n8n upload form and PDFops. Start with a digitally generated invoice. This is table extraction without OCR or accounting validation.
Open the guide at the separate invoice tables section. Download the upload workflow, the sample invoice and the expected workbook. Keep the recovery examples for later.
In self-hosted n8n, open settings and community nodes, install the PDFops package and check version 0.6. Cloud installation follows the linked guide and is not replayed here.
Create an empty workflow. Copy the downloaded JSON and paste it onto the canvas. Then save, keep the source. Coverage, export and recovery sections together.
Open read selected pages and choose your PDFops credential. This first step reads the selected pages as JSON, so the workflow can inspect their coverage before offering Excel.
On extract table workbook, choose the same PDFops credential. The template already requests an Excel workbook and names its output binary workbook. Keep those settings.
Open upload invoice, select a separate basic auth credential for the people allowed to upload. Here the example login already exists.
It is different from your PDFops API key. Save, then publish the workflow, open upload invoice again and select production URL. Use that protected form address.
The test URL is only for a listening test session. Open the production form with the uploader login. Choose the sample invoice and enter one in pages.
Leave pages empty only when you intend to check the whole document. Submit and read the export scope. For this sample, page 1 contains one detected table and three rows, including its header, check that no intended page was excluded.
Compare the selected source page before exporting. Select export these selected pages. Then submit to download the workbook. A successful export uses two PDFops calls.
Coverage first, workbook second. Reopen the downloaded file. Its sheet is page one table one. Compare both item rows and all four columns.
The workbook does not calculate totals for you. Packing tape has quantity 4, unit price 18 euros 50 and amount 74 euros. Courier boxes have quantity 10, unit price 3 euros 20 and amount 32 euros.
To cancel, submit the scope review without selecting the export box. The workflow stops with export cancelled. Before the workbook creation step, no file is delivered.
Now try the mixed sample with pages empty. Its second page is an image. The coverage check withholds Excel and asks you to review the selected pages.
If you deliberately need only its digital table page, upload that same sample with pages set to 1. The review names page 2 as excluded.
This is a partial export. The two layout sample checks another case, leave pages empty and inspect both pages in the scope review. The downloaded workbook has a separate sheet for each detected table.
For page or output limits, use smaller required ranges and reconcile every part. Smaller ranges do not restore clipped rows, columns or cells within a page. Correct the source or extract those manually.
A readable page can still contain scanned image content that is omitted. Coverage and table counts do not prove completeness or correct column boundaries.
Compare every delivered row with the source. Use the guide’s matching samples and expected workbook to test your own instance. Keep the form protected, confirm the export scope and inspect the result before using it.
Download transcript.
Download the n8n upload workflow, the sample invoice and the expected workbook. A successful export makes two API calls: JSON coverage first, workbook creation after you confirm the scope.
Set up the protected upload form
In a self-hosted n8n instance, open Settings, Community nodes and install n8n-nodes-pdfops@0.6.0 or a later compatible version. This setup was checked in self-hosted n8n. For Cloud, follow n8n's verified-node installation instructions; the Cloud setup has not been independently replayed here.
Open a fresh workflow and import the downloaded JSON. You can also copy its JSON text and paste it onto the empty canvas. Keep the yellow overview and the source, review, export and recovery sections.
Select your PDFops credential on Read Selected Pages and Extract Table Workbook. The first reads JSON; the second returns an Excel binary named workbook. The template already supplies those settings.
On Upload Invoice, create and select a separate Basic Auth credential for the people uploading invoices. This login protects the form; it is different from your PDFops API key. The uploaded PDF is sent to PDFops for extraction.
Run the form in test mode and open its test URL. Choose the sample PDF and set Pages to 1. Use positive page numbers or closed ranges such as 1-3,5. Leaving Pages blank checks the whole document.
On Review the export scope, check the selected/excluded pages, table count and row counts. The sample has one table and three rows including its header. Check Export these selected pages and submit to download Excel. Submit unchecked to cancel before workbook creation.
Open the workbook next to the source. On Page 1 Table 1, packing tape has quantity 4, unit EUR 18.50 and amount EUR 74.00; courier boxes have 10, EUR 3.20 and EUR 32.00. Compare column positions and all rows before using them.
After the tests below pass, publish your workflow and use its protected production form URL. The test URL is for setup; publishing does not replace the form's Basic Auth protection.
Test recovery and intentional partial exports
Two invoices with different table layouts · expected workbook. Check the whole document and confirm the scope. Expect a worksheet for each invoice table. Row counts include the headers.
A digital invoice followed by an image-only page. Checking the whole document must withhold the workbook. Explicitly selecting only the first page is an intentional partial export.
Enter 3-1 to check invalid-range recovery. The form must ask for a corrected selection without starting extraction.
Leave the export decision unchecked to check cancellation. No workbook should be created or downloaded.
A selected image-only page, non-table page or missing page withholds the download and explains what to fix. For page, output or sheet limits, retry smaller required page ranges and reconcile every part. Clipped rows, columns or cells within one page need source correction or manual extraction; selecting fewer pages will not restore that missing content. For a PDF with a separate image-only page, checking the whole document must withhold the workbook; selecting only its digital table page is a deliberate partial export.
Check the original: a page with both readable text and scanned image content can still omit the image content. Readable text and detected tables do not prove that all invoice data or accounting totals are correct. The example workbook preserves cell text; it does not calculate or validate your accounting.
Updated December 3, 2026: the n8n download now checks source-page coverage before producing Excel, addressing mixed digital/scan PDFs that could previously return an incomplete workbook.
For Make, follow the built-in HTTP module steps. Invited workspaces with the private PDFops app can also import the native blueprint and bind their connection. For Zapier, use the action mapping. Check the truncation output before delivering the file.
Frequently asked
Does it read scanned invoices?
No. PDFops has no OCR. A scanned page is a picture with no text stored in it, so the call returns no text for it. A PDF with no text on any page is recorded as Needs OCR: its row is still appended to the sheet and announced in Slack.
How accurate is the extraction?
Accuracy is not measured here. The workflow checks required fields and arithmetic, and checks whether the total appears numerically in extracted text. It does not prove that the number is labelled Total or that other fields match the document. Hidden or unusual PDF text can produce wrong values. Compare every row with the PDF before payment.
What do the statuses mean?
Extracted: required values are present, the line arithmetic reconciles within amountTolerance and the total appears numerically in the text. Check: required values or amounts fail, text is partial, the total is absent from text, or the vendor/invoice number is a possible duplicate; Reason explains which. Needs OCR: no page has readable text. Error: PDF extraction or the model step failed. None of these statuses authorizes payment.
Can I run it on n8n Cloud?
Cloud instance owners/admins can install available community nodes from the nodes panel. Confirm the installed PDFops version offers Extract Text, then bind all credentials and test your own sheet and channel. The package replay here uses self-hosted n8n with PDFops 0.6.0; the full Cloud setup has not been independently replayed.
Is this workflow in the n8n template gallery?
No. It is a downloadable workflow file on this page, so there is no n8n gallery page for it. Download the JSON and import it into your own n8n.
Where does my data go?
Each PDF is sent to PDFops, and its extracted text is sent to the chat model provider you choose. The workflow uses an OpenAI model by default and any chat model n8n supports can replace it. The rows go to your Google Sheet, and Slack gets a message for each row that is not Extracted.
What happens if a run fails halfway?
The Gmail Trigger has already moved past those emails, so the ones not yet recorded are not picked up again. Paste each message id into Set Message Id and run Reprocess One Email by hand. Every Error and Check row carries a link to its email. The append step is not retried, because a retried append can write a row twice. Reprocessing a message repeats all its PDF attachments, including any already appended. Compare the resulting rows and their Source ids rather than assuming only the missing attachment was replayed.
Does it run on a free plan?
Hosting, PDFops quota and model usage are separate. Choose n8n Cloud or self-hosting; a PDFops free key covers calls within its quota. The supplied OpenAI model uses your API account. Reprocessing repeats the relevant calls, so test a single PDF first and check current provider pricing.
Try it
Get a free API key, then open a workflow above. You can also read the extract-text reference first.
← PDFops home · n8n guide · Free key · Pricing
---
# Merge every PDF in a Google Drive folder into one file | PDFops
Source: https://pdfops.dev/guides/merge-pdfs-in-google-drive-folder
Guide
Merge every PDF in a Google Drive folder into one file
A folder of PDFs in, one PDF out
Get a free API key
See the workflow
PositionFile name
101-harbour-supplies-invoice.pdf
202-maple-couriers-invoice.pdf
303-north-print-invoice.pdf
One Drive folder of PDFs
PDFops merges the files
/api/merge, once per run. Done by the n8n workflow below.
The one PDF it becomes. Open the merged PDF.
Weekly receipts, signed forms and report pages tend to pile up in a shared Drive folder, and Drive does not merge PDFs by itself. PDFops merges two or more PDFs into one, so a workflow can list the folder, fetch each file and join them. This page offers one n8n workflow as a download, the page order it produces, and the limits to plan around.
What you get
Every week, all the PDFs in one Google Drive folder are joined into a single file in file-name order, saved to a second folder and emailed as one attachment. See a merged sample PDF.
Build an ordered Drive PDF packet
This tutorial demonstrates a manual merge and saved Drive output. Email is disabled and the schedule is inactive in the demonstration; test both separately before unattended use.
Your browser cannot play this video. Download the tutorial or read the transcript below.
Jump to a step0:00 Result: three PDFs become one ordered packet
0:31 Get the matching workflow and sample PDFs
0:47 Install PDFops in self-hosted n8n
1:05 Import and keep the workflow inactive
1:20 Select the PDFops credential
1:35 Select all three Drive credentials
2:03 Set the source folder
2:22 Separate outputs and avoid feedback
2:39 Configure Gmail and a controlled recipient
2:57 Choose lexical file-name order
3:14 Check the schedule and time zone
3:31 Run the scratch Drive workflow
3:52 Compare the saved packet page by page
4:11 File, page and combined-byte limits
4:29 Notice branches and error handling
4:47 Choose the repeat-run policy
5:05 Verify email delivery before scheduling
Download the tutorial · Download captions
Read the tutorial transcript
Three separate PDF files become one ordered packet. The source files stay in their folder, and a new merged PDF is saved to a different output folder.
This tutorial follows the downloadable n8n workflow and the guide with three sample PDF files. It uses a disposable self-hosted instance, the published PDFops node, and our own scratch Drive folders.
Open the merge PDF files in Google Drive guide. Download the workflow and the three input PDF files. The expected output gives you a matching packet for comparison.
In Settings, open Community nodes. Install n8n-nodes-pdfops and confirm version 0.6. This is self-hosted setup. Cloud setup follows the guide and is not replayed here.
Create an empty workflow, copy the downloaded JSON, and paste it onto the canvas. Save it. Keep the workflow inactive while you configure and test your scratch folders.
Open the merge node. Select your PDFops API credential. This connection is already available here. Obtain your own free key through the guide and keep its value private.
Open the list node. Choose your Google Drive connection. Open Download PDF. Select the same Google Drive connection. Open Save Merged PDF to Drive.
Choose it again. Use an account that can read the source folder and write to the output folder. Open the merge settings node. Replace the folder address with your scratch source folder address.
It should contain only the PDF files you intend to bundle. Files inside nested folders are not included. Set output folder ID to a different scratch folder.
Keep the output name starting with the output prefix, merged. Earlier files with that prefix are skipped, so they cannot feed back into another bundle.
The original workflow also needs a Google Mail connection and your own recipient address. This recording turns off both email nodes in the disposable test copy.
It proves the Drive output without sending an email. The workflow sorts by file name before downloading. Prefix files with 01, 02, 03 to choose the page order.
This is lexical ordering, so unpadded numbers can sort unexpectedly. Every Monday starts the scheduled run at 8 in the time zone of your instance.
Leave this workflow inactive until testing is complete. This recording runs manually and does not activate that schedule. Run the scratch copy once from the editor.
Drive lists the PDF files. The workflow checks the batch, downloads the files in order, and PDFops joins them. Then Drive saves the new packet.
Open the saved PDF and compare every page. Here the packet has three pages. Harbour Supplies first, Maple second, North Print third. Check the document numbers against the three source files.
One merge accepts two to twenty PDF files, at most 2,000 pages, and the per-file byte limit shown in the guide. The workflow stops above 4.4 million bytes together, below the request limit.
Too few files, too many files, or a merge or save error follows the notice branch when Google Mail is configured. A Drive list or download failure stops the run instead.
Set an error workflow for those errors. The workflow does not archive the source folder. A later run merges the same unchanged PDF files again.
Decide when to move or empty completed inputs yourself. Keep the source files until you have checked the packet. Use the matching workflow, input files, and expected packet from the guide to test your own folders. Restore the full email delivery setup and verify its attachment before you activate the real schedule.
Download transcript.
Set it up
Download the source PDFs: 01-harbour-supplies-invoice.pdf · 02-maple-couriers-invoice.pdf · 03-north-print-invoice.pdf. Keep those numbered filenames when uploading to your scratch folder; compare the result with the expected merged PDF.
Download and import into a scratch workflow. Download the n8n JSON and matching sample PDFs from this guide. Use a fresh self-hosted workflow with n8n-nodes-pdfops 0.6.0, or follow the linked Cloud installation guide and verify Merge is available. Paste the JSON onto an empty canvas and save. Keep Every Monday unpublished while testing.
Name the files in the order you want. The workflow sorts the PDFs by file name before it merges them, so the first name sorts first. Prefix the names with 01-, 02-, 03- to control the order. Only PDFs directly inside the folder count; files in sub-folders are not read.
Connect PDFops on the merge step. Select your PDFops API credential on Merge All PDFs. Keep the key inside the credential rather than a node value or shared JSON.
Connect all three Drive steps. Select the same Google Drive credential on List PDFs in Folder, Download PDF and Save Merged PDF to Drive. Use a connection that can read the scratch source folder and write to the scratch output folder. List PDFs in Folder uses the supported All fields option so file IDs, names and sizes are available for filtering and the byte guard.
Connect Gmail for delivery and notices. Select your Gmail credential on Email Merged PDF and Notify Recipient of Failure. This can be a different Google account from your Drive connection. For the first test, send only to a mailbox you control.
Set the five merge options. In Set Merge Options, set folderUrl to the source Drive folder URL, outputFolderId to the separate output folder ID, recipient to your test mailbox, outputName to a distinctive PDF filename and outputPrefix to merged-. Keep outputName beginning with that prefix. No source file is moved, archived or deleted.
Plan for the limits. One merge takes 2 to 20 PDFs, each under 4 MiB (4,194,304 bytes), up to 2,000 pages in all, and all files together must stay under 4.5 MB (4,500,000 bytes); the workflow stops at 4.4 MB. With fewer than 2 or more than 20 PDFs, or too many bytes, it emails a notice instead of merging. Source files are not archived automatically; choose the repeat-run policy below.
Run the manual start once. Choose the workflow’s Manual Test start in the editor and execute it with two or three matching samples. Leave the weekly schedule unpublished. Inspect the completed execution as well as Drive and the inbox: a green merge step alone does not prove both deliveries succeeded.
Reopen both delivered copies. Download the saved Drive output and the actual email attachment. The guide’s three samples should produce three pages in this order: HS-0412, MC-2208, NP-1930. Compare page contents and order, confirm the attachment filename and check the source PDFs remain untouched. The complete owned-lab test independently compared the received attachment with the saved packet byte for byte.
Set an error workflow. The workflow emails a notice when the folder holds fewer than 2 or more than 20 PDFs, and when Merge All PDFs, Save Merged PDF to Drive or Email Merged PDF fails. It sends no notice when List PDFs in Folder, Filter Prior Outputs, Sort by File Name or Download PDF fails, for example on a wrong folder URL or an expired Drive login: the run just stops. Choose an error workflow in the workflow's settings in n8n so those failures reach you. The notice is sent through the same Gmail credential as the merged PDF, so if Gmail itself is down or its login has expired, no notice can be sent either.
Choose the repeat-run policy before publishing. This workflow creates a new packet each run, even when the source PDFs are unchanged. It does not remember a previous batch or suppress a repeated email. Before each scheduled run, deliberately retain the folder as a repeatable snapshot or replace its contents with the next batch. Reconcile repeated outputs and messages after a partial failure; rerunning is not an update of the earlier delivery.
Publish only the intended schedule. After both deliveries and failure alerts are tested, set the intended folders and recipient. Open Every Monday and confirm Monday at 08:00 in your n8n instance’s time zone. Save, then Publish. This enables real scheduled delivery. Automatic schedule/error-handler behavior is separate from the manual lab replay.
Files in, one file out
The files go in one POST call to /api/merge (endpoint reference), and the pages come back in the order the files were sent. The n8n workflow sorts the files by name before it merges them, so prefix names with 01-, 02-, 03- to choose the order.
File in the folderPosition in the merged PDF
01-harbour-supplies-invoice.pdf1
02-maple-couriers-invoice.pdf2
03-north-print-invoice.pdf3
Workflow
n8n
Download the n8n workflow JSON: Merge every PDF in a Google Drive folder into one file and email it. It is not in n8n's template gallery, so import the file into your own n8n. It uses the n8n-nodes-pdfops community node.
Steps: Schedule (Every Monday), then Google Drive (List the PDFs in the folder, drop earlier bundles, check there are 2 to 20), then Google Drive (Download each PDF in file-name order), then PDFops (Merge All PDFs), then Google Drive (Save the merged PDF to a separate folder), then Gmail (Email the merged PDF, or a notice when something fails).
Before you run it. Every Monday at 08:00 (in your n8n's time zone) the Every Monday trigger starts the workflow, which emails the merged PDF to the address in the recipient field of Set Merge Options. Before the first run put your own address in recipient, point folderUrl at a scratch folder holding two or three test PDFs, and set outputFolderId to a different, empty scratch folder. Run it once by hand from the editor, and keep the workflow inactive until the result is right. It sends a notice to the same address only when the folder holds fewer than 2 PDFs or more than 20, or when Merge All PDFs, Save Merged PDF to Drive or Email Merged PDF fails. It sends no notice when List PDFs in Folder, Filter Prior Outputs, Sort by File Name or Download PDF fails, for example on a wrong folder URL or an expired Drive login: those stop the run silently, so set an n8n error workflow for them. The notice goes out through the same Gmail credential as the merged PDF, so an expired Gmail login sends nothing at all.
Can run without a paid plan. n8n has no free Cloud plan (n8n.io/pricing, read 2026-11-27). The workflow runs without a licence fee on self-hosted Community Edition with the n8n-nodes-pdfops community node installed, and with a free PDFops key.
Get a free PDFops key for n8n
Setup and usage references: Google OAuth setup · Cloud node installation · Error workflows · Testing Error Trigger · n8n hosting plans · PDFops quota.
Frequently asked
Is this workflow in the n8n template gallery?
No. It is a downloadable workflow file on this page, not a gallery template, so there is no n8n gallery page for it. Download the JSON and import it into your own n8n.
Does it run on a schedule or when a file arrives?
On a schedule: every Monday at 08:00 in your n8n's time zone. It merges whatever PDFs are in the folder at that moment. You can change the schedule in the Every Monday node.
Which failures send me a notice?
A notice goes to the recipient when the folder holds fewer than 2 PDFs (after earlier merged- files are ignored) or more than 20, and when Merge All PDFs, Save Merged PDF to Drive or Email Merged PDF fails. No notice is sent when List PDFs in Folder, Filter Prior Outputs, Sort by File Name or Download PDF fails: the run stops with no message. Set an error workflow in n8n to hear about those. The notice uses the same Gmail credential as the merged PDF, so an expired Gmail login sends nothing.
What stops one week's merged file being merged into the next?
The workflow saves the merged PDF to a separate output folder and also ignores any file whose name starts with the outputPrefix in Set Merge Options, merged- by default. Keep outputName starting with that prefix.
How many files and how large?
Two to twenty PDFs per merge, each under 4 MiB (4,194,304 bytes), 2,000 pages at most in total, and under 4.5 MB (4,500,000 bytes) for all files together. A larger set needs splitting into several folders and several merges.
Can I merge PDFs in a different order or from several folders?
The order is file-name order, so rename the files. The workflow reads one folder; to merge from several, import it once per folder with a different folderUrl.
Does it run on a free plan?
n8n has no free Cloud plan. The workflow runs on a self-hosted n8n, which has no licence fee, with the n8n-nodes-pdfops community node and a free PDFops key. It also needs Google Drive and Gmail accounts.
Try it
Get a free API key, then open a workflow above. You can also test your own PDF in the playground first.
Related guides: Turn a Google Sheets row into a PDF invoice · Turn a Stripe payment into a PDF invoice and email it · Fill a PDF form from Google Sheets
← PDFops home · n8n guide · Free key · Pricing
---
# Turn HTML into a PDF over a webhook in n8n | PDFops
Source: https://pdfops.dev/guides/n8n-html-to-pdf-webhook
Guide
Turn HTML into a PDF over a webhook in n8n
An order as JSON in, a PDF out
Get a free API key
See the workflow
Order fieldValue
orderIdORD-10482
customer.namePriya Raman
layoutinvoice
items2 lines
One order posted to the webhook
PDFops renders the HTML
/api/html-to-pdf, once per order. Done by the n8n workflow below.
The PDF it becomes. Open the rendered PDF.
Teams that need a branded PDF out of structured data usually end up running a headless browser or a PDF library of their own. PDFops renders HTML to PDF over one API call, so an n8n workflow can build the HTML from the data and hand it over. This page offers one n8n workflow as a download, the order it expects, and what to know before you run it.
What you get
A webhook in n8n takes an order as JSON, checks every field, builds an invoice or packing-slip page in HTML, and PDFops renders it to a PDF. The PDF comes back in the response, or is stored in Google Drive and emailed with the link in the reply. See a rendered sample PDF.
Set it up
Check your n8n has the node version it needs. Install or update the PDFops community node in n8n Cloud, or install n8n-nodes-pdfops from npm on self-hosted n8n. Version 0.6.0 includes the HTML to PDF operation this workflow uses.
Get a free key and add the credentials. Create a free API key and paste it into a PDFops credential. The workflow also needs a Header Auth credential for the webhook and a Slack credential for alerts. Add a Google Drive and a Gmail credential too if you will use delivery link.
Edit Set Document Options. In the Set Document Options node, set the company name, the accent colour, the page size (letter or a4) and the Slack channel for alerts. To change the layout, replace the HTML in the two builder nodes.
Test with Order Webhook inactive. Import the workflow and keep it inactive. In the editor, open Order Webhook, choose Listen for test event, and POST the order below to its Test URL with your Header Auth value. Use delivery download, so the PDF is the response and nothing is stored or emailed. Keep a valid customer.email in the order even so: the workflow checks it on every order, and a missing or invalid one gets a 400 before anything is rendered. Open the PDF and check the layout and the totals.
Activate and post to the Production URL. When the PDF is right, activate the workflow and post orders to the Production URL of Order Webhook. With delivery link, which is the default, the PDF is stored in Google Drive, emailed with Gmail, and the reply carries the Drive link.
Know what a render costs. A successful HTML render counts 5 requests against your PDFops quota, because rendering costs more than a plain PDF operation. Orders that fail the check never reach PDFops and count nothing.
The order the webhook takes
The order arrives as JSON, the workflow builds the HTML from it, and the HTML goes in one POST call to /api/html-to-pdf (endpoint reference) with page_size: "letter", margin: 36, print_background: true. The workflow checks the order first (lengths, ranges, up to 200 line items, a real issue date, one email address) and answers 400 with the list of issues before anything is rendered. The layout field picks invoice or packing-slip. Amounts are worked out in the currency's own decimals and rounded half up. customer.email is required on every order, delivery download included: without one valid address the reply is a 400 and nothing is rendered. This is the order behind the sample PDF.
{
"orderId": "ORD-10482",
"customer": {
"name": "Priya Raman",
"email": "priya@example.com",
"address": "12 Harbour Lane, Leeds"
},
"currency": "EUR",
"taxRate": 19,
"layout": "invoice",
"delivery": "download",
"notes": "Net 30.",
"items": [
{
"description": "Hydraulic seal kit (M12)",
"quantity": 3,
"unitPrice": 22
},
{
"description": "On-site fitting, per hour",
"quantity": 2.5,
"unitPrice": 65
}
]
}
Workflow
n8n
Download the n8n workflow JSON: Generate invoice or packing slip PDFs from JSON orders with HTML to PDF. It is not in n8n's template gallery, so import the file into your own n8n. It uses the n8n-nodes-pdfops community node.
Steps: Webhook (Order Webhook receives the order as JSON), then Code (Validate Order Payload, answering 400 with the issues), then Switch (Choose an invoice or a packing-slip layout), then Code (Build the HTML with escaped values), then PDFops (Render HTML to PDF, retried once when the renderer is busy), then Google Drive (Store the PDF, when delivery is link), then Gmail (Email the PDF, when delivery is link), then Slack (Alert on any other failure).
Before you run it. Order Webhook starts the workflow the moment it is active and the URL is called, so keep the workflow inactive until you have run it by hand. Slack is used on every failure path, including delivery download, so add a Slack credential even if you only download; without it the alert fails and the caller gets a 502 that says alerting also failed. Every order needs a valid customer.email, delivery download included; without one the webhook answers 400. Delivery link also stores the file in Google Drive and emails it with Gmail. Posting the same orderId twice renders twice, and with delivery link stores a second file and sends a second email.
Can run without a paid plan. n8n has no free Cloud plan (n8n.io/pricing, read 2026-11-27). The workflow runs without a licence fee on self-hosted Community Edition with n8n-nodes-pdfops 0.5.0 or newer and a free PDFops key.
Get a free PDFops key for n8n
Frequently asked
Is this workflow in the n8n template gallery?
No. It is a downloadable workflow file on this page, so there is no gallery page for it. Download the JSON and import it into your own n8n.
Does it run on n8n Cloud?
Yes. Install the PDFops community node from the nodes panel in n8n Cloud. Version 0.6.0 includes HTML to PDF.
Does it run on a free plan?
n8n has no free Cloud plan. A self-hosted n8n has no licence fee, and a free PDFops key covers the renders within its monthly quota, at 5 requests per render. Slack is needed on every failure path, and Google Drive and Gmail for delivery link.
Why does a download test get a 400?
The most likely cause is the customer email. Validate Order Payload requires one valid customer.email on every order, delivery download included, even though download sends no email. It also bounds the other fields and lists up to 10 issues in the 400 reply.
Can I send my own HTML instead of an order?
Yes. The endpoint takes any HTML string up to 1 MB, as a full page or a fragment. This workflow builds the HTML from an order; replace the two builder nodes to render something else. JavaScript does not run, so a page that builds itself in the browser renders empty.
Can the HTML load images and fonts?
Images, stylesheets and fonts load over https from public hosts, and data: URIs work. Addresses on private networks and plain http are blocked and skipped. The endpoint reference lists the exact limits.
What happens when the renderer is busy or fails?
When the renderer answers renderer_busy, the workflow waits and retries once. A timeout or an exhausted quota is not retried. Any other failure alerts Slack and answers 502 without upstream error text. If Drive stored the file but Gmail failed, the reply says so and still carries the link.
What if my caller retries a request?
A retry is not deduplicated. Posting the same orderId again renders again, and with delivery link it stores a second file and sends a second email.
Try it
Get a free API key, then open a workflow above. The endpoint reference lists every option and limit.
Related guides: Turn a Google Sheets row into a PDF invoice · Turn a Stripe payment into a PDF invoice and email it
← PDFops home · n8n guide · Free key · Pricing
---
# Turn a Stripe payment into a PDF invoice and email it | PDFops
Source: https://pdfops.dev/guides/stripe-payment-to-pdf-invoice
Guide
Turn a Stripe payment into a PDF invoice and email it
One payment in, one invoice out
Get a free API key
See the templates
customer_namepayment_description+4 more
Maya OkaforDesign retainer, November…
One Stripe payment
PDFops builds the invoice
/api/invoice, once per payment. Done by the Zapier template and the n8n workflow below.
The invoice it becomes. Open the invoice PDF. The sample was made with a paid key; output from a free key adds a small footer line.
Stripe sends a receipt, but a business often wants its own invoice: its name on it, an invoice number, the right currency and a PDF to keep. PDFops draws a complete invoice from structured data with no template to prepare, so a payment's details can become the invoice directly. This page shows the two templates that already exist, the field mapping, and the input mistakes that stop a first run.
What you get
Each successful Stripe payment becomes one PDF invoice, built from the payment's details and ready to email to the customer. See a sample invoice PDF.
Set it up
Check what the payment gives you. In Zapier open the trigger's test data, and find the customer's name, the amount, the currency and the payment date. In n8n the real shape appears when you make a test payment in the test step below, so read the Payment Succeeded output then, before you trust anything. Three things can stop the invoice or make it wrong: the customer's name can be empty, the date must be written YYYY-MM-DD, and the amount must be in the major unit of the currency (480 or 10.99), not the smallest unit such as 1099. Stripe's own API and the n8n Stripe trigger report the smallest unit. On 2026-11-20 we read Zapier's Stripe trigger sample, and its Amount arrived as a decimal (10.99), not cents. The Zapier action sends the unit price exactly as it receives it and cannot divide, so a cents value there would give an invoice 100 times too large with no error.
Fill the fields the invoice endpoint needs. The invoice endpoint needs a non-empty To name, a From name, at least one line item with a description and a unit price, and an invoice date written YYYY-MM-DD if you send one: called directly, it refuses an empty name and any other date form, a Unix timestamp such as 1764201600 included. In n8n the workflow does all of this itself: the Build Invoice Payload node converts the amount, falls back from the customer's name to their email address, then the receipt email, then the word Customer, and writes the date as YYYY-MM-DD. In Zapier, make sure the name field you map to To (name) is never empty, for example a field that always holds a value such as the customer's email address when the test data has one, give Invoice date as YYYY-MM-DD or leave it empty, and type From once.
Know how the n8n workflow converts the amount. In n8n the Build Invoice Payload node divides Stripe's amount by 1 for a built-in list of 15 zero-decimal currencies (JPY, KRW and 13 others), by 1,000 for five three-decimal ones (BHD, JOD, KWD, OMR, TND) and by 100 for every other currency. A currency in neither list would be treated as two-decimal, so check the first invoice of any unusual currency.
Get a free key and connect PDFops. Create a free API key, then paste it into the PDFops connection in Zapier or the PDFops credential in n8n.
Set your own details in Set Invoice Defaults. The n8n workflow ships with another company's placeholders, and a run with them would email customers invoices from Your Company Inc. Open Set Invoice Defaults before the first run and set every field: companyName (the sender name printed on each invoice), invoicePrefix (the start of each invoice number, INV by default), taxRate (a percentage, 0 by default), defaultLineItem (the line description used when a payment has none, Payment received by default), invoiceNotes (the note printed on the invoice), s3Bucket (the bucket the PDF is archived to) and minimumAmount (in the smallest currency unit: 500 means 5.00; payments below it are skipped). In the Zapier template type your own sender name in From once.
Test with your own address, and leave it off. Open the Gmail step in Zapier, or the Email Invoice to Customer node in n8n, and put your own address in its To field before you run anything: testing sends a real email, and a switched-on automation emails the customer of every real payment. In n8n keep the workflow inactive, so the Payment Succeeded trigger never fires on its own. Select a separate test-mode Stripe credential on Payment Succeeded and Fetch Stripe Customer (editing a shared credential would switch every other workflow that uses it to test mode), point Set Invoice Defaults at a scratch s3Bucket, give Check Ledger for Event and Log to Invoice Ledger a scratch ledger, and point Alert Billing Channel (default channel #billing) at a scratch channel, since a run also writes a file, a ledger row and a Slack message. Then start the workflow's test run so Payment Succeeded listens, and make a payment in Stripe test mode while it listens: the run starts when the event arrives. Give the test payment an email address: Has Customer Email? reads the payment's own email, so a payment with none goes to Slack and the email step is never tested. Stripe has to be able to reach your n8n, so a self-hosted instance behind a router or firewall needs a tunnel or a public URL. In Zapier, run the test on the trigger's sample payment. Open the PDF it makes. Set an n8n error workflow too: if Check Ledger for Event fails, the run stops with no invoice and no Slack message.
Compare the test invoice's total with the Stripe charge. Before you turn anything on, open the test invoice and compare it with the Stripe payment it was made from: the total, to the cent and in the same currency, and the sender name, which must be yours and not Your Company Inc. If the invoice is off by a factor of 100, the amount reached the invoice step in the wrong unit: fix the mapping, do not turn it on.
Put the live settings back, then turn it on. In Zapier put the Gmail step's To back to what it held before you changed it, the customer's email from the Stripe step. In n8n put Email Invoice to Customer, field To (sendTo), back to the expression {{ $('Build Invoice Payload').item.json.customerEmail }}; select the live Stripe credential again on Payment Succeeded and Fetch Stripe Customer; set s3Bucket in Set Invoice Defaults back to your real bucket; point Check Ledger for Event and Log to Invoice Ledger back at the real ledger sheet; and set Alert Billing Channel back to your real channel (#billing by default). Then turn the Zap on, or activate the workflow.
Payment field to invoice field mapping
Each payment becomes one POST call to /api/invoice (endpoint reference). In Zapier you choose the payment field for each invoice field once, in the PDFops step; after that every new payment fills the same fields. In n8n the workflow's Build Invoice Payload node reads the payment itself, so there is nothing to map by hand. It divides the amount by the right number for the currency, uses the customer's name or, when there is none, their email address, then the receipt email, then the word Customer, and writes the payment date as YYYY-MM-DD. The invoice layout is fixed, so there is no template PDF to prepare.
Payment detailInvoice fieldExample value
customer_nametoMaya Okafor
payment_descriptionitems.descriptionDesign retainer, November
amountitems.unit_price480
currencycurrencyUSD
payment_datedate2026-11-27
payment_idinvoice_numberINV-8F2A41C7
typed once in the PDFops stepfromNorthwind Studio
typed once in the PDFops stepitems.quantity1
typed once in the PDFops stepnotesThank you for your business.
Templates
Zapier
Open the template in Zapier: Create PDFops invoice PDFs for new Stripe payments and send them with Gmail. It is also on its listing page.
Steps: Stripe (New Payment), then PDFops (Create Invoice PDF), then Gmail (Send Email).
Before you run it. Once the Zap is on, the Gmail step emails the customer of every new payment in the connected Stripe account, and testing the Gmail step sends a real email. Before you test, note what To holds in the Gmail step, then put your own address there; put the original back before you turn the Zap on. Leave the Zap off until the invoice's total matches the Stripe charge. The template maps the payment's amount into the line item's unit price, but which Stripe field it uses is only visible inside Zapier, so check that the field is a decimal amount and not a cents field, and check which field feeds To (name) in the PDFops step: a payment made without a customer name has no value there.
Needs a paid plan. Three steps (trigger, PDFops, Gmail). Zapier's Free plan allows two-step Zaps only (zapier.com/pricing.md, read 2026-11-27). A trigger plus the PDFops step alone would run on Free but would deliver the invoice nowhere.
Get a free PDFops key for Zapier
n8n
Open the template on n8n: Generate Stripe invoice PDFs with PDFops, S3, Gmail, Sheets, and Slack. Or download the workflow JSON and import it. It uses the n8n-nodes-pdfops community node.
Steps: Stripe (Payment Succeeded), then Google Sheets (Check the ledger for this event's id), then Stripe (Fetch the customer), then PDFops (Generate Invoice), then AWS S3 (Archive the PDF), then Gmail (Email the invoice to the customer), then Google Sheets (Log the invoice to the ledger), then Slack (Alert when a step fails).
Before you run it. Set every field in Set Invoice Defaults first: it ships with the placeholder company name Your Company Inc. Once the workflow is active it invoices, emails and logs every successful payment the Stripe credential can see. Keep it inactive while you test, so Payment Succeeded never fires on its own. Select a separate test-mode Stripe credential on the nodes that use Stripe, Payment Succeeded and Fetch Stripe Customer; do not edit a shared credential, because every other workflow using it would switch to test mode too. Open Email Invoice to Customer and put your own address in its To field, point Set Invoice Defaults at a scratch s3Bucket, and give the two Google Sheets nodes (Check Ledger for Event and Log to Invoice Ledger) a scratch ledger copy. A run also uploads the PDF, writes a ledger row and posts to Slack through Alert Billing Channel, whose channel is #billing by default: point it at a scratch channel too. If Check Ledger for Event fails, the run stops with no invoice and no Slack message, because that node has no error branch: set an n8n error workflow.
Can run without a paid plan. n8n has no free Cloud plan (n8n.io/pricing, read 2026-11-27). The workflow runs without a licence fee on self-hosted Community Edition with the n8n-nodes-pdfops community node installed, and with a free PDFops key.
Get a free PDFops key for n8n
Frequently asked
What happens when a payment has no customer name?
The n8n workflow falls back to the customer's email address, then the receipt email, then the word Customer, so the invoice is still made. In Zapier make sure the field you map to To (name) is never empty: an invoice needs a name, and a run with no value for it does not produce one. Map it from a field that is always filled, such as the email address, when the test data has one.
Why does the invoice date matter?
The invoice endpoint accepts a date written YYYY-MM-DD. The n8n workflow converts the payment's Unix timestamp itself. In Zapier give Invoice date as YYYY-MM-DD, or leave it empty.
Which amounts and currencies work?
The invoice takes the unit price in the major unit of the currency, with a three-letter currency code. In n8n the Build Invoice Payload node divides Stripe's smallest-unit amount correctly for the 15 zero-decimal and five three-decimal currencies it lists, and treats every other currency as two-decimal. In Zapier nothing divides the amount, so the field you map must already be a decimal; on 2026-11-20 Zapier's Stripe trigger sample showed Amount as 10.99. Whatever the platform, compare a test invoice's total with the Stripe charge before you turn anything on.
Does the ledger stop a payment being invoiced twice?
Only once the ledger row exists. In n8n, Check Ledger for Event skips an event whose id is already in the ledger sheet, but the row is written after the S3 upload succeeds, and the email goes out on a parallel branch. A redelivery that arrives before the row is written, or after an upload that failed, is invoiced and emailed again. If reading the ledger itself fails, Check Ledger for Event stops the run with no invoice and no Slack message, so set an n8n error workflow.
Can the invoice show tax?
Yes. The endpoint takes a tax rate as a percentage and works out the tax from the line items. The n8n workflow has a tax rate in Set Invoice Defaults, set to 0. Leave it at 0 if the invoice total must equal the amount charged to the cent, because the net amount that would add back to a given total does not always exist in two decimals.
Do these templates run on free plans?
The Zapier template has three steps, and Zapier's Free plan allows two-step Zaps, so it needs a paid Zapier plan. The n8n workflow runs on a self-hosted n8n, which has no licence fee, because n8n Cloud has no free plan. It also needs accounts for Stripe, AWS, Gmail, Google Sheets and Slack. A PDFops key itself is free.
Does the invoice carry a PDFops footer?
Invoices made with a free key, or with no key, carry a one-line footer saying Generated with pdfops.dev. Paid keys get clean output.
Try it
Get a free API key, then open a template above. You can also build a sample invoice in the free invoice generator first.
Related guides: Turn a Google Sheets row into a PDF invoice · Fill a PDF form from Google Sheets · Merge every PDF in a Google Drive folder into one file · Turn HTML into a PDF over a webhook in n8n
← PDFops home · Zapier guide · n8n guide · Free key · Pricing
---