# Page Number

The `<pageNumber>` tag displays the number of the current page when it is printed. Page numbers are always displayed as `current page / total pages`, for example as `3 / 89`.

It can only be used within a [`<template>`](/document-xml-adx/adx-elements/template.md).

## Example

```markup
<template ...>
  ...
  <pageNumber
    left="20mm"
    bottom="20mm"
    width="190mm"
    height="10mm"
  />
  ...
<template>
```

## Attributes

The `<pageNumber>` tag inherits all attributes from [`<text>`](/document-xml-adx/adx-elements/text.md), including:

#### `left`, `bottom`

The position on the page in pt, mm, or cm.

#### `width`, `height`

The size of the text block in pt, mm, or cm.

#### `fontSize` (optional)

The font size used for the page number.

#### `color` (optional)

The text color.

#### `align` (optional)

Text alignment: `left`, `right`, `center`, or `justify`.

#### `class` (optional)

The style class to use.


---

# 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.atfinity.io/document-xml-adx/adx-elements/page-number.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.
