How to convert PDF to JSON from URL for PDF to JSON API in cURL and PDF.co Web API
How to convert PDF to JSON from URL in cURL with easy ByteScout code samples to make PDF to JSON API. Step-by-step tutorial
These source code samples are listed and grouped by their programming language and functions they use. PDF.co Web API was made to help with PDF to JSON API in cURL. PDF.co Web API is the Rest API that provides set of data extraction functions, tools for documents manipulation, splitting and merging of pdf files. Includes built-in OCR, images recognition, can generate and read barcodes from images, scans and pdf.
This rich sample source code in cURL for PDF.co Web API includes the number of functions and options you should do calling the API to implement PDF to JSON API. Open your cURL project and simply copy & paste the code and then run your app! This basic programming language sample code for cURL will do the whole work for you in implementing PDF to JSON API in your app.
ByteScout free trial version is available for FREE download from our website. Programming tutorials along with source code samples are included.
@echo off :: Path of the cURL executable set CURL="curl.exe" :: The authentication key (API Key). :: Get your own by registering at https://app.pdf.co/documentation/api set API_KEY=*********************************** :: Direct URL of source PDF file. set SOURCE_FILE_URL=https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf :: Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'. set PAGES= :: PDF document password. Leave empty for unprotected documents. set PASSWORD= :: Destination JSON file name set RESULT_FILE_NAME=result.json :: Prepare URL for `PDF To JSON` API call set QUERY="https://api.pdf.co/v1/pdf/convert/to/json?name=%RESULT_FILE_NAME%&password=%PASSWORD%&pages=%PAGES%&url=%SOURCE_FILE_URL%" :: Perform request and save response to a file %CURL% -# -X GET -H "x-api-key: %API_KEY%" %QUERY% >response.json :: Display the response type response.json :: Use any convenient way to parse JSON response and get URL of generated file(s) echo. pause
ON-PREMISE OFFLINE SDK
ON-DEMAND REST WEB API
Get Your API Key