PDF Form Fill Batch

Fill one PDF form template with an array of records and output one filled PDF per record (ZIP) or a merged PDF

Fill ONE template PDF with MANY records in a single operation. Each record fills a fresh copy of the template; results are returned as a ZIP (one PDF per record) or a merged PDF. Companion to the single-file PDF form filler. Pure-JS via pdf-lib + JSZip.

Example Results

2 examples

Mail-merge certificates into a ZIP

Fills a certificate template with 3 records and returns a ZIP with one PDF per person.

pdf-form-fill-batch-example1.zip View File
View input parameters
{ "templatePdf": "/public/samples/pdf/certificate-template.pdf", "recordsJson": "[{\"name\":\"Alice Zhang\",\"course\":\"Advanced TypeScript\",\"date\":\"2026-06-16\"},{\"name\":\"Bob Chen\",\"course\":\"Go Fundamentals\",\"date\":\"2026-06-16\"},{\"name\":\"Carol Lee\",\"course\":\"Rust Systems\",\"date\":\"2026-06-16\"}]", "outputMode": "zip", "nameField": "name", "flattenEach": true }

Merge invoices into one PDF

Fills an invoice template with multiple records and returns a single merged PDF.

pdf-form-fill-batch-example2.pdf View File
View input parameters
{ "templatePdf": "/public/samples/pdf/invoice-template.pdf", "recordsJson": "[{\"invoice_no\":\"INV-001\",\"client\":\"Acme\",\"total\":1500},{\"invoice_no\":\"INV-002\",\"client\":\"Globex\",\"total\":2300}]", "outputMode": "merge", "nameField": "invoice_no", "flattenEach": true }

Click to upload file or drag and drop file here

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

JSON array of objects. Each object fills one copy of the template.

Record field used to name each output PDF in ZIP mode

Flatten each filled form so it is non-editable

Key Facts

Category
Documents & PDF
Input Types
file, textarea, select, text, checkbox
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The PDF Form Fill Batch tool allows you to fill a single PDF form template with multiple records from a JSON array in a single operation. It generates either a ZIP archive containing individual filled PDFs or a single merged PDF document, with options to flatten the forms to prevent further editing.

When to Use

  • When you need to generate personalized documents like certificates, invoices, or contracts for a list of recipients using a single PDF template.
  • When you want to automate the mail-merge process for PDF forms without writing custom scripts or using server-side processing.
  • When you need to lock form fields by flattening the output PDFs to ensure the filled data cannot be altered.

How It Works

  • Upload your PDF form template containing fillable AcroForm fields.
  • Input a JSON array of objects where each object represents a record with keys matching the PDF form field names.
  • Configure output settings, such as choosing between a ZIP archive of individual files or a single merged PDF, and deciding whether to flatten the forms.
  • Click generate to process the records locally in your browser and download the resulting file.

Use Cases

Generating personalized training certificates for a class of graduates from a student list.
Creating batch invoices or receipts for clients using transaction data.
Preparing standardized employment contracts or NDAs for multiple new hires.

Examples

1. Batch Certificate Generation

Training Coordinator
Background
A training coordinator needs to issue completion certificates to a batch of students who completed a course.
Problem
Manually typing names and dates into a PDF certificate template for dozens of students is slow and error-prone.
How to Use
Upload the certificate PDF template, paste the student records as a JSON array, set the output mode to ZIP, and specify 'name' as the naming field.
Example Config
{
  "templatePdf": "certificate-template.pdf",
  "recordsJson": "[{\"name\":\"Alice Zhang\",\"course\":\"Advanced TypeScript\",\"date\":\"2026-06-16\"},{\"name\":\"Bob Chen\",\"course\":\"Go Fundamentals\",\"date\":\"2026-06-16\"}]",
  "outputMode": "zip",
  "nameField": "name",
  "flattenEach": true
}
Outcome
A ZIP file containing individual, flattened PDF certificates named after each student.

2. Merged Invoice Generation

Billing Administrator
Background
An administrator needs to generate monthly invoices for multiple clients and print them all at once.
Problem
Generating separate files requires opening and printing each one individually, which is inefficient.
How to Use
Upload the invoice PDF template, paste the client billing records in JSON format, set the output mode to Merged, and enable form flattening.
Example Config
{
  "templatePdf": "invoice-template.pdf",
  "recordsJson": "[{\"invoice_no\":\"INV-001\",\"client\":\"Acme\",\"total\":1500},{\"invoice_no\":\"INV-002\",\"client\":\"Globex\",\"total\":2300}]",
  "outputMode": "merge",
  "nameField": "invoice_no",
  "flattenEach": true
}
Outcome
A single, multi-page PDF document containing all filled invoices ready for printing or archiving.

Try with Samples

json, pdf, file

Related Hubs

FAQ

How does the tool match JSON data to the PDF form fields?

The tool matches the keys in your JSON objects directly to the internal field names (AcroForm fields) defined in your PDF template.

What is the difference between ZIP and Merged output modes?

ZIP mode generates a separate PDF file for each JSON record and packages them into a ZIP archive, while Merged mode combines all filled PDFs into a single document.

What does the 'Flatten Each' option do?

Flattening locks the form fields, converting the interactive form inputs into static text so they cannot be edited by the recipient.

Is my data uploaded to a server?

No, all processing is performed locally in your browser using JavaScript, ensuring your template and data remain private.

How are the individual files named in the ZIP output?

You can specify a field from your JSON records (using the Name Field option) to dynamically name each generated PDF file.

API Documentation

Request Endpoint

POST /en/api/tools/pdf-form-fill-batch

Request Parameters

Parameter Name Type Required Description
templatePdf file (Upload required) Yes -
recordsJson textarea Yes JSON array of objects. Each object fills one copy of the template.
outputMode select No -
nameField text No Record field used to name each output PDF in ZIP mode
flattenEach checkbox No Flatten each filled form so it is non-editable

File type parameters need to be uploaded first via POST /upload/pdf-form-fill-batch 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-form-fill-batch": {
      "name": "pdf-form-fill-batch",
      "description": "Fill one PDF form template with an array of records and output one filled PDF per record (ZIP) or a merged PDF",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=pdf-form-fill-batch",
      "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]