This skill updates text in fillable PDF forms by replacing specified field values, preserving form structure and enabling batch edits.
npx playbooks add skill instavm/coderunner --skill pdf-text-replace
Replace text in fillable PDF forms by updating form field values.
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.
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
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: 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 PDFOutput:
The script requires the pypdf library, which is included in the container requirements.
The script will report errors if:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.