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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"outputDir": "<outputDir>"
},
"name": "extract_images"
}
}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. |