Images to PDF
images_to_pdfUse this when the user wants to convert JPG to PDF, PNG to PDF, combine photos into one PDF, turn scanned pages or phone photos of documents into a PDF, or make a PDF from pictures or screenshots. It places 1 to 60 JPG or PNG images in the given order, one per page, turns each photo upright from its EXIF orientation, and returns a PDF download that is kept for about 1 hour. Page size fit (each page matches its image), letter, a4 or legal; orientation auto, portrait or landscape; margin 0 to 25 mm; fit contain or cover. Does not read HEIC, WebP, GIF or TIFF (the result says how to export them), does not run OCR and does not edit pixels. Do not use for merging existing PDF files or for converting a PDF into images.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | contain (default) shows the whole image; cover fills the page inside the margin and crops the overflow. Paper sizes only, e.g. contain. | |
| images | Yes | The JPG or PNG images, in page order, e.g. scan-1.jpg, scan-2.jpg. | |
| margin_mm | No | White margin on each side in millimetres, 0 to 25, e.g. 10. Default 0. | |
| page_size | No | Page size, e.g. a4. fit (default) makes each page the size of its image at the image's DPI (72 when the file has none). | |
| orientation | No | Paper orientation for letter, a4 or legal, e.g. auto (default: landscape for wide images, portrait otherwise). Ignored for fit. | |
| output_name | No | File name for the PDF, e.g. receipts-november. Default: the first image name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| note | Yes | ||
| pages | Yes | ||
| images | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| page_plan | Yes | ||
| pdf_bytes | Yes | ||
| pages_verified | Yes | ||
| page_plan_count | No |