batch_modify_pdf_content
Apply text replacements to multiple PDF files in a batch, with independent processing that continues despite individual file errors.
Instructions
Apply the same text replacements to multiple PDF files at once.
Each file is processed independently -- a failure in one file does
not stop the rest of the batch. Output files are written to
output_dir using the same filename as the input.
Args: input_paths: List of absolute paths to input PDF files. output_dir: Directory where modified PDFs will be saved. replacements: Dictionary mapping old text to new text. use_regex: If true, treat keys as regex patterns. password: Optional password if PDFs are encrypted.
Returns: JSON string with batch results including per-file status.
Example: batch_modify_pdf_content( ["/path/a.pdf", "/path/b.pdf"], "/path/output", {"Draft": "Final", "2024": "2025"} )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_paths | Yes | ||
| output_dir | Yes | ||
| replacements | Yes | ||
| use_regex | No | ||
| password | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |