Inspect a PDF
pdf_infoInspect a PDF to report page count, metadata, text-layer presence, scanned status, and table of contents. Use this first to choose text extraction or page rendering and jump to chapters.
Instructions
Open a PDF and report what it is: page count, document metadata, whether it has a real text layer, and its table of contents.
Call this first, before pdf_read or pdf_render_page. It tells you which reading strategy works:
hasTextLayer true → pdf_read returns the actual text, page by page.
scanned true → the pages are images with no text at all. pdf_read cannot help; use pdf_render_page to render pages and read them visually.
The returned toc lists top-level entries with the page each one starts on, so you can jump
straight to the chapter a question is about instead of paging through the document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the PDF (absolute, or relative to the server root). | |
| toc_limit | No | How many top-level outline entries to include (default 40). |