How to read barcode from file for barcode reader API in cURL and PDF.co Web API
Step-by-step tutorial:How to read barcode from file to have barcode reader API in cURL
Every ByteScout tool includes sample cURL source codes that you can find here or in the folder with installed ByteScout product. Barcode reader API in cURL can be applied with PDF.co Web API. 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 simple and easy to understand sample source code in cURL for PDF.co Web API contains different functions and options you should do calling the API to implement barcode reader API. This sample code in cURL is all you need. Just copy-paste it to the code editor, then add a reference to PDF.co Web API and you are ready to try it! This basic programming language sample code for cURL will do the whole work for you in implementing barcode reader API in your app.
PDF.co Web API – free trial version is available on our website. Also, there are other code samples to help you with your cURL application included into trial version.
@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=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx :: Source file to search barcodes in. set SOURCE_FILE=sample.pdf :: Comma-separated list of barcode types to search. :: See valid barcode types in the documentation https://app.pdf.co/documentation/api/1.0/barcode/read_from_url.html set BARCODE_TYPES=Code128,Code39,Interleaved2of5,EAN13 :: Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'. set PAGES= :: Prepare URL for `Barcode Reader` API endpoint set QUERY="https://api.pdf.co/v1/barcode/read/from/url?types=%BARCODE_TYPES%&pages=%PAGES%" echo %QUERY% :: Perform request and save response to a file %CURL% -# -X GET -H "x-api-key: %API_KEY%" -F "file=@%SOURCE_FILE%" %QUERY% >response.json :: Display the response type response.json :: Use any convenient way to parse JSON response and get information about decoded barcodes. echo. pause
ON-PREMISE OFFLINE SDK
ON-DEMAND REST WEB API
Get Your API Key