Actions80
- Extract Text From Word
- Find And Replace Text
- Convert PDF To Editable PDF Using OCR
- Create Swiss QR Bill
- Split PDF By Barcode
- Split PDF By Swiss QR
- Split PDF By Text
- Split PDF Regular
- Create PDF/A
- Convert HTML To PDF
- Convert Markdown To PDF
- Upload File To PDF4me
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Fill PDF Form
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- AI-Invoice Parser
- AI-Process HealthCard
- AI-Process Contract
- Generate Barcode
- Classify Document
- Parse Document
- Linearize PDF
- Flatten PDF
- Convert To PDF
- Json To Excel
- Convert PDF To Excel
- Convert PDF To Word
- Convert PDF To PowerPoint
- Convert VISIO
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Extract Pages
- Merge Multiple PDFs
- Overlay PDFs
- Rotate Document
- Rotate Page
- Sign PDF
- URL to PDF
- Add Image Watermark To Image
- Add Text Watermark To Image
- Compress Image
- Convert Image Format
- Create Images From PDF
- Flip Image
- Get Image Metadata
- Image Extract Text
- Remove EXIF Tags From Image
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Image
- Rotate Image By EXIF Data
- Compress PDF
- Get PDF Metadata
- Repair PDF Document
- Get Document From Pdf4me
- Update Hyperlinks Annotation
- Protect Document
- Unlock PDF
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Generate Document Single
- Generate Documents Multiple
- Get Tracking Changes In Word
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Attachment From PDF
- Extract Text By Expression
- Extract Table From PDF
- Extract Resources
Overview
This node operation "Fill PDF Form" allows users to populate PDF form fields with data programmatically. It supports filling either a single PDF document or generating multiple documents from a list of data objects. The PDF template can be provided in various ways: as binary data from a previous node, as a base64 encoded string, or via a URL.
Common scenarios include automating the generation of filled forms such as applications, contracts, invoices, or surveys where the form structure is fixed but the content varies per instance. For example, filling out customer information on a standard contract template or generating personalized certificates for multiple recipients.
Properties
| Name | Meaning |
|---|---|
| PDF Input Data Type | How the PDF template file is provided. Options: Binary Data (from previous node), Base64 String (encoded PDF content), URL (link to PDF file). |
| PDF Binary Field | Name of the binary property containing the PDF file (used when PDF Input Data Type is Binary Data). |
| PDF Base64 Content | Base64 encoded string representing the PDF content (used when PDF Input Data Type is Base64 String). |
| PDF URL | URL pointing to the PDF file (used when PDF Input Data Type is URL). |
| Data Type | Whether to fill a single document or generate multiple documents. Options: Single Document (fill one PDF with JSON data), Multiple Documents (generate many PDFs from an array of data). |
| Form Data (JSON) | JSON object with form field names and values for filling a single document. Example: {"firstname": "John", "lastname": "Doe"}. |
| Data List (JSON Array) | JSON array of objects, each containing form field names and values, used to generate multiple documents. Example: [{"firstname": "John"}, {"firstname": "Jane"}]. |
| Output Type | Output file type of the generated file, typically "pdf". |
| Input Data Type | Input data format, usually "json". |
| Meta Data | Additional metadata for the PDF as a string (optional). |
| Meta Data JSON | Additional metadata for the PDF in JSON string format (optional). |
| Output File Name | Filename for the output PDF when generating a single document. Default is "filled_form_output.pdf". |
| Output File Name Prefix | Prefix for output filenames when generating multiple documents. Default is "filled_form_". |
| Async | Boolean flag to enable asynchronous processing, recommended for multiple documents to improve performance. |
Output
The node outputs the filled PDF(s) as binary data attached to the output item(s). Each output item contains a json field with metadata and a binary field holding the generated PDF file. When generating multiple documents, multiple output items are produced, each corresponding to one filled PDF.
json: Contains metadata about the processed document.binary: Contains the actual PDF file data ready for further use or download.
Dependencies
- Requires access to the PDF template either as binary data, base64 string, or URL.
- No explicit external API keys or credentials are indicated in the code snippet; however, the node likely depends on an underlying PDF processing service or library integrated within the n8n environment.
- Proper configuration of input data format and correct JSON structure is necessary.
Troubleshooting
- Invalid PDF Input: If the PDF template is not correctly provided (e.g., wrong binary field name, invalid base64 string, or inaccessible URL), the node will fail to process the form. Verify the input source and ensure accessibility.
- Malformed JSON Data: Errors may occur if the JSON for form data or data list is malformed or does not match the expected form field names. Validate JSON syntax and field names against the PDF form.
- Output File Naming Conflicts: When generating multiple documents, ensure the output file name prefix is unique enough to avoid overwriting files downstream.
- Performance Issues: For large batches (multiple documents), enabling asynchronous processing is recommended to prevent timeouts or slow execution.
- Error Handling: If the node is set to continue on failure, errors for individual items will be included in the output JSON under an error property.
Links and References
- PDF Form Filling Concepts (Adobe PDF specification)
- n8n Documentation - Working with Binary Data
- JSON Schema for PDF Form Data (for validating form data JSON)
If you need details on other operations or resources, please provide their names.