Read PDF Images
read_imagesExtract embedded images from a PDF file as base64-encoded data with metadata including dimensions and color space. Supports page range selection.
Instructions
Extract images from a PDF document as base64-encoded data.
Extracts embedded images from specified or all pages. Returns image metadata (dimensions, color space) along with raw pixel data in base64.
Args:
file_path (string): Absolute path to a local PDF file
pages (string, optional): Page range. Format: "1-5", "3", or "1,3,5-7". Omit for all pages.
Returns: Array of extracted images with: page number, index, width, height, color space (RGB/RGBA/Grayscale), bits per component, and base64-encoded data.
Note: Large images may produce very large responses. Use the pages parameter to limit scope.
Examples:
Extract all images: { file_path: "/path/to/doc.pdf" }
Extract from page 1: { file_path: "/path/to/doc.pdf", pages: "1" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to a local PDF file (e.g., "/path/to/document.pdf") | |
| pages | No | Page range to process. Format: "1-5", "3", or "1,3,5-7". Omit for all pages. |