
PDF to Image API
File Tools
Convert PDF pages to JPG or PNG images at 72, 150 or 300 DPI. Download one page or a ZIP of them all. Runs in your browser with no upload.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
20 requests per minute
Endpoints
1 endpoint available
Overview
Render PDF pages to JPG or PNG images. Render every page, or pick pages with pages. Password-protected PDFs can be opened with password.
Response
One page comes back as the image itself (image/jpeg or image/png). Several come back as a ZIP (application/zip) of files named like report-page-3.jpg. Headers:
X-Page-Count: number of images returned.X-Downscaled:truewhen a very large page was rendered below the requested DPI to stay within 16 megapixels.
Limits
- One PDF up to 25 MB. At most 100 pages per request; use
pagesto render a long document in parts. - Each image is at most 16 megapixels and 16,000 px on a side.
Endpoints
POST
https://opentools.ca/api/v1/tools/pdf-to-imageConvert PDF pages to JPG or PNG images
Request Body
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Required | The PDF. |
| format | string Enum: jpg, png | Optional | Image format.Default: jpg |
| dpi | integer | Optional | Resolution, 72 to 300. 72 for screens, 150 for most uses, 300 for printing.Default: 150 |
| quality | integer | Optional | JPEG quality, 50 to 100. Ignored for PNG.Default: 90 |
| pages | string | Optional | Pages to render, e.g. "1-3, 5". Empty means every page. |
| password | string | Optional | Password for a protected PDF. |
Response Example
One image (Content-Type: image/jpeg or image/png), or a ZIP of images (Content-Type: application/zip). Headers: X-Page-Count, X-Downscaled.Error Codes
400
Bad Request - missing or invalid fields (see details)401
Unauthorized - missing or invalid API key403
Forbidden - API key inactive or expired, or request IP not allowed413
Payload Too Large - a file is over 25 MB415
Unsupported Media Type - the file is not a PDF422
Unprocessable - the PDF is damaged, needs a password (or the password is wrong), a page number is out of range, or more than 100 pages were requested429
Too Many Requests - more than 20 requests per minute for this key500
Internal Server ErrorCode Examples
# First page as a PNG
curl -X POST https://opentools.ca/api/v1/tools/pdf-to-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@slides.pdf" \
-F "format=png" \
-F "dpi=150" \
-F "pages=1" \
-o slide-1.png
# Every page as JPGs in a ZIP
curl -X POST https://opentools.ca/api/v1/tools/pdf-to-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@slides.pdf" \
-o slides-jpg.zipRather use it in your browser? Open the PDF to Image