Skip to content

Replace Text Pdf Action: replaceTextPdf

The replaceTextPdf action is used to locate and replace specific text within a PDF file. It enables automated text updates in PDF documents by replacing the old value with a new value based on a given search term.

Example: You have a contract template stored as a PDF with placeholders for client information, such as “Client Name:” and “Date:”. You want to replace these placeholders with actual client details.

Steps to Configure:

  1. Add a new step.
  2. Select SET from the Action dropdown.
  3. Enter a variable name in Element Key (e.g., UpdatedPDFPath). This variable will store the path to the updated PDF file.
  4. Click on Form, select Functions, and choose PDF File Handler Functions.
  5. In the action field, select replaceTextPdf and provide the following parameters:
    • fPath: Specify the path to the PDF file where the text replacement will be performed (e.g., C:\Contracts\Template.pdf).
    • searchTerm: Define the term that serves as the basis for locating the text to be replaced (e.g., Client Name:).
    • oldValue: Specify the original text to be replaced (e.g., Client Name: [Placeholder]).
    • newValue: Enter the new text that will replace the old value (e.g., Client Name: John Doe).
  6. Click Save.
v7_pdf_file_handler_replaceTextPdf_list_view
List View
v7_pdf_file_handler_replaceTextPdf_grid_view
Grid View

Outcome on execution:

  • All occurrences of “Client Name: [Placeholder]” in the PDF file will be replaced with “Client Name: John Doe”.
  • The updated PDF file’s path will be stored in the variable defined in the Element Key field for further use in automation workflows.
  • This variable can be referenced in subsequent steps of the automation process using the syntax ${VariableName} (e.g., ${UpdatedPDFPath}).

Match the text exactly: The searchTerm and oldValue are case-sensitive. Make sure they match the text in the PDF, including capitalization and spacings.

Last updated: Sep 11, 2025
Back To Top