Skip to content

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:

  1. Add a new step.
  2. Select Set a Variable Value from the Action dropdown.
  3. Enter a variable name in Element Key (e.g., PageDeletionResult). This variable will store the result of the operation (true or false).
  4. Click on Form, select Functions, and choose PDF Handler Functions.
  5. 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”).
  6. Click Save.
scrn-delete-page-command-tabular-view
Tabular View
deletePage Command - Card View
Card View

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}).

Back To Top