The Image to PDF API can convert JPG, PNG, and TIFF image formats to PDF. The Web API can convert one or more images as well as a mixture of the three supported formats at the same time. The images are individually converted as PDFs. When processed together, they can all be merged into a single PDF with multiple PDF pages.

The PDF outputs generated by the Web API are temporarily stored in our server. They will automatically be deleted after 1 hour for security purposes. To learn more about PDF.co Security, check out https://pdf.co/security

SIGN UP FOR FREE

JPG to PDF Benefits

Multiple Format Support

Aside from the JPG image format, the Image to PDF Web API supports two other most common image formats – PNG and TIFF. The engine is capable of converting all three different formats in one go. Each image will be converted as a single PDF page. When several images are converted at the same time, they will all be merged into a single PDF with multiple pages.

Large File Support

The Image to PDF Web API can convert files larger than 10MB. It supports the asynchronous mode which allows background processing and job check. When dealing with large files, it is considered a good practice to always set the async mode to true.

Fine-tuning and Custom Configurations

You can set the image quality to control the output PDF file size. Also, you can use other functions provided by PDF.co Web API to further process generated PDF files. For example, you can convert it into a text-searchable PDF, you can split PDF, merge PDF or use your PDF file as a template for new PDF files.

Web API and Business Automation Platforms Integrations

PDF.co platform can be used by software developers from programming languages such as Javascript, PHP, Java, .NET and ASP.NET, C#, Visual Basic, and many others.

If you are not a developer then you can also easily automate your pdf operations through business automation platforms such as ZapierIntegromat, and hundreds of others.

Enterprise Solutions

For enterprise customers, there is a Dedicated API Server that runs as a dedicated private server with dedicated private cloud storage in the hosting region of your choice.


SIGN UP FOR FREE

JPG to PDF Samples & Demo

In this demonstration, we will convert 2 images into PDF. The first image is in PNG and the second image is in JPG format. We will use the /v1/pdf/convert/from/image endpoint to perform this task. Below is the GIF of the 2 source files and the PDF output.

JPG To PDF Input Images And Output PDF
Images of the JPG to PDF Input and Output

Let’s go over the /v1/pdf/convert/from/image endpoint’s parameters and their corresponding functions real quick.

Endpoint

URL: https://api.pdf.co/v1/pdf/convert/from/image
Method: POST
Parameter Description
url required. URL to the source file.
cache: to enable built-in URL caching.
encrypt optional. Enable encryption for the output file. Must be one true or false.
async optional. Runs processing asynchronously.
name optional. name of the output file.
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/image' \
--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/image-to-pdf/image1.png,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg"
}'

The Image to PDF Web API cURL source code samples is available here.

Let’s see the Image to PDF Web API in action using our cURL sample code.

JPG To PDF API Demo
Image to PDF API Demo

The Image to PDF Web API JavaScript sample code is available here.

The Image to PDF Web API PHP sample code is available here.

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

The Image to PDF Web API Java sample code is available here.

The Image to PDF Web API C# sample code is available here.

Sign Up

Related Pages:

Related Samples: