Fill government forms by the thousand — programmatically
Reuse the exact PDF forms your authorities require. Fill with JSON data, flatten to read-only, archive in PDF/A. AcroForm and XFA both supported.
- Hosted in Frankfurt & Paris
- GDPR-compliant
Why automate government forms with pdf.xhub?
Use the official template, no recreation
Government forms come as fillable PDFs. We fill the actual file the authority published — no risk of layout drift, no re-validation by legal.
AcroForm and XFA both supported
Modern AcroForm and the legacy XFA spec (used by IRS, Canadian gov, German Finanzämter, etc.) — same endpoint handles both.
Flatten + archive for audit trail
After filling, optionally flatten the form (read-only, no edits possible) and wrap in PDF/A-3 for a tamper-evident long-term archive.
How form filling works
1. Upload the source form once
Drop the source PDF into your workspace via dashboard or API. We extract field names and structure, store the template by ID.
2. POST JSON for each form fill
Reference the form by ID, pass JSON keyed by field name (or position). Conditional fields evaluated server-side.
3. Receive filled PDF (optionally flattened)
Get the filled PDF back inline. Optional flatten step renders fields to read-only. Optional PAdES signature for tamper evidence.
For HR, payroll, tax, and compliance teams
From W-9 / W-8BEN to German Anlage-N, French formulaires, social-security applications — any fillable PDF is automatable via the PDF Form Filling product. Field validation errors return clear JSON, not silent corruption.
Try it in your stack
Same endpoint. Copy as cURL, call from any language.
POST a JSON of field values to a form template, receive a filled PDF.
curl -X POST https://api.pdf.xhub.io/v1/render \
-H "Authorization: Bearer $PDFXHUB_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "form",
"formId": "form_W9_2026",
"data": {
"name": "Acme GmbH",
"taxId": "DE123456789"
},
"flatten": true
}' --output filled.pdfcurl -X POST https://api.pdf.xhub.io/v1/render \
-H "Authorization: Bearer $PDFXHUB_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "form",
"formId": "form_W9_2026",
"data": {
"name": "Acme GmbH",
"taxId": "DE123456789"
},
"flatten": true
}' --output filled.pdfFeatures at a glance
Form support
- AcroForm spec (modern PDF forms)
- XFA spec (legacy government forms)
- Field-name + index-based filling
- Conditional fields (show/hide via JSON)
- Checkbox, radio, dropdown, text, signature fields
- Image insertion for signature fields
Output & Archive
- Flatten step (convert fillable → read-only)
- PAdES digital signatures (B, T, LT)
- PDF/A-1b, PDF/A-2b, PDF/A-3 archive modes
- Validation errors with clear field-level messages
Platform
- EU-only render workers
- AcroForm + XFA spec — same endpoint handles both
- Field-level validation errors as structured JSON
- Form versioning for audit-trail
- Webhook on flatten / signing completion
- Rate limit up to 1,500 req/min on Business
Powered by these APIs
The product endpoints behind this solution.
Related solutions
Same API, different workflows.
Automate your first form-filling pipeline
25 fills/month free forever. Reuse your authority-approved templates.