
Image to PDF API
File Tools
Turn JPG, PNG and other images into a PDF, one image per page. Reorder them, choose A4, Letter or fit-to-image pages, and download. 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
Turn images into a PDF with one image per page, in the order sent. Each image is scaled to fit inside the margins and centred. JPEGs and PNGs are embedded without recompression; JPEGs with an EXIF rotation are turned upright first. Other formats (WebP, GIF, AVIF, TIFF) are converted to PNG.
Page size
a4orletter: standard pages. Withorientation=auto, landscape images get landscape pages.fit: each page is the size of its image (at 96 pixels per inch) plus the margin. Orientation is ignored.
Limits
- 1 to 20 images, up to 25 MB and 100 megapixels each.
- HEIC images are not supported. Convert them to JPEG first.
Endpoints
POST
https://opentools.ca/api/v1/tools/image-to-pdfConvert images to a PDF, one image per page
Request Body
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
| files | file[] | Required | The images (JPEG, PNG, WebP, GIF, AVIF or TIFF), 1 to 20, in page order. |
| pageSize | string Enum: a4, letter, fit | Optional | Page size.Default: a4 |
| orientation | string Enum: auto, portrait, landscape | Optional | Page orientation for a4 and letter. auto picks landscape for wide images.Default: auto |
| margin | string Enum: none, small, large | Optional | Space around each image: none (0), small (18 pt, 1/4 inch) or large (40 pt).Default: small |
Response Example
The PDF file (Content-Type: application/pdf). Named after the image when there is one, otherwise images.pdf.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 - a file is not an image422
Unprocessable - an image could not be read or added to the PDF429
Too Many Requests - more than 20 requests per minute for this key500
Internal Server ErrorCode Examples
curl -X POST https://opentools.ca/api/v1/tools/image-to-pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "files=@page1.jpg" \
-F "files=@page2.png" \
-F "pageSize=letter" \
-F "margin=none" \
-o images.pdfRather use it in your browser? Open the Image to PDF