> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.pdfgeneratorapi.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to add page numbers?

To display page numbers, you can use special placeholders `{current_page}` and `{total_pages}` in a Text component. At the moment, the Text component must be in a **Header** or **Footer** component to display the page number properly.

###### Placeholders

* Display current page number: `{current_page}`
* Display total number of pages: `{total_pages}`

###### Example

```
Page: {current_page} / {total_pages}
```

||| NB! The Text component must be in a **Header** or **Footer** component to display the page numbers properly.

![Page numbers in a Footer](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/image-2019-12-18-at-104718-am_l0im5c.png)
| Tip: You can also find Page Number Component in the Component Panel

1. Select Component Panel
2. Drag&Drop Page Number Component
3. Place the Page Number Component inside a **Header** or **Footer**

![Current Page / Total Pages in a Footer](https://storage.crisp.chat/users/helpdesk/website/11e0e518fc48ce00/screenshot2025011515746_uk7nh6.png)
---
### Related articles you may find helpful

* [Converting HTML to PDF - How to start?](/en/article/converting-html-to-pdf-how-to-start-1t3jshu/)
* [Header & Footer Component](/en/article/header-and-footer-component-gso8pw/)
* [What is Expression Language?](/en/article/what-is-expression-language-1teiau6/)