PDF Forms Info Reader#
Get information about fillable form fields inside a PDF file.
Note
For one-time check of PDF file information and find form fields please use PDF Edit Add Helper.
Available Methods#
/pdf/info/fields#
Extracts information about fillable PDF fields (fillable edit boxes, fillable check-boxes, radio buttons, combo-boxes) from input PDF file along with general information about the input PDF document. The purpose of this endpoint is to get information about fillable PDFs for use with PDF.co PDF Add method.
Method: POST
Endpoint: /v1/pdf/info/fields
Attributes#
Note
Attributes are case-sensitive and should be inside JSON for POST request, for example:
{
"url": "https://example.com/file1.pdf"
}
Attribute |
Description |
Required |
---|---|---|
|
URL to the source file. 1 |
yes |
|
HTTP auth user name if required to access source |
no |
|
HTTP auth password if required to access source |
no |
|
Set |
no |
|
Use this parameter to set additional configurations for fine-tuning and extra options. Explore the Profiles section for more. |
no |
Query parameters#
No query parameters accepted.
Payload#
{
"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf",
"async": false
}
Response 2#
{
"info": {
"PageCount": 3,
"Author": "SE:W:CAR:MP",
"Title": "2019 Form 1040",
"Producer": "macOS Version 10.15.1 (Build 19B88) Quartz PDFContext",
"Subject": "U.S. Individual Income Tax Return",
"CreationDate": "8/7/2020 11:17:29 AM",
"Bookmarks": "",
"Keywords": "Fillable",
"Creator": "Adobe LiveCycle Designer ES 9.0",
"Encrypted": false,
"PasswordProtected": false,
"PageRectangle": {
"Location": {
"IsEmpty": true,
"X": 0,
"Y": 0
},
"Size": "612, 792",
"X": 0,
"Y": 0,
"Width": 612,
"Height": 792,
"Left": 0,
"Top": 0,
"Right": 612,
"Bottom": 792,
"IsEmpty": false
},
"ModificationDate": "8/7/2020 11:17:29 AM",
"EncryptionAlgorithm": "None",
"PermissionPrinting": true,
"PermissionModifyDocument": true,
"PermissionContentExtraction": true,
"PermissionModifyAnnotations": true,
"PermissionFillForms": true,
"PermissionAccessibility": true,
"PermissionAssemble": true,
"PermissionHighQualityPrint": true,
"FieldsInfo": {
"Fields": [
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[3]",
"Value": "False",
"Left": 340.39898681640625,
"Top": 67.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[4]",
"Value": "False",
"Left": 441.1990051269531,
"Top": 67.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].f1_03[0]",
"Value": "",
"Left": 238.60000610351562,
"Top": 111.9990234375,
"Width": 228.39999389648438,
"Height": 14.0009765625
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].f2_37[0]",
"Value": "",
"Left": 509.7449951171875,
"Top": 474.0010070800781,
"Width": 66.2550048828125,
"Height": 11.998992919921875
}
]
}
},
"error": false,
"status": 200,
"remainingCredits": 59987
}
CURL#
curl --location --request POST 'https://api.pdf.co/v1/pdf/info/fields' \
--header 'x-api-key: ' \
--data-raw '{
"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf",
"async": false
}'
Code samples#
Footnotes
- 1
Supports links from Google Drive, Dropbox, and PDF.co Built-In Files Storage. To upload files via the API check out the File Upload section. Note: If you experience intermittent Too Many Requests or Access Denied errors, please try to add
cache:
to enable built-in URL caching. (e.gcache:https://example.com/file1.pdf
) For data security, you have the option to encrypt output files and decrypt input files. Learn more about user-controlled data encryption.- 2
Response codes as follows:
Code
Description
200
The request has succeeded
400
Bad input parameters
401
Unauthorized
403
Not enough credits
405
Timeout error. To process large documents or files please use asynchronous mode (set the
async
parameter totrue
) and then check status using the /job/check endpoint. If a file contains many pages then specify a page range using thepages
parameter. The number of pages of the document can be obtained using the /pdf/info endpoint.