PDF To JSON
Convert PDF and scanned images into JSON representation with text, fonts, images, vectors, and formatting preserved.
Available Methods
[POST] /pdf/convert/to/json2
Auto classification Of Incoming Documents
Use the /pdf/classifier
(Document Classifier) endpoint to automatically sort/detect the class of the document based on keywords-based rules. For example, you can define rules to find which vendor provided the document to find which template to apply accordingly.
Attributes |
---|
url required URL to the source file. Supports links from Google Drive, Dropbox, and PDF.co built-in files storage. To upload files via API, Check out the Files 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.g cache: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. |
httpusername optional HTTP auth user name if required to access source url . |
httppassword optional HTTP auth password if required to access source url . |
pages optional Comma-separated list of page indices (or ranges) to process. IMPORTANT: The very first page starts at 0 (zero). To set a range use the dash - , for example: 0,2-5,7- . To set a range from the index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty.Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7 ) page till the end of the document, The input must be in string format. |
unwrap optional Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be one of: true , or false . |
rect optional Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0 . Use PDF.co PDF Edit Add Helper to get or measure pdf coordinates. The input must be in string format. |
lang optional Set the language for OCR (text from image) to use for scanned PDF, PNG, and JPG documents input when extracting text. The default is “eng”. Other languages are also supported: deu , spa , chi_sim , jpn , and many others (full list of supported OCR languages is here.You can also use 2 languages simultaneously like this: eng+deu or jpn+kor (any combination). |
inline optional Must be one of: true to return data as inline or false to return a link to the output file (default). |
lineGrouping optional Line grouping within table cells. Set to 1 to enable the grouping, The input must be in string format. |
async optional Set async to true for long processes to run in the background, API will then return a jobId which you can use with /job/check endpoint to check the status of the process and retrieve the output while you can proceed with other tasks without waiting for this process to finish. |
name optional File name for the generated output, The input must be in string format. |
expiration optional Set the expiration time for the output link in minutes ( default is 60 i.e 60 minutes or 1 hour), After this specified duration, any generated output file(s) will be automatically deleted from PDF.co temporary files storage. The maximum duration for link expiration varies based on your current subscription plan. Learn more To store permanent input files (e.g. re-usable images, pdf templates, documents), Consider using PDF.co built-in Files Storage. |
profiles optional This parameter can be used to set additional configurations for fine-tuning and to enable more options. Visit PDF.co knowledgebase for profile examples and more. Make sure to provide the input in string format. For instance, to alter the CSV separator, you can use: { 'CSVSeparatorSymbol': ';' } . Tip: Utilize the OCR Analyzer of PDF Multitool to generate and examine OCR configuration profiles. Learn More. |
- Method: POST
- URL: /v1/pdf/convert/to/json2
Query parameters
No query parameters accepted.
Body payload
{
"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-json/sample.pdf",
"inline": true,
"async": false
}
Example responses
/pdf/convert/to/json2
{
"body": {
"document": {
"pageCount": "1",
"pageCountWithOCRPerformed": "0",
"page": {
"index": "0",
"width": "595.320007324219",
"height": "841.919982910156",
"OCRWasPerformed": "False",
"row": [
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "24.0",
"fontStyle": "Bold",
"color": "#538DD3",
"x": "36.00",
"y": "34.44",
"width": "242.81",
"height": "24.00",
"text": "Your Company Name"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "76.94",
"width": "66.62",
"height": "11.04",
"text": "Your Address"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "91.46",
"width": "69.14",
"height": "11.04",
"text": "City, State Zip"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": ""
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "461.02",
"y": "115.94",
"width": "98.42",
"height": "11.04",
"text": "Invoice No. 123456"
}
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": ""
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "436.54",
"y": "130.46",
"width": "122.90",
"height": "11.04",
"text": "Invoice Date 01/01/2016"
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "36.00",
"y": "154.94",
"width": "63.62",
"height": "11.04",
"text": "Client Name"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "169.70",
"width": "40.34",
"height": "11.04",
"text": "Address"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "184.22",
"width": "69.14",
"height": "11.04",
"text": "City, State Zip"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "233.30",
"width": "28.70",
"height": "11.04",
"text": "Notes"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "36.00",
"y": "316.25",
"width": "22.58",
"height": "11.04",
"text": "Item"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "247.61",
"y": "316.25",
"width": "44.64",
"height": "11.04",
"text": "Quantity"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "398.95",
"y": "316.25",
"width": "26.91",
"height": "11.04",
"text": "Price"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "533.14",
"y": "316.25",
"width": "26.30",
"height": "11.04",
"text": "Total"
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "341.33",
"width": "30.62",
"height": "11.04",
"text": "Item 1"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "341.33",
"width": "6.12",
"height": "11.04",
"text": "1"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "341.33",
"width": "27.51",
"height": "11.04",
"text": "40.00"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "341.33",
"width": "27.50",
"height": "11.04",
"text": "40.00"
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "362.45",
"width": "30.62",
"height": "11.04",
"text": "Item 2"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "362.45",
"width": "6.12",
"height": "11.04",
"text": "2"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "362.45",
"width": "27.51",
"height": "11.04",
"text": "30.00"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "362.45",
"width": "27.50",
"height": "11.04",
"text": "60.00"
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "383.57",
"width": "30.62",
"height": "11.04",
"text": "Item 3"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "383.57",
"width": "6.12",
"height": "11.04",
"text": "3"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "383.57",
"width": "27.51",
"height": "11.04",
"text": "20.00"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "383.57",
"width": "27.50",
"height": "11.04",
"text": "60.00"
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "404.93",
"width": "30.62",
"height": "11.04",
"text": "Item 4"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "404.93",
"width": "6.12",
"height": "11.04",
"text": "4"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "404.93",
"width": "27.51",
"height": "11.04",
"text": "10.00"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "404.93",
"width": "27.50",
"height": "11.04",
"text": "40.00"
}
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "389.11",
"y": "425.83",
"width": "36.75",
"height": "11.04",
"text": "TOTAL"
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "525.82",
"y": "425.83",
"width": "33.62",
"height": "11.04",
"text": "200.00"
}
}
]
}
]
}
}
},
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.json",
"remainingCredits": 99227903,
"credits": 28
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/to/json2' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ' \
--data-raw '{
"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-json/sample.pdf",
"inline": true,
"async": false
}'
[POST] /pdf/convert/to/json-meta (AI powered)
Auto-classification Of Incoming Documents
Use the /pdf/classifier
(Document Classifier) endpoint to automatically sort/detect the class of the document based on keywords-based rules. For example, you can define rules to find which vendor provided the document to find which template to apply accordingly.
What is the difference between /pdf/convert/to/json-meta
vs /pdf/convert/to/json2
?
/json-meta
uses AI to detect meta styles for text objects, such as:
- paragraph style (from
h1
..h7
top
andsmall
) - meta
type
of the text object (text
,datetime
,integer
,decimal
,currency
etc) - meta
subType
of the text object (companyName
,personName
and other AI-based meta types). - also
/json-meta
consumes more credits because it runs with AI - finally,
/json-meta
also works a bit slower due to the AI process. Async mode is recommended for this endpoint.
Attributes |
---|
url required URL to the source file. Supports links from Google Drive, Dropbox, and PDF.co built-in files storage. To upload files via API, Check out the Files 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.g cache: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. |
httpusername optional HTTP auth user name if required to access source url . |
httppassword optional HTTP auth password if required to access source url . |
pages optional Comma-separated list of page indices (or ranges) to process. IMPORTANT: The very first page starts at 0 (zero). To set a range use the dash - , for example: 0,2-5,7- . To set a range from the index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty.Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7 ) page till the end of the document, The input must be in string format. |
unwrap optional Unwrap lines into a single line within table cells when line grouping is enabled. Must be one of: true , or false . |
rect optional Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0 . Use PDF.co PDF Edit Add Helper to get or measure pdf coordinates. The input must be in string format. |
lang optional Set the language for OCR (text from image) to use for scanned PDF, PNG, and JPG documents input when extracting text. The default is “eng”. Other languages are also supported: deu , spa , chi_sim , jpn , and many others (full list of supported OCR languages is here.You can also use 2 languages simultaneously like this: eng+deu or jpn+kor (any combination). |
inline optional Must be one of: true to return data as inline or false to return a link to the output file (default). |
lineGrouping optional Line grouping within table cells. Set to 1 to enable the grouping, The input must be in string format. |
async optional Set async to true for long processes to run in the background, API will then return a jobId which you can use with /job/check endpoint to check the status of the process and retrieve the output while you can proceed with other tasks without waiting for this process to finish. |
name optional File name for the generated output, , The input must be in string format. |
expiration optional Set the expiration time for the output link in minutes ( default is 60 i.e 60 minutes or 1 hour), After this specified duration, any generated output file(s) will be automatically deleted from PDF.co temporary files storage. The maximum duration for link expiration varies based on your current subscription plan. Learn more To store permanent input files (e.g. re-usable images, pdf templates, documents), Consider using PDF.co built-in Files Storage. |
profiles optional Use this parameter to set additional configurations for fine-tuning and extra options, The input must be in string format. Explore PDF.co knowledgebase for profile examples. For example, to change CSV separator: { 'CSVSeparatorSymbol': ';' } |
- Method: POST
- URL: /v1/pdf/convert/to/json-meta
Query parameters
No query parameters accepted.
Body payload
{
"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-json/sample.pdf",
"inline": true,
"async": false
}
Example responses
/pdf/convert/to/json-meta (AI powered)
{
"body": {
"document": {
"pageCount": "1",
"pageCountWithOCRPerformed": "0",
"page": [
{
"index": "0",
"width": "595.320007324219",
"height": "841.919982910156",
"OCRWasPerformed": "False",
"row": [
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "24.0",
"fontStyle": "Bold",
"color": "#538DD3",
"x": "36.00",
"y": "34.44",
"width": "242.81",
"height": "24.00",
"text": "Your Company Name",
"meta": {
"text": {
"style": "h1",
"type": "text"
}
}
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "76.94",
"width": "66.62",
"height": "11.04",
"text": "Your Address",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "91.46",
"width": "69.14",
"height": "11.04",
"text": "City, State Zip",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": ""
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "461.02",
"y": "115.94",
"width": "98.42",
"height": "11.04",
"text": "Invoice No. 123456",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": ""
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "436.54",
"y": "130.46",
"width": "122.90",
"height": "11.04",
"text": "Invoice Date 01/01/2016",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "36.00",
"y": "154.94",
"width": "63.62",
"height": "11.04",
"text": "Client Name",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "169.70",
"width": "40.34",
"height": "11.04",
"text": "Address",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "184.22",
"width": "69.14",
"height": "11.04",
"text": "City, State Zip",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "233.30",
"width": "28.70",
"height": "11.04",
"text": "Notes",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "36.00",
"y": "316.25",
"width": "22.58",
"height": "11.04",
"text": "Item",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "247.61",
"y": "316.25",
"width": "44.64",
"height": "11.04",
"text": "Quantity",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "398.95",
"y": "316.25",
"width": "26.91",
"height": "11.04",
"text": "Price",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "533.14",
"y": "316.25",
"width": "26.30",
"height": "11.04",
"text": "Total",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "341.33",
"width": "30.62",
"height": "11.04",
"text": "Item 1",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "341.33",
"width": "6.12",
"height": "11.04",
"text": "1",
"meta": {
"text": {
"style": "p",
"type": "integer"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "341.33",
"width": "27.51",
"height": "11.04",
"text": "40.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "341.33",
"width": "27.50",
"height": "11.04",
"text": "40.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "362.45",
"width": "30.62",
"height": "11.04",
"text": "Item 2",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "362.45",
"width": "6.12",
"height": "11.04",
"text": "2",
"meta": {
"text": {
"style": "p",
"type": "integer"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "362.45",
"width": "27.51",
"height": "11.04",
"text": "30.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "362.45",
"width": "27.50",
"height": "11.04",
"text": "60.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "383.57",
"width": "30.62",
"height": "11.04",
"text": "Item 3",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "383.57",
"width": "6.12",
"height": "11.04",
"text": "3",
"meta": {
"text": {
"style": "p",
"type": "integer"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "383.57",
"width": "27.51",
"height": "11.04",
"text": "20.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "383.57",
"width": "27.50",
"height": "11.04",
"text": "60.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
}
]
},
{
"column": [
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "36.00",
"y": "404.93",
"width": "30.62",
"height": "11.04",
"text": "Item 4",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "286.13",
"y": "404.93",
"width": "6.12",
"height": "11.04",
"text": "4",
"meta": {
"text": {
"style": "p",
"type": "integer"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "398.35",
"y": "404.93",
"width": "27.51",
"height": "11.04",
"text": "10.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"x": "531.94",
"y": "404.93",
"width": "27.50",
"height": "11.04",
"text": "40.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "389.11",
"y": "425.83",
"width": "36.75",
"height": "11.04",
"text": "TOTAL",
"meta": {
"text": {
"style": "p",
"type": "text"
}
}
}
},
{
"text": {
"fontName": "Arial",
"fontSize": "11.0",
"fontStyle": "Bold",
"x": "525.82",
"y": "425.83",
"width": "33.62",
"height": "11.04",
"text": "200.00",
"meta": {
"text": {
"style": "p",
"type": "decimal"
}
}
}
}
]
}
]
}
]
}
},
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.json",
"remainingCredits": 98969333,
"credits": 42
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/to/json-meta' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ' \
--data-raw '{
"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-json/sample.pdf",
"inline": true,
"async": false
}'
Samples
- AWS Lambda - Convert PDF To JSON From URL (Node.js)
- AWS Lambda - Convert PDF To JSON From URL (Node.js) (AI Powered)
- C# - Advanced Conversion Options
- C# - Advanced Conversion Options With Rotated Input
- C# - Convert PDF To JSON From URL
- C# - Convert PDF To JSON From URL (AI Powered)
- C# - Convert PDF To JSON From URL Asynchronously
- C# - Convert PDF To JSON From URL Asynchronously (AI Powered)
- C# - Convert PDF To JSON From Uploaded File
- C# - Convert PDF To JSON From Uploaded File (AI Powered)
- C# - Convert PDF To JSON From Uploaded File Asynchronously
- C# - Convert PDF To JSON From Uploaded File Asynchronously (AI Powered)
- Java - Advanced Conversion Options
- Java - Advanced Conversion Options With Rotated Input
- Java - Convert PDF To JSON From URL
- Java - Convert PDF To JSON From URL (AI Powered)
- Java - Convert PDF To JSON From Uploaded File
- Java - Convert PDF To JSON From Uploaded File (AI Powered)
- JavaScript - Advanced Conversion Options
- JavaScript - Advanced Conversion Options With Rotated Input
- JavaScript - Convert PDF To JSON From URL (Node.js)
- JavaScript - Convert PDF To JSON From URL (Node.js) (AI Powered)
- JavaScript - Convert PDF To JSON From URL (Node.js) - Async API
- JavaScript - Convert PDF To JSON From URL (Node.js) - Async API (AI Powered)
- JavaScript - Convert PDF To JSON From Uploaded File (Node.js)
- JavaScript - Convert PDF To JSON From Uploaded File (Node.js) (AI Powered)
- JavaScript - Convert PDF To JSON From Uploaded File (Node.js) - Async API
- JavaScript - Convert PDF To JSON in JQuery
- JavaScript - Convert PDF To JSON in JQuery - Async API
- PHP - Convert PDF To JSON Asynchronously
- PHP - Convert PDF To JSON Asynchronously (AI Powered)
- PHP - Convert PDF To JSON From Uploaded File
- PHP - Convert PDF To JSON From Uploaded File (AI Powered)
- PHP - Extract Images from PDF
- PowerShell - Advanced Conversion Options
- PowerShell - Advanced Conversion Options With Rotated Input
- PowerShell - Convert PDF To JSON From URL
- PowerShell - Convert PDF To JSON From URL (AI Powered)
- PowerShell - Convert PDF To JSON From URL Asynchronously
- PowerShell - Convert PDF To JSON From URL Asynchronously (AI Powered)
- PowerShell - Convert PDF To JSON From Uploaded File
- PowerShell - Convert PDF To JSON From Uploaded File (AI Powered)
- Python - Advanced Conversion Options
- Python - Advanced Conversion Options With Rotated Input
- Python - Convert PDF To JSON From Uploaded File
- Python - Convert PDF To JSON From Uploaded File (AI Powered)
- Python - Convert PDF To JSON From Uploaded File Asynchronously
- Python - Convert PDF To JSON From Uploaded File Asynchronously (AI Powered)
- Salesforce - Convert PDF to JSON
- VB.NET - Advanced Conversion Options
- VB.NET - Advanced Conversion Options With Rotated Input
- VB.NET - Convert PDF To JSON From URL
- VB.NET - Convert PDF To JSON From URL (AI Powered)
- VB.NET - Convert PDF To JSON From URL Asynchronously
- VB.NET - Convert PDF To JSON From URL Asynchronously (AI Powered)
- VB.NET - Convert PDF To JSON From Uploaded File
- VB.NET - Convert PDF To JSON From Uploaded File (AI Powered)
- cURL - Convert PDF To JSON
- cURL - Convert PDF To JSON (AI Powered)
Copyright © 2016 - 2023 PDF.co