pdf-text-replace
Automated tool for updating text fields within fillable PDF forms.
Install
mkdir -p .claude/skills/pdf-text-replace && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8888" && unzip -o skill.zip -d .claude/skills/pdf-text-replace && rm skill.zipInstalls to .claude/skills/pdf-text-replace
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Replace text in fillable PDF forms by updating form field values. This skill should be used when users need to update names, addresses, dates, or other text in PDF form fields.Key capabilities
- →Batch modify PDF form field values
- →Preserve fillable form attributes
- →Automated field-by-field string replacement
- →Maintain PDF document structure
- →Generate new output files with updated metadata
How it works
Uses the pypdf library to parse the document's form dictionary and update field values directly without re-rendering the visual layer.
Inputs & outputs
When to use pdf-text-replace
- →Batch update names in tax forms
- →Replace addresses in standard PDF templates
- →Update dates on dynamically generated documents
About this skill
PDF Text Replace Skill
Replace text in fillable PDF forms by updating form field values.
Description
This skill allows you to search and replace text in PDF files that have fillable form fields. It scans all form fields in the PDF, finds fields containing the search text, and replaces it with the replacement text.
Use Cases
- Update names in filled tax forms
- Replace addresses in PDF documents
- Update dates or reference numbers
- Batch update form field values
Requirements
- PDF must have fillable form fields (not flattened)
- Python 3.7+
- pypdf library
Usage
Basic Usage
python /app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py \
/app/uploads/input.pdf \
"OLD TEXT" \
"NEW TEXT" \
/app/uploads/output.pdf
Example: Replace Name in Tax Form
python /app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py \
/app/uploads/f5472.pdf \
"MANISH KUMAR" \
"MANNU KUMAR" \
/app/uploads/f5472_updated.pdf
Script Details
Script: scripts/replace_text_in_pdf.py
Arguments:
input_pdf- Path to input PDF filesearch_text- Text to search for in form fieldsreplace_text- Text to replace withoutput_pdf- Path to save the updated PDF
Output:
- Creates a new PDF with updated field values
- Preserves all form fields (not flattened)
- Reports number of fields modified
Limitations
- Only works with fillable PDF forms (not scanned/image PDFs)
- Replaces text in form field values, not static text
- Case-sensitive search by default
- Cannot modify flattened PDFs
Dependencies
The script requires the pypdf library, which is included in the container requirements.
Error Handling
The script will report errors if:
- Input PDF doesn't exist
- PDF doesn't have fillable form fields
- Search text is not found
- Output path is not writable
When not to use it
- →Scanned PDF documents (images)
- →Flattened PDF forms
- →Documents requiring visual text overlays
Prerequisites
Limitations
- →Cannot update static text not tied to a field
- →Sensitive to exact field name matches
- →Limited to non-flattened forms
How it compares
Updates data fields programmatically instead of using OCR or manual text injection.
Compared to similar skills
pdf-text-replace side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pdf-text-replace (this skill) | 0 | 9mo | Review | Beginner |
| 64 | 6mo | Review | Beginner | |
| zlibrary-to-notebooklm | 6 | 6mo | Review | Beginner |
| pdf-processing-pro | 17 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by instavm
View all by instavm →You might also like
anthropics
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
zlibrary-to-notebooklm
zstmfhy
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
pdf-processing-pro
davila7
Production-ready PDF processing with forms, tables, OCR, validation, and batch operations. Use when working with complex PDF workflows in production environments, processing large volumes of PDFs, or requiring robust error handling and validation.
sam-cogan
Read, extract, create, merge, split, rotate, watermark, encrypt, OCR, or fill forms in PDF files. Triggers: any mention of \".pdf\", \"PDF\", or requests to extract text/tables from PDFs, combine/merge PDFs, split pages, create new PDFs, fill PDF forms, add watermarks, encrypt/decrypt, extract image
pdf-official
javiertarazon
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmaticall...
scan-organizer
FDU-INS
OCR, classify, and organize scanned PDFs into category subfolders using AI vision and language models. Processes medical, financial, insurance, tax, legal, personal, and household documents.