PDF To Images
PDF To Images
Section titled “PDF To Images”Type: pdf-to-images · Package: PDF Activities v1.1.0 · Output: List
Renders the pages of a PDF to PNG files. It is the bridge between a scanned PDF (one with no selectable text) and the activities that work on images: OCR and the vision ones.
How it works
Section titled “How it works”It renders each requested page to a PNG inside outputDir (created if it does not exist) and returns the list of paths of the created files, in page order.
Files are named <prefix>_<page>.png with the page number padded to three digits — for example invoice_001.png, invoice_002.png. If you do not set prefix, the source PDF filename without extension is used.
The dpi decides the render quality: higher DPI improves OCR accuracy, at the cost of speed and file size. The default is 200, which is usually a good balance for documents.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | Path to the source PDF. |
outputDir | expression | Directory where the PNG files are saved. Created if it does not exist. |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
pages | expression | Pages to render: "all" (default) or a range such as "1-3,5,7-9". |
dpi | expression | Render resolution. Default 200. Between 36 and 1200. |
prefix | expression | Filename prefix for the output files. Defaults to the PDF filename without extension. |
Output
Section titled “Output”Returns a List with the paths of the created PNG files, one per rendered page.
Example
Section titled “Example”Read a scanned PDF by running OCR page by page:
PDF To Images path = = scanPath outputDir = "C:/temp/pages" dpi = 300 → output: imagesFor Each collection = = images itemVariable = image └─ activities: OCR Recognize File path = = image language = "eng" → output: text Log message = = textRender only the first page:
PDF To Images path = = filePath outputDir = "C:/temp" pages = "1" prefix = "cover" → output: imagesRelated activities
Section titled “Related activities”- OCR Recognize File — read the text of the generated images.
- PDF Get Words — if the PDF does have text, get the words with coordinates that line up with these images at the same DPI.
- PDF Get Text — extract text without going through images.