Skip to content

Get Page Count Action: getPageCount

The getPageCount action in the PDFHandle function is used to retrieve the total number of pages in a specified PDF file. This is particularly useful for automating processes where page count information is necessary.

Example: You have a PDF file named AnnualReport.pdf, and you need to determine its total page count.

Steps to Configure:

  1. Add a new step.
  2. Choose SET from the Action dropdown.
  3. Enter a name for the variable in the Element Key field (e.g., PageCount). This variable will store the output.
  4. Navigate to the Parameter section and click Form.
  5. From the dropdown, select Functions and choose PDF Handler Functions.
  6. Select getPageCount from the action dropdown and configure the following field:
    • fPath: Specify the full path to the target PDF file (e.g., C:\Documents\Report.pdf).
  7. Click Save.
v7_pdf_file_handler_getPage_list_view
List View
v7_pdf_file_handler_getPage_grid_view
Grid View

Outcome on execution:

  • Upon running the action, the total number of pages in the PDF is retrieved.
  • The page count is stored in the variable defined in Element Key. This variable can be referenced in subsequent steps of the automation process using the syntax ${VariableName} (e.g., ${PageCount}).

Last updated: Oct 6, 2025
Back To Top