Extract embedded images
extract_imagesExtract images from a PDF file, writing each as a PNG. Skips and reports images with unsupported pixel layouts.
Instructions
Pull embedded images out of a PDF and write each as a PNG. Unsupported pixel layouts (e.g. CMYK, palettized) are skipped and reported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the source PDF. | |
| pages | No | 1-based page range. Omit for all pages. Format: "1-5" or "1,3,5-7". | |
| basename | No | Stem for output filenames. Default = source name. Final form: '<stem>-p001-img01.png'. | |
| outputDir | Yes | Directory to write extracted images into. |