Skip to main content

pdf-info


Use the pdf-info endpoint to upload a PDF document and return JSON describing the PDF.


The pdf-info endpoint takes a PDF document and returns the following data as JSON:

  • the metadata (title, author, keywords etc)
  • any custom properties in the PDF,
  • an array of pages with the size of each page,
  • and an array of form fields and their name, value and available values (for select boxes).
info

Refer to pdf-info in the Client Libraries Users Guide section for this example using the DynamicPDF Cloud API's client libraries.

The pdf-info endpoint takes an HTTP POST form submission, where the PDF is sent as binary in the form's body.

POST https://api.dynamicpdf.com/v1.0/pdf-info HTTP/1.1Authorization: Bearer your-api-key

Parameters#

Header ParametersValueDescriptionRequired
Content-Typeapplication/pdfContent type sent in request.
AuthorizationBearer DP.V9xxxxxxxxxxxThe API key.✔️
Request BodyType
BodybinaryThe PDF document to obtain information about.✔️

Sample cURL Request#

curl -X POST "https://api.dynamicpdf.com/v1.0/pdf-info" -H "accept:application/json" -H "Authorization: Bearer xxxxxxxxxx" -H "Content-Type: application/pdf"--data-binary "@c:/holding/pdf-text/fw4.pdf"

Sample Response#

{    "author": "SE:W:CAR:MP",    "subject": "Employee's Withholding Certificate",    "keywords": "Fillable",    "creator": "Adobe LiveCycle Designer ES 9.0",    "producer": "Adobe LiveCycle Designer ES 9.0",    "title": "2021 Form W-4",    "pages": [        {            "pageNumber": 1,            "width": 611.976,            "height": 791.968        },        {            "pageNumber": 2,            "width": 611.976,            "height": 791.968        },        {            "pageNumber": 3,            "width": 611.976,            "height": 791.968        },        {            "pageNumber": 4,            "width": 611.976,            "height": 791.968        }    ],    "formFields": {        "signatureFields": null,        "textFields": [            {                "name": "topmostSubform[0].Page1[0].Step1a[0].f1_01[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].Step1a[0].f1_02[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].Step1a[0].f1_03[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].Step1a[0].f1_04[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_05[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].Step3_ReadOrder[0].f1_06[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].Step3_ReadOrder[0].f1_07[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_08[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_09[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_10[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_11[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_13[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_14[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page1[0].f1_15[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_01[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_02[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_03[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_04[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_05[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_06[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_07[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_08[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_09[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_10[0]",                "value": null,                "defaultValue": ""            },            {                "name": "topmostSubform[0].Page3[0].f3_11[0]",                "value": null,                "defaultValue": ""            }        ],        "choiceFields": null,        "buttonFields": [            {                "name": "topmostSubform[0].Page1[0].c1_1[0]",                "type": "checkBox",                "value": null,                "defaultValue": "",                "exportValue": "1",                "exportValues": null            },            {                "name": "topmostSubform[0].Page1[0].c1_1[1]",                "type": "checkBox",                "value": null,                "defaultValue": "",                "exportValue": "2",                "exportValues": null            },            {                "name": "topmostSubform[0].Page1[0].c1_1[2]",                "type": "checkBox",                "value": null,                "defaultValue": "",                "exportValue": "3",                "exportValues": null            },            {                "name": "topmostSubform[0].Page1[0].Step2c[0].c1_2[0]",                "type": "checkBox",                "value": null,                "defaultValue": "",                "exportValue": "1",                "exportValues": null            }        ],        "pushButtons": null,        "multiSelectListBoxFields": null    },    "customProperties": null,    "xmpMetaData": true,    "signed": false,    "tagged": true}

Further Information#

You can also use one of DynamicPDF's provided client libraries to integrate the endpoints into your client applications if you prefer. For more information, refer to the relevant Users Guide sections: