Page number
Page numbers and totals in headers and footers. Components in the DocStudio designer user guide.
What it is
An element that prints the page number and, optionally, the total number of pages.
When to use it
In the footer (or header) of multi-page documents.
Insert
Click Footer in the Layers panel to target it, then click Pg number in the toolbox (the page number component).
Configure
In the Page number section set Format. Use {n} for the page number and {total} for the page count: Page {n} of {total}. An empty format shows only the number.
How it prints
| Where | Screen preview | Print and PDF output |
|---|---|---|
| In the header or footer | Shows the format with 1 for both numbers | The real page number and total, printed in the page margin |
| In the body | Shows 1 | Shows 1 (the number of a body element is not tracked per page) |
The Print and PDF previews in the canvas do not draw margin content, so a page number in the footer is not visible there. A notice explains this. The real PDF has it.
Limits
- One format applies to the whole element: you cannot style the number and the text differently.
- The total is available in PDF and print output only.
Limits
- In the print target, browsers draw page numbers in the page margin boxes, so alignment and font settings of the element do not apply there. They apply on screen and in the PDF.
- A page number element is a block, so Text alignment and Width work on screen and in the PDF.