Replace text (overlay)
pdf_replace_textFind an exact string in a PDF page and overlay a white patch with replacement text. Intended for cosmetic fixes only; original text remains copyable and is not redacted.
Instructions
Find a string on a page and draw a white patch with the replacement on top. IMPORTANT: this is an overlay, not a true content-stream edit — the original text layer stays, so copy-paste still returns the old string. Font is substituted with Helvetica (Latin-1 only). Use it for cosmetic fixes, not for redaction.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"find": "<find>",
"replace": "<replace>"
},
"name": "pdf_replace_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | replace every match (default: first only) | |
| out | No | ||
| find | Yes | exact substring as it appears in a single text item | |
| page | No | limit to one page | |
| path | Yes | ||
| replace | Yes |