Productivity
pdf-text-replace avatar

pdf-text-replace

Update text within fillable PDF forms programmatically. Efficiently modify names, dates, addresses, and reference numbers in form fields while preserving document structure.

Introduction

The pdf-text-replace skill provides a specialized utility for AI agents to interact with and modify fillable PDF documents. This tool is designed for scenarios requiring batch processing or automated updates to PDF form data without the need for manual editing. By leveraging the pypdf library, the skill extracts metadata from form fields and enables precise search-and-replace operations on the text stored within those specific fields. It is an essential asset for document workflows where standardized forms, such as tax filings, legal agreements, or administrative registrations, must be dynamically populated with unique user-specific information.

  • Performs automated search-and-replace operations specifically targeting interactive PDF form fields.

  • Preserves the integrity of the fillable form structure, ensuring the output remains a functional, non-flattened PDF document.

  • Ideal for bulk data processing, allowing agents to ingest a set of variables and apply them to standard PDF templates programmatically.

  • Reports granular metrics, including the total number of fields modified during the execution, providing verification for the agent.

  • The skill requires input PDFs to contain active, fillable form fields; it does not perform optical character recognition (OCR) on static or scanned images.

  • Operates by targeting internal field values; it cannot be used to edit static body text, images, or flattened document layers.

  • Case-sensitive search is applied by default, which is critical for maintaining consistency in official or legal naming conventions.

  • Input requirements include a valid path to the source PDF, the exact search string, the desired replacement text, and a target output path for the modified document.

  • The tool is highly recommended for administrative automation, document management pipelines, and streamlining data entry tasks in AI-driven workflows.

Repository Stats

Stars
820
Forks
36
Open Issues
7
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
May 1, 2026, 09:21 AM
View on GitHub