convert_pdf_to_markdown
Convert a PDF document to clean Markdown, preserving headings, tables, lists, and reading order. Accepts a URL or base64, with options for page selection and large document handling.
Instructions
Convert a PDF document to clean Markdown, preserving headings, tables, lists and reading order. Use this whenever an agent needs to read a PDF: reports, papers, invoices, manuals, slide exports. Accepts a public URL or base64 content; no API key needed.
For large PDFs, convert selected pages ('pages': '1,3-5') or page through
the output with 'offset'/'max_chars'. Scanned PDFs are rejected with a
hint to use ocr_document instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) URL of the document to fetch and convert. Leave empty when passing file_base64 instead. | |
| pages | No | 1-based page selection like '1,3-5'. Empty means all pages. | |
| offset | No | Character offset to resume a truncated conversion (from a previous response footer). | |
| filename | No | Original filename with extension (e.g. 'report.docx'). Used as a format hint when content type cannot be detected automatically. | |
| password | No | Password for encrypted PDFs. Empty for normal files. | |
| max_chars | No | Maximum characters to return (default 40000, max 200000). | |
| file_base64 | No | Base64-encoded file content (for documents not reachable by URL). Decoded size limit: 30 MB. Leave empty when passing url instead. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |