PDF Generator API icon

PDF Generator API

Generate PDFs, manage templates, convert HTML/URLs to PDF, and perform PDF operations like watermarking, encryption, and optimization

PDF Service → Fill Form Fields

AI-generated

Overview

This node operation fills form fields in an existing PDF document using provided data. It supports PDFs sourced either from a public URL or base64 encoded content. Users provide a JSON object mapping form field names to their desired values, and the node returns the filled PDF in the selected output format (base64 JSON, binary file, or download URL). This is useful for automating the population of PDF forms such as applications, contracts, or surveys.

Use Case Examples

  1. Automatically fill a PDF application form with user data collected from a web form.
  2. Populate contract templates with client information before sending for signature.
  3. Batch fill survey PDFs with responses collected from a database.

Properties

Name Meaning
PDF Source Specifies the source of the PDF document to process, either from a public URL or base64 encoded content.
PDF URL The public URL to the PDF document to be processed. Required if PDF Source is 'From URL'.
PDF Base64 Base64 encoded PDF content to be processed. Required if PDF Source is 'From Base64'.
Output Format The format in which the filled PDF is returned: base64 string in JSON, binary file data, or a download URL.
Form Fields Data A JSON object containing the form field names as keys and their corresponding values to fill in the PDF form.

Output

Binary

If the output format is set to 'File (Binary)', the node outputs the filled PDF as binary data suitable for download or further processing.

JSON

  • success - Indicates whether the form filling operation was successful.
  • operation - The operation performed, which is 'fillFormFields' in this case.
  • format - The output format of the filled PDF (base64, file, or url).
  • data - The filled PDF content as a base64 string if output format is base64.
  • url - The download URL of the filled PDF if output format is URL.
  • filename - The name of the file if output format is file or base64.
  • fileSize - The size of the filled PDF file in bytes.

Dependencies

  • Requires an API key credential for the PDF Generator API service.

Troubleshooting

  • Ensure the JSON provided in 'Form Fields Data' is valid and correctly maps to the form field names in the PDF.
  • If using 'From URL' as PDF Source, verify the URL is publicly accessible and points to a valid PDF document.
  • For 'From Base64' source, ensure the base64 string is a valid encoded PDF.
  • Check that the output format selected is supported by your workflow or downstream nodes.
  • Common error: 'Form Fields Data must be valid JSON' indicates malformed JSON input; validate the JSON syntax.
  • Common error: 'Watermark text is required' or 'Watermark image URL is required' do not apply here but indicate similar required fields for other operations.

Links

Discussion