PDF Form Extractor & Filler (AcroForm to JSON, Fill & Flatten)
Pricing
from $4.00 / 1,000 form processeds
PDF Form Extractor & Filler (AcroForm to JSON, Fill & Flatten)
Extract every fillable PDF form field (name, type, value, options, page, position) to JSON, or fill PDF forms from a JSON map and download the filled or flattened PDF. Detects XFA forms and extracts XFA data. No external APIs.
Pricing
from $4.00 / 1,000 form processeds
Rating
0.0
(0)
Developer
Camp8 fr0
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a day ago
Last modified
Categories
Features
Share
PDF Form Extractor & Filler – Fillable PDF (AcroForm) to JSON, Fill & Flatten PDF Forms
PDF Form Extractor & Filler reads every fillable field of a PDF form (text boxes, checkboxes, radio buttons, dropdowns, list boxes, signatures) and returns it as clean JSON: name, type, current value, options, page and position. In fill mode it does the opposite: give it a JSON object of values and get back the filled PDF, optionally flattened so it can no longer be edited. XFA (LiveCycle) forms are detected and their data is extracted. Everything runs inside the Actor: no external APIs, and your documents never leave Apify.
What does PDF Form Extractor & Filler do?
- 📋 Extracts all AcroForm fields: full name, short name, tooltip, type, value, default value, options (with export values and labels), required / read-only / hidden flags, max length, comb and multiline flags.
- 📍 Field positions: page number and rectangle (points, top-left origin) of every widget, ideal for overlays, form-building UIs and document AI training data.
- 🧾
valuesmap: a ready-to-edit{ "field name": value }object you can send straight back in fill mode. - ✍️ Fill mode: text, checkboxes, radio groups, dropdowns and multi-select list boxes, matched by full name, short name (e.g.
f1_01) or tooltip, case-insensitive. - 🔤 Unicode values: Polish, Czech, Greek, Cyrillic, Vietnamese and other non-Latin-1 text is rendered with an embedded Noto Sans font instead of garbled characters.
- 🧱 Flatten: burn the values into the page so the PDF looks identical everywhere and cannot be changed.
- ✅ Verified output: the filled PDF is re-read with an independent parser and every filled value is compared (
verification.mismatches). - 🧬 XFA aware: reports hybrid vs. pure XFA forms, extracts the XFA
datasetsvalues, and removes the stale XFA layer when filling so Acrobat shows your values. - 🔐 Encrypted PDFs supported with a password.
- 🌐 HTTP API (Standby mode) with optional base64 output of the filled PDF.
Use cases
- Read submitted forms (applications, onboarding, claims, tax and HR forms) into a database or spreadsheet
- Auto-fill government and insurance forms (IRS W-9 / 1040, CERFA, visa and permit forms) from your CRM or ERP
- Generate many personalised PDFs from one template (contracts, certificates, invoices)
- Build form-mapping and document AI pipelines that need field positions
- Audit forms: find required, read-only or hidden fields and their options
How to use it
- Click Try for free and paste one or more PDF URLs.
- Extract: leave Mode = Extract and click Start. Each PDF becomes one row with
fieldsand avaluesmap. - Fill: switch Mode to Fill, paste a JSON object into Fill data (copy the
valuesobject from an extract run and edit it), optionally enable Flatten, and click Start. The filled PDF link is inoutputUrl.
Call it as an HTTP API (Standby mode)
# Extract fields (GET)curl "https://<your-standby-url>/?pdfUrls=https://example.com/form.pdf" \-H "Authorization: Bearer <APIFY_TOKEN>"# Fill + flatten (POST), filled PDF inline as base64curl -X POST "https://<your-standby-url>/" \-H "Authorization: Bearer <APIFY_TOKEN>" -H "Content-Type: application/json" \-d '{"mode":"fill","pdfUrls":["https://example.com/form.pdf"],"fillData":{"Name":"Jane Doe","Agree":true},"flatten":true,"returnBase64":true}'
Response: { "count": 1, "items": [ ... ] }
You can also use the Apify API (run-sync-get-dataset-items), the Apify MCP server, Make, Zapier, n8n and other integrations. AI agents can pay per call with x402 (USDC) through Apify's agentic payments, without needing an Apify account.
Input example
{"pdfUrls": ["https://raw.githubusercontent.com/Hopding/pdf-lib/master/assets/pdfs/dod_character.pdf"],"mode": "fill","fillData": { "CharacterName 2": "Elara Moonwhisper", "Age": "112", "Backstory": "Line one\nLine two" },"flatten": true}
| Field | Description |
|---|---|
pdfUrls | Direct links to PDF forms (also data:application/pdf;base64,...) |
mode | extract (default) or fill |
fillData | Fill mode: { "field name": value }. Text: string. Checkbox: true/false. Radio / dropdown: option value or label. List box: array |
flatten | Fill mode: make the result non-editable |
includeXfaData | Extract mode: return XFA data values when present (default true) |
password | Password for encrypted PDFs |
returnBase64 | Standby API, fill mode: include the filled PDF as base64 |
Output example
Extract mode (shortened):
{"pdfUrl": "https://raw.githubusercontent.com/Hopding/pdf-lib/master/assets/pdfs/with_xfa_fields.pdf","mode": "extract","pageCount": 2,"hasAcroForm": true,"fieldCount": 116,"xfa": {"present": true,"pureXfa": false,"packets": ["xdp:xdp", "config", "template", "datasets", "sourceSet", "connectionSet", "localeSet", "xmpmeta", "xfdf", "form", "</xdp:xdp>"],"values": { "topmostSubform.ReadOrderControl[1].PresidentialElection.c1_02": "0" }},"values": { "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[0]": false, "topmostSubform[0].Page1[0].FilingStatus[0].f1_01[0]": "" },"fields": [{ "name": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[0]", "shortName": "c1_01[0]", "type": "checkbox", "exportValue": "1", "value": false, "defaultValue": "Off", "page": 1, "rect": { "left": 95.6, "top": 68, "width": 8, "height": 8 } },{ "name": "topmostSubform[0].Page1[0].FilingStatus[0].f1_01[0]", "shortName": "f1_01[0]", "type": "text", "value": "", "page": 1, "rect": { "left": 208.8, "top": 90, "width": 331.2, "height": 12 } }]}
Fill mode (shortened):
{"pdfUrl": "https://raw.githubusercontent.com/Hopding/pdf-lib/master/assets/pdfs/dod_character.pdf","mode": "fill","outputUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/dod_character-c72a8a27ced4-filled","flattened": true,"fieldCount": 14,"filledCount": 3,"filled": [{ "key": "Age", "field": "Age", "type": "text", "value": "112" }],"failed": [],"notFound": [],"warnings": [],"verification": { "flattened": true, "remainingFields": 0 }}
Pricing
This Actor uses pay-per-event pricing:
| Event | Price |
|---|---|
| Form processed (extract or fill, per PDF) | $4 per 1,000 forms ($0.004 each) |
Download errors, broken PDFs, PDFs without form fields in fill mode, and fills where no key matched any field are free. Apify platform usage (compute) is billed separately and is typically a fraction of a cent per form. Set Maximum cost per run to cap your spend.
FAQ
How do I find the field names to fill?
Run extract mode once. Use the name of each field, or simply copy the values object, change the values, and paste it as fillData. Short names (f1_01 instead of topmostSubform[0].Page1[0].f1_01[0]) and tooltips also work when they are unique.
What about XFA / LiveCycle forms?
Hybrid forms (most IRS and government forms) contain both AcroForm and XFA: all fields are extracted and can be filled; the XFA layer is removed on fill so viewers show the AcroForm values. Pure (dynamic) XFA forms have no AcroForm fields: the Actor reports pureXfa: true and returns the XFA data values, but cannot fill them.
Does it work on scanned paper forms or PDFs without fields? No. It reads the interactive form layer. Flat PDFs and scans have no fields (the result says so and fill mode is not charged).
Which languages and characters are supported when filling? Latin-1 text uses Helvetica. Any value outside Latin-1 (Polish, Czech, Greek, Cyrillic, Vietnamese...) automatically switches the field to an embedded Noto Sans font. Chinese/Japanese/Korean glyphs and right-to-left shaping (Arabic, Hebrew) are not covered by that font.
Can it sign forms?
No. Signature fields are listed (with signed), but digital signing is out of scope.
Is the output encrypted if the input was? No. Encrypted inputs are decrypted with your password and the filled PDF is saved without encryption.
Is my data private? Files are processed inside your Apify run and stored only in your run's key-value store. Nothing is sent to third-party services.
Licenses? pdf.js (Apache-2.0), @cantoo/pdf-lib (MIT), @pdf-lib/fontkit (MIT), Noto Sans font (SIL Open Font License 1.1). All allow commercial use.