Why use PDF to JPG API?
Convert multiple-page PDF to JPG
Using our PDF to JPG API you can convert your PDF Files into JPG fast and easily. You can convert multiple paged PDFs into multiple JPG’s as well.
Web API Automation Platforms Integrations
PDF.co API platform supports multiple programming languages that programmers can use: PHP, Javascript, Java, C#, .NET and ASP.NET, Visual Basic, and others.
If you’re not a programmer, you can use PDF.co through automation platforms such as:
- Zapier – https://pdf.co/zapier
- Integromat – https://pdf.co/integromat
- Make https://pdf.co/make
- Airtable https://pdf.co/airtable
- Bubble https://pdf.co/bubble
- Salesforce https://pdf.co/salesforce
- Google Apps Script https://pdf.co/apps-script
- UiPath – https://pdf.co/uipath
- BluePrism – https://pdf.co/blueprism
- Automation Anywhere – https://pdf.co/automation-anywhere
- Programming languages: Javascript, PHP, Python, C#, and Java
On-Prem Version for Enterprise
PDF.co platform operates on secure and certified cloud infrastructure. We also have an on-premise version that works on your server and can even run completely offline when required for enterprise customers who process sensitive data.
PDF to JPG API Sample & Demo
For this demo, I am going to use a Sample PDF File.

The code snippets used below can be written in different programming languages. The Web API engine adds text to our sample PDF file. The final result will look like this.


Before we proceed with the code, let us first check the /v1/pdf/convert/to/jpg
parameters and its uses.
Endpoint
URL: | https://api.pdf.co/v1/pdf/convert/to/jpg |
Method: | POST |
Parameter | Description |
url | required. Link to the source file. |
pages | optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts with 0 (zero). To set a range use the dash –, for example: 0, 2-5, 7-. |
rect | optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. Must be a string . |
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 |
Now we are ready to write some codes.
cURL Code Snippet
curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/to/jpg' \ --header 'x-api-key: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf", "pages": "0-" }'
This sample code and other cURL source code samples are available here.
Now let’s see this program in action.

Source code samples in JavaScript are available here.
Source code samples in Java are available here.
Source code samples in C# are available here.
Source code samples in PHP are available here.
NOTE: Use PDF.co Document Classifier to know the source of the document. You can easily create and maintain classification rules with the desktop-based Classifier Testing Tool (see the details here)