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 API's client libraries.

   Follow us on social media for latest news!

Request/Response

RequestRequest DataResponse
POSTPDF as byte arrayJSON document containing metadata.

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.dpdf.io/v1.0/pdf-info HTTP/1.1
Authorization: Bearer your-api-key

Parameters

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

The PDF is sent to the endpoint as binary data. In this example request, the binary is coming from a file, but it could also come from a URL, a database, or other source.

Run In Postman

Sample cURL Request

curl -X POST "https://api.dpdf.io/v1.0/pdf-info" 
-H "accept:application/json"
-H "Authorization: Bearer DP.xxx-api-key-xxx"
-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: