imageTopdf

Combine selected supported images into one PDF, or combine every supported image in the current folder.

Function

imageTopdf(output_file="photos.pdf", source=None)

Parameters

output_file

Type: str, default "photos.pdf"

Name of the PDF created inside `converted pdfs/`.

source

Type: path, iterable of paths, or None

Optional image input. Supported formats are JPG, JPEG, PNG, WEBP, and BMP. If omitted, all supported images in the current folder are discovered.

Returns

A `Path` pointing to the created PDF, or `None` when no images are found.

Examples

Combine all images

imageTopdf()

Combine selected images

imageTopdf(source=["one.png", "two.jpg"])

Create a PDF from resized images

imageTopdf(source=imageResize(1280, 720))

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