Link Search Menu Expand Document

PDF To JSON

Related Knowledgebase-Explore Samples

Convert PDF and scanned images into JSON representation with text, fonts, images, vectors, formatting preserved.

Available Methods

[POST] /pdf/convert/to/json2

Auto classification Of Incoming Documents

Use /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.

Parameters

  • url required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section. If you are randomly getting Too Many Requests or Access Denied error for your input url, please try to add cache: to enable built-in url caching.
  • 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 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. Must be a String.
  • unwrap optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be one of: true, false.
  • rect optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.
  • lang optional. Sets language for OCR (text from image) to use for scanned PDF, PNG, JPG documents input when extracting text. 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 link to output file (default).
  • lineGrouping optional. optional. Line grouping within table cells. Set to 1 to enable the grouping. Must be a String.

  • encrypt (legacy, now all files are stored at the encrypted cloud storage by default.

Important: you can also encrypt output files and decrypt input files with user-controlled data encryption (strong AES encryption + custom keys). Click here to learn more.

  • async optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
  • name optional. File name for generated output. Must be a String.
  • expiration (optional). Output link expiration in minutes. Default is 60 (i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage. Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead.
  • profiles optional. Must be a String. Use this param to set additional configuration for fine tuning and extra options. Explore PDF.co knowledgebase for profile examples. For example, to change CSV separator: { 'CSVSeparatorSymbol': ';' }

  • Method: POST
  • URL: /v1/pdf/convert/to/json2

Query parameters

No query parameters accepted.

Body payload

{
    "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/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://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf",
    "inline": true,
    "async": false
}'

[POST] /pdf/convert/to/json-meta (AI powered)

Auto-classification Of Incoming Documents

Use /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 to p and small)
  • 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 AI process. Async mode is recommended for this endpoint.

Parameters

  • url required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section. If you are randomly getting Too Many Requests or Access Denied error for your input url, please try to add cache: to enable built-in url caching.
  • 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 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. Must be a String.
  • unwrap optional. Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be one of: true, false.
  • rect optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.
  • lang optional. Sets language for OCR (text from image) to use for scanned PDF, PNG, JPG documents input when extracting text. 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 link to output file (default).
  • lineGrouping optional. optional. Line grouping within table cells. Set to 1 to enable the grouping. Must be a String.

  • encrypt (legacy, now all files are stored at the encrypted cloud storage by default.

Important: you can also encrypt output files and decrypt input files with user-controlled data encryption (strong AES encryption + custom keys). Click here to learn more.

  • async optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
  • name optional. File name for generated output. Must be a String.
  • expiration (optional). Output link expiration in minutes. Default is 60 (i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage. Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead.
  • profiles optional. Must be a String. Use this param to set additional configuration for fine tuning and extra options. 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://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/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://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf",
    "inline": true,
    "async": false
}'

Knowledgebase

Samples