List the images in a PDF
list_pdf_imagesUse this when the user wants to know which images a PDF contains, how many images are on each page, or their pixel sizes, before extracting them. Takes one attached PDF, optional pages (e.g. "1-3, 8"), optional minimum width and height in pixels, and dedupe (default true), and returns each embedded image with page, pixel size, colour space, bits, compression, whether it will be a JPEG or PNG file, duplicates, and skipped images with the reason. Makes no file. Does not open password-protected PDFs, does not run OCR, and does not render pages or vector drawings as images. Do not use when the user wants the image files (use extract_pdf_images).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The PDF whose images you want, e.g. brochure.pdf. | |
| pages | No | Pages to read, e.g. "all" (default) or "1-3, 8, 10-end". | |
| dedupe | No | true (default): an image that appears more than once (same image data) is kept once and its repeats are listed as duplicates. false: list and extract each use. | |
| images | No | Image numbers on one page, as list_pdf_images shows them ("image_on_page"), e.g. "4-end" or "2, 5". Use together with pages set to one page. Default: all images. | |
| min_width | No | Leave out images narrower than this many pixels, e.g. 100 to skip small icons. Default 1 (keep all). | |
| min_height | No | Leave out images shorter than this many pixels, e.g. 100. Default 1 (keep all). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| png | Yes | ||
| file | Yes | ||
| jpeg | Yes | ||
| notes | Yes | ||
| pages | Yes | ||
| images | Yes | ||
| listed | Yes | ||
| skipped | Yes | ||
| per_page | Yes | ||
| settings | Yes | ||
| truncated | Yes | ||
| duplicates | Yes | ||
| pages_read | Yes | ||
| images_count | No | ||
| images_found | Yes | ||
| skip_reasons | Yes | ||
| inline_images | Yes | ||
| per_page_count | No | ||
| smaller_than_minimum | Yes |