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:
- Add a new step.
- Choose Set a Variable Value from the Action dropdown.
- Enter a name for the variable in the Element Key field (e.g., PageCount). This variable will store the output.
- Navigate to the Parameter section and click Form.
- From the dropdown, select Functions and choose PDF Handler Functions.
- 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).
- Click Save.


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