How to Fill a PDF Form with Instant JSON

Information

PSPDFKit Processor has been deprecated and replaced by PSPDFKit Document Engine. All PSPDFKit Processor licenses will work as before and be supported until 15 May 2024 (we will contact you about license migration). To start using Document Engine, refer to the migration guide. With Document Engine, you’ll have access to robust new capabilities (read the blog for more information).

Follow the steps in this guide to fill a PDF form using an Instant JSON file with PSPDFKit Processor.

  1. Create a new Instant JSON file. You can see an example of an Instant JSON file here.

  2. Add the values for the various form fields to a top-level formFieldValues field in the Instant JSON file, like so:

{
    "annotations": [...],
    "formFields": [...],
    "format": "https://pspdfkit.com/instant-json/v1",
    "formFieldValues": [
        {
            "name": "Client Address",
            "type": "pspdfkit/form-field-value",
            "v": 1,
            "value": "An address"
        },
        {
            "name": "Client ZIP",
            "type": "pspdfkit/form-field-value",
            "v": 1,
            "value": "333333"
        },
        {
            "name": "Check Box 11",
            "type": "pspdfkit/form-field-value",
            "v": 1,
            "value": ["Yes"]
        },
        {
            "name": "Check Box 17",
            "type": "pspdfkit/form-field-value",
            "v": 1,
            "value": ["Yes"]
        },
        ...
    ]
}
  1. Follow the instructions in the import Instant JSON guide to import the Instant JSON file containing the new formFieldValues to the PDF document using PSPDFKit Processor’s /build endpoint.