PDF information
get_pdf_infoInspect an unknown PDF to get page count, sizes, metadata, encryption status, and pages lacking a text layer, so you can decide whether to extract, OCR, or search.
Instructions
Reads a PDF's overview and returns it as text: page count, page sizes in mm, title, author, subject, keywords, creating program, dates, whether it is encrypted, and which pages have no text layer (scans that need recognize_text). Call it first on an unknown file to decide what to do next; for the text itself use extract_text, to find a word use search_pdf. Read-only. An encrypted PDF needs its password; a missing or damaged file is reported as an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the PDF. | |
| 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. |