PDF to images
pdf_to_imagesRender PDF pages into PNG, JPEG, or WebP files with selectable DPI, page range, quality, and transparent backgrounds.
Instructions
Render PDF pages to PNG, JPEG or WebP images in a folder (one file per page, named -p001.png…). Choose the DPI (72 = screen size, 150 = default, 300 = print), JPEG/WebP quality, a page range, and a transparent background for PNG/WebP. Very large pages are capped at 16384 px a side / 16.7 megapixels, like the website. Web version: https://s3eidat.github.io/pdf-to-images/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | No | Resolution in dots per inch. Default 150. | |
| file | Yes | The PDF: a local file path (absolute, or relative to the server's --root) or base64 data (raw or a data: URI). | |
| pages | No | Pages to render: 1-based list like "1-3, 5, 8-" ("5-" = to the end, "-3" = first three, "3-1" = reversed). Also "all", "odd", "even", "last". Empty = all pages. | |
| format | No | Image format. Default "png". | png |
| output | No | Folder to write the images into (created if missing). Default: a new folder in the server output folder. | |
| quality | No | JPEG/WebP quality 1-100. Default 90. | |
| password | No | Password, if the PDF is protected. | |
| transparent | No | Keep the page background transparent (PNG/WebP only). |