# 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="/files/VcdugaXYbNGhuFq4ixD3" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/generic/file-and-folder-operations/get-pdf-page-count.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
