# 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>`&#x20;

| Argument                            | Description                                                                                                                                  |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<FilePath></p><p>(Required)</p> | <p>Specify path to the PDF file for which the page count is required.<br><br><strong>Note:</strong> Make sure the PDF  file is readable.</p> |

**Output Value:**

| Argument                                 | Description                                                      |
| ---------------------------------------- | ---------------------------------------------------------------- |
| <p>\<Dynamic Variable><br>(Optional)</p> | This variable stores the total number of pages in the PDF file.. |
| <p>\<Dynamic Variable><br>(Optional)</p> | This variable stores the status as **true** or **false**         |

**Example**&#x20;

**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

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FDH5qpnP5mk3od7XImJdK%2Fimage.png?alt=media&#x26;token=0acf6a19-41b0-4cb5-b8b9-43445df530c3" alt=""><figcaption></figcaption></figure>
