Categories

PDF AcroForm Filler

Fill standard PDF forms programmatically (text, checkbox, radio, dropdown/list) using JSON data injection

Programmatically fill PDF form fields and export a filled PDF. **Engine selection:** - Primary library: **pdf-lib** **Supported injection:** - Text fields - Checkboxes (true/false/yes/no) - Radio groups - Dropdown and option list selections **AcroForm/XFA behavior:** - Fully supports AcroForm filling - For hybrid PDFs that include XFA, can remove XFA packet and fill AcroForm fallback fields - Pure XFA-only forms are not directly writable by pdf-lib and should be converted upstream

Example Results

2 examples

Fill Basic Registration Form

Inject text, checkbox, radio, dropdown and list values into an AcroForm PDF

pdf-acroform-filler-example1.pdf View File
View input parameters
{ "pdfFile": "/public/samples/pdf/form-sample-acroform.pdf", "fieldDataJson": "{\"full_name\":\"Alex Doe\",\"agree_terms\":true,\"tier\":\"pro\",\"country\":\"US\",\"hobbies\":[\"Reading\",\"Music\"]}", "removeXfaBeforeFill": true, "flatten": true, "strictMode": false }

Fill Without Flattening

Fill selected fields and keep form editable by disabling flattening

pdf-acroform-filler-example2.pdf View File
View input parameters
{ "pdfFile": "/public/samples/pdf/form-sample-acroform.pdf", "fieldDataJson": "{\"full_name\":\"Taylor Smith\",\"agree_terms\":false,\"country\":\"DE\",\"tier\":\"basic\"}", "removeXfaBeforeFill": true, "flatten": false, "strictMode": false }

Click to upload file or drag and drop file here

Maximum file size: 100MB Supported formats: application/pdf

JSON object where key = field name, value = field value

For hybrid PDFs, remove XFA packet and fill AcroForm fallback

Flatten fields to make result non-editable

Fail immediately when any field cannot be mapped/written

API Documentation

Request Endpoint

POST /en/api/tools/pdf-acroform-filler

Request Parameters

Parameter Name Type Required Description
pdfFile file (Upload required) Yes -
fieldDataJson textarea Yes JSON object where key = field name, value = field value
removeXfaBeforeFill checkbox No For hybrid PDFs, remove XFA packet and fill AcroForm fallback
flatten checkbox No Flatten fields to make result non-editable
strictMode checkbox No Fail immediately when any field cannot be mapped/written

File type parameters need to be uploaded first via POST /upload/pdf-acroform-filler to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-pdf-acroform-filler": {
      "name": "pdf-acroform-filler",
      "description": "Fill standard PDF forms programmatically (text, checkbox, radio, dropdown/list) using JSON data injection",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=pdf-acroform-filler",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]