Delete Page Action: deletePage
The deletePage action is used to remove pages containing specific text from a PDF file. This is particularly helpful for editing PDF documents by excluding irrelevant or sensitive information.
Example: You want to remove all pages containing the text “Draft” from a PDF document named QuarterlyReport.pdf between pages 1 and 15.
Steps to Configure:
- Add a new step.
- Select Set a Variable Value from the Action dropdown.
- Enter a variable name in Element Key (e.g., PageDeletionResult). This variable will store the result of the operation (true or false).
- Click on Form, select Functions, and choose PDF Handler Functions.
- In the Cmd field, select deletePage and provide the following parameters:
- FPath: Specify the path to the PDF file (e.g., C:\Reports\QuarterlyReport.pdf).
- Start: Define the starting page for the operation (e.g., 1).
- End: Define the ending page for the operation (e.g., 15).
- Text: Specify the text to identify the pages to delete (e.g., ” Draft”).
- Click Save.


Outcome on execution:
- The specified pages containing the given text are removed from the PDF file.
- A boolean result (true/false) is stored in the variable defined in the Element Key. This variable can be referenced in subsequent steps of the automation process using the syntax ${VariableName} (e.g., ${PageDeletionResult}).