PDF Tools
Convert PDF to PNG Images
Converts each page of a PDF into a color PNG image. Useful for page previews, thumbnails, and sending document pages to image-based tools.
Uses
Use this task for turning a PDF into images, for example to show a preview of each page or to pass the pages to an AI agent that reads images.
Basic Usage
Parameters Explained
files required array
An array of PDF files to convert to images.
dpi optional number
The resolution of the images in dots per inch. Defaults to 300. A higher value gives sharper images but larger files, and the task takes longer to run. Must be a whole number greater than 0.
function required string
The pdf_tools function to call, in this case it would be pdf_to_png
Result
Every page of each PDF becomes its own color PNG image. A PDF with three pages returns three images.
The newly created files are returned in files. The same files are returned in attachments, which adds them to the stub's attachments.