How to optimize PDF from URL for PDF optimization API in cURL using PDF.co Web API

How to optimize PDF from URL for PDF optimization API in cURL: Step By Step Tutorial

Today you are going to learn how to optimize PDF from URL in cURL. PDF.co Web API helps with PDF optimization API in cURL. PDF.co Web API is the Web API with a set of tools for documents manipulation, data conversion, data extraction, splitting and merging of documents. Includes image recognition, built-in OCR, barcode generation and barcode decoders to decode bar codes from scans, pictures and pdf.

CURL code snippet like this for PDF.co Web API works best when you need to quickly implement PDF optimization API in your cURL application. Follow the instruction and copy – paste code for cURL into your project’s code editor. Writing cURL application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

PDF.co Web API – free trial version is on available our website. Also, there are other code samples to help you with your cURL application included into trial version.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

OptimizePdfFromUrl.cmd
      
@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-optimize/sample.pdf :: PDF document password. Leave empty for unprotected documents. set PASSWORD= :: Result PDF file name set RESULT_FILE_NAME=result.pdf :: Prepare URL for `Make Searchable PDF` API call set QUERY="https://api.pdf.co/v1/pdf/makesearchable?name=%RESULT_FILE_NAME%&password=%PASSWORD%&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

60 Day Free Trial or Visit PDF.co Web API Home Page

Explore PDF.co Web API Documentation

Explore Samples

Sign Up for PDF.co Web API Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit PDF.co Web API Home Page

Explore PDF.co Web API Documentation

Explore Samples

Sign Up for PDF.co Web API Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Related Samples: