Search text
search_pdfFind every occurrence of a word or phrase in a PDF and return the match count plus page and line locations. Use it to locate text without reading the whole document.
Instructions
Finds every occurrence of a word or phrase in a PDF and returns the count and, for each match, the page number and the line it is on (up to 500). Matching is literal text (no wildcards or regular expressions), case-insensitive by default and Turkish İ/ı aware; a phrase is found within one line of text. Use it to locate something without reading the whole document; to read pages use extract_text, and to black out what was found use redact_pdf with the same words. Scanned pages have no text and give no matches until recognize_text is run. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the PDF. | |
| query | Yes | Word or phrase to find, as plain text. | |
| 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. | |
| match_case | No | Only match the exact upper/lower case (default false). |