The PDF Converter API converts any supported file formats into PDF. It can preserve the table structure of CSV and XLS as well as preserve the layout of HTML and DOCS to mention a few. This API has several endpoints for specific file formats with their own custom parameters and configurations. Kindly explore our supported file formats below:

CSV to PDF URL to PDF
HTML to PDF Email to PDF
XLS to PDF Image to PDF
DOC to PDF

The PDF.co platform keeps your data secure. We use SSL, TLS, and file encryption to protect your files and accounts. Please check out our Security page https://pdf.co/security to learn more.

PDF Converter API Benefits

Preserve Layout

The PDF Converter API preserves the layout of the original file when converted to PDF. Our engine uses an advanced configuration to maintain the structure of tables, rows, and columns as well as the text formatting of the file.

Large Files Support

The API supports large file conversion. It can process files that are over 100 MB in size using the parameter async:true. This feature runs the job in the background and returns a Job Id to check the job status.

On-Premise API Server

PDF.co offers an on-demand service and an on-premise API Server for businesses and enterprises. The on-premise API Server is customizable and you can pick and choose modules for your specific needs.

Sign Up

PDF Converter API Integrations

PDF.co has over 300+ app integration. Kindly explore our following plugins:

PDF Converter API Samples & Demo

In this demonstration we will use the DOC to PDF conversion /v1/pdf/convert/from/doc endpoint to showcase the PDF Converter API. We have a 1-page DOC that contains text and image. Once the request has been processed we will have an identical document but in PDF format. Please see the side by side graphic of the input DOC and output PDF below.

PDF.co PDF Converter API Input File
Images of Input DOC and Output PDF

Before we start coding, let’s get to know the /v1/pdf/convert/from/doc endpoint’s parameters.

Endpoint

URL: https://api.pdf.co/v1/pdf/convert/from/doc
Method: POST
Parameter Description
url required. Link to the source file.
pages optional. Comma-separated list of page indexes or ranges to process.
encrypt optional. Enable encryption for the output file: true or false
async optional. Runs processing asynchronously. Returns jobId to use with job/check: true or false
name optional. Output file name.
profiles optional. Must be a String. Set custom configuration. See profiles examples here

cURL Code Snippet

curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/from/doc' \
--header 'x-api-key: {{x-api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/doc-to-pdf/sample.docx",
    "pages": "0-",
    "name": "result.pdf"
}'

This sample code and other cURL codes are available in our Github repository here.

Let’s see the PDF Converter API in action using the cURL code above.

PDF.co PDF Converter API Output
DOC to PDF Conversion Demo

The DOC to PDF JavaScript sample codes are available here.

The DOC to PDF PHP sample codes are available here.

The sample code for DOC to PDF in Python is here.

The DOC to PDF Java sample codes are available here.

The DOC to PDF C# sample codes are available here.

Sign Up

Related Samples: