maisecrets / PDFs and images
Choose what happens to PDFs and images
maisecrets cannot look inside an image or a PDF. When the AI reads one, the client sends its bytes to the model, and a password or an address in it goes along. You decide what happens, per type.
What the model sees
Invoice 2026-118
Billing: billing@acme-gmbh.de
IBAN DE89 3704 0044 0532 0130 00
Invoice 2026-118
Billing: ⟦EMAIL_c3:bi•••@•••.de⟧
IBAN ⟦IBAN_c2⟧
With convert, the program pdftotext extracts the text on your computer, and maisecrets masks it like any tool result. The PDF itself never reaches the model and does not stay in the session transcript.
The setting
| Setting | allow (default) | ask | block | convert |
|---|---|---|---|---|
read_pdf | the PDF goes as it is | Claude Code asks you first | refused | only its text goes, masked |
read_image | the image goes as it is | Claude Code asks you first | refused | not available: no OCR |
Send it as your own prompt, for example /maisecrets:settings read_pdf convert. convert needs pdftotext: on macOS brew install poppler, on Debian or Ubuntu sudo apt install poppler-utils. Without it, maisecrets refuses every PDF and says so. It never lets the PDF through.
- A PDF locked by a password is refused, and the AI is told the cause and not to ask you for the password. A PDF with only an owner password converts.
- A scanned PDF has no text. Below 25 characters of text per page, maisecrets says that the PDF looks scanned, and the AI gets nothing of it.
- A damaged or very large PDF is refused: more than 6 seconds or 512 MB of memory for
pdftotext. Text after 32K characters is cut. - Folders you know are clean, such as your own screenshots:
/maisecrets:settings clean_dirs add ~/Pictures/Screenshots. A file counts only if it was there before the session began.
Limits
blockacts on the Read tool of Claude Code. A shell command such aspdftotext x.pdf -still gives the AI text, and maisecrets masks that text like any command output.- An image that you paste into the prompt, and an image in the result of an MCP tool, reach the model without a hook. maisecrets cannot stop them.
- In Codex, these settings change nothing that was measured: Codex has no Read tool.
- On Windows,
convertrefuses: there is no fixed install folder forpdftotext.
All details and the measurements: README.