Images to PDF
pdf_from_imagesConverts JPEG, PNG, WebP, GIF, TIFF, AVIF, or SVG images into a PDF with one image per page, in the order provided, with selectable page size, orientation, margins, and quality.
Instructions
Make a PDF from images (JPEG, PNG, WebP, GIF, TIFF, AVIF, SVG…), one image per page, in the order given. Page size A4, Letter, or "fit" (page = image size at 96 dpi); orientation auto/portrait/landscape; margin in mm; quality "original" (JPEG/PNG kept as-is), high (≤3000 px, JPEG 90), medium (≤2000 px, 75) or small (≤1400 px, 60). Photos are turned upright from their EXIF orientation. Web version: https://s3eidat.github.io/images-to-pdf/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| images | Yes | Images in page order: path/base64 strings, or {file, rotate}. | |
| margin | No | Margin around each image in mm. Default 10. | |
| output | No | Where to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set). | |
| quality | No | Image quality / size trade-off. Default "high". | high |
| pageSize | No | Page size. Default "a4". | a4 |
| orientation | No | "auto" turns the page to match each image. Ignored for "fit". | auto |
| returnBase64 | No | Also return the output as base64 in the result (only for small files). Default false. |