The Image to PDF API can convert JPG, PNG, and TIFF image formats to PDF. The 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 API is 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

JPG to PDF Benefits

Multiple Format Support

Aside from the JPG image format, the Image to PDF 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.

SIGN UP FOR FREE

Large File Support

The Image to PDF 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.

On-Premise API Server

PDF.co offers an on-premise API Server option to businesses and enterprises. This enables them to run the PDF.co API modules within their own server and gives them more control with regard to the data flow. To get a trial, please contact our support team.

Fine-tuning and Custom Configurations

You can set the image quality to control output PDF file size. Also, you can use other functions provided by PDF.co 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.

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.

JPG to PDF Integrations

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

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 API cURL sample codes are available here.

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

JPG To PDF API Demo
Image to PDF API Demo

The Image to PDF API JavaScript sample codes are available here.

The Image to PDF API PHP sample codes are available here.

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

The Image to PDF API Java sample codes are available here.

The Image to PDF API C# sample codes are available here.

Sign Up

Related Samples: