How to convert DOC to PDF from file for DOC to PDF API in cURL and PDF.co Web API

How to convert DOC to PDF from file for DOC to PDF API in cURL: Step By Step Instructions

These source code samples are listed and grouped by their programming language and functions they use. PDF.co Web API was designed to assist DOC to PDF 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.

If you want to speed up the application’s code writing then cURL code samples for cURL developers help to implement using PDF.co Web API. This cURL sample code can be used by copying and pasting into your project. Once done,just compile your project and click Run. Easy to understand tutorials are available along with installed PDF.co Web API if you’d like to learn more about the topic and the details of the API.

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.

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

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

Convert-DOC-to-PDF-from-File.cmd
      
@echo on :: 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= :: DOC file. set SOURCE_FILE=sample.docx :: Result PDF file name set RESULT_FILE_NAME=result.pdf :: Prepare URL for `DOC to PDF` API call set QUERY="https://api.pdf.co/v1/pdf/convert/from/doc?name=%RESULT_FILE_NAME%" 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

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: