Tooluck logoTooluck
SKILL.md

pdf-text-replace

Agent skill frominstavm/coderunner

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.

How to install pdf-text-replace

install pdf-text-replace
# install the coderunner pack with the skills CLI
npx skills add instavm/coderunner

# or add only this skill to Claude Code: copy the folder

skills/public/pdf-text-replace/

# into

~/.claude/skills/pdf-text-replace/ (all projects)

.claude/skills/pdf-text-replace/ (one project)

skills/public/pdf-text-replace/SKILL.md

Apache-2.0Full file
1# PDF Text Replace Skill
2
3Replace text in fillable PDF forms by updating form field values.
4
5## Description
6
7This 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.
8
9## Use Cases
10
11- Update names in filled tax forms
12- Replace addresses in PDF documents
13- Update dates or reference numbers
14- Batch update form field values
15
16## Requirements
17
18- PDF must have fillable form fields (not flattened)
19- Python 3.7+
20- pypdf library
21
22## Usage
23
24### Basic Usage
25
26```bash
27python /app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py \
28 /app/uploads/input.pdf \
29 "OLD TEXT" \
30 "NEW TEXT" \
31 /app/uploads/output.pdf
32```
33
34### Example: Replace Name in Tax Form
35
36```bash
37python /app/uploads/skills/public/pdf-text-replace/scripts/replace_text_in_pdf.py \
38 /app/uploads/f5472.pdf \
39 "MANISH KUMAR" \
40 "MANNU KUMAR" \
41 /app/uploads/f5472_updated.pdf
42```
43
44## Script Details
45
46**Script:** `scripts/replace_text_in_pdf.py`
47
48**Arguments:**
491. `input_pdf` - Path to input PDF file
502. `search_text` - Text to search for in form fields
513. `replace_text` - Text to replace with
524. `output_pdf` - Path to save the updated PDF
53
54**Output:**
55- Creates a new PDF with updated field values
56- Preserves all form fields (not flattened)
57- Reports number of fields modified
58
59## Limitations
60…

Excerpt shown under the repository's Apache-2.0 license.

More skills in coderunner

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates