How to convert PDF to TIFF from file for PDF to image API in cURL and PDF.co Web API
How to convert PDF to TIFF from file for PDF to image API in cURL: Step By Step Instructions
This page displays the code samples for programming in cURL. PDF to image 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.
Use the code displayed below in your application to save a lot of time on writing and testing code. 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! Use of PDF.co Web API in cURL is also described in the documentation given along with the product.
Trial version of ByteScout is available for free download from our website. This and other source code samples for cURL and other programming languages are available.
@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 :: PDF file. set SOURCE_FILE=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= :: Result TIFF file name set RESULT_FILE_NAME=result.tif :: Prepare URL for `PDF To TIFF` API call set QUERY="https://api.pdf.co/v1/pdf/convert/to/tiff?name=%RESULT_FILE_NAME%&password=%PASSWORD%&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 URL of generated file(s) echo. pause
ON-PREMISE OFFLINE SDK
ON-DEMAND REST WEB API
Get Your API Key