Read PDF from URL
read_urlFetch a PDF from a URL and extract its text content with options for column reordering and whitespace compaction.
Instructions
Fetch a PDF from a URL and extract its text content.
Downloads the PDF from the specified URL, then extracts text with Y-coordinate-based reading order. Supports HTTP and HTTPS. Maximum file size: 50MB. Timeout: 30 seconds.
Like read_text, accepts split_columns: 2 | 3 for untagged multi-column PDFs and compact_whitespace: true to collapse U+3000 / ASCII whitespace runs. Tagged PDFs should use extract_tables instead.
Args:
url (string): URL pointing to a PDF file (HTTP or HTTPS)
pages (string, optional): Page range to extract. Format: "1-5", "3", or "1,3,5-7". Omit for all pages.
response_format ('markdown' | 'json'): Output format (default: 'markdown')
split_columns (1 | 2 | 3, optional): Column-aware reordering. Default 1 = existing Y-sort.
compact_whitespace (boolean, optional): Collapse whitespace runs (incl. U+3000) to one ASCII space. Default false.
Returns: Extracted text organized by page number, same format as read_text.
Examples:
Read remote PDF: { url: "https://example.com/document.pdf" }
Untagged 2-column PDF: { url: "https://...", split_columns: 2 }
Japanese form: { url: "https://...", compact_whitespace: true }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL pointing to a PDF file (HTTP or HTTPS) | |
| pages | No | Page range to process. Format: "1-5", "3", or "1,3,5-7". Omit for all pages. | |
| response_format | No | Output format: "markdown" for human-readable, "json" for structured data | markdown |
| split_columns | No | Number of columns to use when reordering text. 1 (default) = existing Y-sort. 2 or 3 = bucket by X-coordinate left-to-right. Use for untagged 新旧対照表 / two-column PDFs where Y-sort would interleave columns. Tagged PDFs with proper <Table> markup should use extract_tables instead. | |
| compact_whitespace | No | When true, collapse runs of whitespace (incl. fullwidth space U+3000) to a single ASCII space and trim each line. Reduces token consumption on Japanese form-style PDFs. Default: false (no whitespace normalization). |