Skip to main content

PageNumberingLabel


The PageNumberingLabel layout element allows adding page numbering labels to your report.

Use the PageNumberingLabel element to add page numbering to a PDF document.

info

Refer to designer-usersguide-examples for a GitHub example.

To add a PageNumberingLabel, right-click and select Add Page Numbering Label from the context menu.

Figure 1. Adding a PageNumberingLabel layout element using the context menu.

Tokens

Use, the following tokens within the text of a PageNumberingLabel. The tokens will be replaced with the appropriate value when the PDF is created. Surround Page Numbering Label elements with the %% character. Examples are provided below.

TokenExampleDescription
CP%%CP%%Current page. The default numbering style is numeric. The current page can be offset using the is offset by the page property.
TP%%TP%%Total pages. The default numbering style is numeric. The total pages can be offset using the is offset by the pageTotalOffset property.

All tokens can also contain a numbering style specifier. The numbering style specifier is placed in parenthesis after the token. If no numbering style specifier is given, then the current numbering specifier is used.

Figure 2. Adding a PageNumberingLabel layout element that specifies page and total pages.

Numbering Styles

Add numbering styles by placing the numbering style in parenthesis after the token. For example, %%CP(I)%% would output an upper-case roman numeral.

Figure 3. Different ways to format page numbering.

Numbering StyleDescription
1Numeric. Arabic numbers are used: 1, 2, 3, etc.
iLower Case Roman Numerals. Lower case roman numerals are used: i, ii, iii, etc.
IUpper Case Roman Numerals. Upper case roman numerals are used: I, II, III, etc.
aLower Latin Letters. Lower case Latin letters are used: a, b, c, etc. After z, aa is used followed by bb, cc, etc.
AUpper Latin Letters. Upper case Latin letters are used: A, B, C, etc. After Z, AA is used followed by BB, CC, etc.
bLower Latin Letters. Lower case Latin letters are used: a, b, c, etc. After z, aa is used followed by ab, ac, etc.
BLower Latin Letters. Lower case Latin letters are used: A, B, C, etc. After Z, AA is used followed by AB, AC, etc.
tip

If you have a cover page, and you do not add the label to the cover page, then the report by default starts at page number 2. To start at page one, set the pageNumberingOffset to -1. Then the first page of the report will be 1 rather than 2.

Properties

The PageNumberingLabel element has the following properties.

PropertyValueDescription
aligncenter, justify, fullJustify, right, leftA value indicating the alignment of the PageNumberingLabel.
fontSee fonts UsersGuide.A value indicating the font to be used for the PageNumberingLabel.
fontSizenumericA value indicating the font size of the PageNumberingLabel.
pageOffsetnumericA value indicating the page offset for PageNumberingLabel.
pageTotalOffsetnumericA value indicating the page total offset for PageNumberingLabel.
texttextA value indicating the text of the PageNumberingLabel.
textColorSee Colors Users Guide topic.A value indicating the text color of the PageNumberingLabel.
underlinetrue, falseA value indicating whether to underline the PageNumberingLabel.
vAlignbottom, center, topA value indicating the vertical alignment of the PageNumberingLabel.
idtextA value indicating the programmatic identifier of the PageNumberingLabel.
anglenumericA value indicating the number of degrees to rotate the PageNumberingLabel.
heightnumericA value indicating the height of the PageNumberingLabel.
widthnumericA value indicating the width of the PageNumberingLabel.
xnumericA value indicating the X coordinate of the PageNumberingLabel.
ynumericA value indicating the Y coordinate of the PageNumberingLabel.