Get PDF Page Count

The Get PDF Page Count action found under the @Generic Element is used to retrieve the total number of pages in a PDF file and store the result in an dynamic variable.

Syntax

Input Value: <FilePath>

Argument
Description

<FilePath>

(Required)

Specify path to the PDF file for which the page count is required. Note: Make sure the PDF file is readable.

Output Value:

Argument
Description

<Dynamic Variable> (Optional)

This variable stores the total number of pages in the PDF file..

<Dynamic Variable> (Optional)

This variable stores the status as true or false

Example

Get the total number of pages in a PDF file The Get PDF Page Count action retrieves the total number of pages present in a given PDF file (e.g., ‪C:\sam\Order No.pdf). The page count is stored in the {Page Count} variable, and the action status is saved in the {Status} variable with the following possible values:

  • True if the page count is retrieved successfully

  • False – if the PDF file is not found or cannot be read

Last updated

Was this helpful?