read_page_image
Render a PDF page as a PNG image for visual inspection when text extraction fails for formulas, diagrams, or tables. Optionally crop a region to read values from tables or dense data.
Instructions
Render a PDF page (or cropped region) as a PNG for visual inspection.
Use instead of read_page() when text extraction misses formulas, diagrams, or tables.
Workflow:
First call: render the full page (no region, default dpi) to orient yourself. Do NOT raise dpi — default 140 already fills the vision model's 1568 px input limit. Higher DPI just gets downscaled.
ALWAYS crop before reading values. Tables, formulas, and dense data are NOT reliably readable at full-page scale. Call again with region to crop the area of interest. DPI auto-scales to fill 1568 px for the crop — do NOT set dpi manually, it is computed automatically.
Args: filename: PDF filename exactly as shown in search results. page: 1-based page number. dpi: Render resolution (default 140, range 1-600). Leave at default for full-page renders. Ignored when region is set (auto-scaled to fill 1568 px). region: Crop box [x1, y1, x2, y2], each value 0.0–1.0, top-left origin. Required for reading values from tables, formulas, or figures — full-page scale is not reliable for these. Example: [0.0, 0.5, 1.0, 0.8] = band from 50–80% down the page. subfolder: Subfolder as shown in search results. Required when duplicate filenames exist; pass "" for the root folder.
Returns: stdio transport: the PNG file path on the first line — open it with your file-reading tool to view. Full-page renders append a crop-advisory line after the path; when passing the result to a file reader, use only the first line. http transport: the rendered PNG as inline image content (no file access needed). Full-page renders include the crop advisory as an additional text item. On error: a plain-text message describing the problem.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| page | Yes | ||
| dpi | No | ||
| region | No | ||
| subfolder | No |