Skip to main content

Fill PDF Form

FormsFill PDF Form

The Fill PDF Form API fills form fields in a PDF with your data. You send the template PDF (templateDocContent Base64, templateDocName), dataArray (JSON string of field names and values) or InputFormData (array of fieldName/fieldValue objects), outputType (pdf), inputDataType (json), and optionally metaData, metaDataJson, async. The API returns the PDF with form fields populated. Use the tester below to try it; more details are in the sections that follow.

Try the Fill PDF Form API

Quick reference

Endpoint: POST /api/v2/FillPdfForm · Required: api-key, templateDocName, templateDocContent, dataArray, outputType, inputDataType, InputFormData

Try it live

Use the form below to send your API key, PDF form (Base64), and field values (JSON or InputFormData array). The response is the PDF with fields filled. No code required—fill the fields and click Send request.

Loading API Tester...

Overview, parameters, and use cases

What is Fill PDF Form?

This endpoint fills form fields in a PDF with the values you provide. You send the template PDF (Base64 as templateDocContent, templateDocName) and field data either as dataArray (JSON string, e.g. {"firstname": "John", "lastname": "Adams"}) or InputFormData (array of {fieldName, fieldValue}). Set outputType to pdf and inputDataType to json. The API returns the PDF with text fields, checkboxes, and other form elements populated. Field names must match the names in the PDF.

Key features

  • Template PDFtemplateDocContent (Base64), templateDocName (e.g. form.pdf).
  • Field datadataArray (JSON string) or InputFormData (array of fieldName/fieldValue).
  • OutputoutputType (pdf), inputDataType (json).
  • OptionalmetaData, metaDataJson for additional metadata.
  • Async – Use async for large forms or batch filling.
Best for

Use when you have a PDF form and want to populate it programmatically (applications, contracts, surveys). Pair with Add Form Fields to PDF to create the form, or Extract Form Data from PDF to read filled values.

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • A PDF document with form fields in Base64 format
  • Form field names that match the fields in your PDF

Response Format

The API returns a PDF document with the form fields filled with the provided values.

Get Help