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 output variable.

Syntax

Input: <FilePath>

Output: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Usecase/Example

Scenario

A publishing company is preparing to release an eBook. Before finalizing the document, the editor needs to ensure that the PDF version has the correct number of pages to match the printed version. During testing, they use the keyword to retrieve the total number of pages in the PDF file. If the PDF shows 250 pages, the editor can confidently verify that all content is included and that it aligns with the printed layout, ensuring that nothing is missing before distribution.

Input

Provide the input values as below:

C:\New folder\dictionary.pdf

Expected Result

It should verify the pdf page count as 250 pages.

Output

The Get PDF Page Count action fetch the count of the pages present in the given pdf file and save its result in the {result} output variable as “250”. This output can be used for display or other purposes.

Last updated

Was this helpful?