원클릭으로
pdf-text-replace
// 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.
// 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.
| name | pdf-text-replace |
| description | 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. |
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: