For a list of all members of this type, see PageNumberingLabel Members
System.Object
ceTe.DynamicPDF.PageElement
ceTe.DynamicPDF.PageElements.RotatingPageElement
public class PageNumberingLabel : RotatingPageElement, IArea, ICoordinate
Remarks
Token Description CP Current page. The default numbering style is numeric. The current page can be offset using the is
offset by the PageOffset property. TP Total pages. The default numbering style is numeric. The total pages can be offset using the is
offset by the PageTotalOffset property. SP Section page. The default numbering style is the numbering style used by the section. The total
pages can be offset using the is offset by the PageTotalOffset property. ST Section Total. The default numbering style is the numbering style used by the section. The total
pages can be offset using the is offset by the PageTotalOffset property. PR Prefix. The sections prefix. Numbering Style Description 1 Numeric. Arabic numbers are used: 1, 2, 3, etc. Example: "%%CP(1)%%" i Lower Case Roman Numerals. Lower case roman numerals are used: i, ii, iii, etc.
Example: "%%CP(i)%%". I Upper Case Roman Numerals. Upper case roman numerals are used: I, II, III, etc.
Example: "%%CP(I)%%". a Lower Latin Letters. Lower case Latin letters are used: a, b, c, etc. After z, aa is used
followed by bb, cc, ect. Example: "%%CP(a)%%". A Upper Latin Letters. Upper case Latin letters are used: A, B, C, etc. After Z, AA is used
followed by BB, CC, ect. Example: "%%CP(A)%%". b Lower Latin Letters. Lower case Latin letters are used: a, b, c, etc. After z, aa is used
followed by ab, ac, ect. Example: "%%CP(b)%%". B Lower Latin Letters. Lower case Latin letters are used: A, B, C, etc. After Z, AA is used
followed by AB, AC, ect. Example: "%%CP(B)%%".
Example
[Visual Basic]
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a document template and add it to the document
Dim documentTemplate As Template = New Template()
MyDocument.Template = documentTemplate
' Place a page numbering label in the document template
documentTemplate.Elements.Add( New PageNumberingLabel( _
"%%PR%%%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, _
12, TextAlign.Center ) )
' Begin the first section
MyDocument.Sections.Begin( NumberingStyle.RomanLowerCase )
' Add three pages
MyDocument.Pages.Add( new Page() ) 'Page 1
MyDocument.Pages.Add( new Page() ) 'Page 2
MyDocument.Pages.Add( new Page() ) 'Page 3
' Begin the second section
MyDocument.Sections.Begin( NumberingStyle.Numeric )
' Add four pages
MyDocument.Pages.Add( new Page() ) 'Page 4
MyDocument.Pages.Add( new Page() ) 'page 5
MyDocument.Pages.Add( new Page() ) 'page 6
MyDocument.Pages.Add( new Page() ) 'page 7
' Begin the third section specifying a section prefix
MyDocument.Sections.Begin( NumberingStyle.RomanLowerCase, _
"Appendix A - " )
' Add two pages
MyDocument.Pages.Add( new Page() ) 'page 8
MyDocument.Pages.Add( new Page() ) 'page 9
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
[C#]
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();
// Create a document template and add it to the document
Template documentTemplate = new Template();
document.Template = documentTemplate;
// Place a page numbering label in the document template
documentTemplate.Elements.Add( new PageNumberingLabel(
"%%PR%%%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica,
12, TextAlign.Center ) );
// Begin the first section
document.Sections.Begin( NumberingStyle.RomanLowerCase );
// Add three pages
document.Pages.Add( new Page() ); //Page 1
document.Pages.Add( new Page() ); //Page 2
document.Pages.Add( new Page() ); //Page 3
// Begin the second section
document.Sections.Begin( NumberingStyle.Numeric );
// Add four pages
document.Pages.Add( new Page() ); //Page 4
document.Pages.Add( new Page() ); //page 5
document.Pages.Add( new Page() ); //page 6
document.Pages.Add( new Page() ); //page 7
// Begin the third section specifying a section prefix
document.Sections.Begin( NumberingStyle.RomanLowerCase,
"Appendix A - " );
// Add two pages
document.Pages.Add( new Page() ); //page 8
document.Pages.Add( new Page() ); //page 9
// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}
Requirements
Namespace: ceTe.DynamicPDF.PageElements Namespace
Assembly: DynamicPDF.Generator.[Edition].dll
See Also
PageNumberingLabel members | ceTe.DynamicPDF.PageElements Namespace

