# pdf

## assert

Asserts that text is present in a PDF file

**Parameters:**

| Name          | Type      | Description                                      |
| ------------- | --------- | ------------------------------------------------ |
| `pdfFilePath` | `String`  | Relative or absolute path to the PDF file.       |
| `text`        | `String`  | Text to assert.                                  |
| `pageNum`     | `Number`  | `optional` Page number.                          |
| `message`     | `String`  | `optional` Message to throw if assertion fails.  |
| `reverse`     | `Boolean` | `optional` Check also reverse variant of string. |

## assertNot

Asserts that text is not present in a PDF file

**Parameters:**

| Name          | Type      | Description                                      |
| ------------- | --------- | ------------------------------------------------ |
| `pdfFilePath` | `String`  | Relative or absolute path to the pdf file.       |
| `text`        | `String`  | Text to assert.                                  |
| `pageNum`     | `Number`  | `optional` Page number.                          |
| `message`     | `String`  | `optional` Message to throw if assertion fails.  |
| `reverse`     | `Boolean` | `optional` Check also reverse variant of string. |

## count

Count the number of times specified text is present in a PDF file.

**Parameters:**

| Name          | Type      | Description                                      |
| ------------- | --------- | ------------------------------------------------ |
| `pdfFilePath` | `String`  | Relative or absolute path to the pdf file.       |
| `text`        | `String`  | Text to count.                                   |
| `pageNum`     | `Number`  | `optional` Page number.                          |
| `reverse`     | `Boolean` | `optional` Check also reverse variant of string. |

**Returns:**

`Number` - Number of times the specified text was found.


---

# 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.oxygenhq.org/download-installation-start/modules/module-pdf.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.
