pdfToimage

Convert selected PDFs or every PDF in the current folder into PNG images, one image per page.

Function

pdfToimage(source=None)

Parameters

source

Type: path, iterable of paths, or None

Optional PDF input. If omitted, all PDFs in the current working folder are discovered.

Returns

A list of `Path` objects for all generated PNG pages, or `None` when no PDFs are found.

Examples

Convert all PDF pages

pdfToimage()

Convert one PDF

pdfToimage("report.pdf")

Convert a merged PDF

pdfToimage(pdfMerge())

Notes

Output is organized as `converted images/<pdf stem>/<pdf stem>_page_N.png`.

Dynamic input behavior

When source is omitted, Toolvix discovers matching files in the current working folder. When source is supplied, only the supplied files are processed. This makes nested pipelines deterministic.

Back to function index · Nesting and chaining