Extract text
extract_textExtract the text layer of a PDF as plain text, page by page and in reading order. Use it to read, summarize, quote, or copy document content.
Instructions
Extracts the text layer of a PDF and returns it as plain text, one "--- Page N ---" section per page, in reading order. Use it to read, summarize or quote a document; to find where a word occurs, search_pdf is faster, and for tables export_table keeps rows and columns. Scanned pages have no text layer and come back marked as empty: run recognize_text on the file first, then extract from its output. Encrypted PDFs need their password. Very long documents stop after about 400,000 characters with a note; ask for fewer pages. Read-only; the file is not changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the PDF. | |
| pages | No | Pages as 1-based numbers and ranges, e.g. "1-3,5". All pages when omitted; a page outside the document is an error. | |
| password | No | Password, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it. |