Enum PdfNumberStyle
Specifies numbering style of page labels.
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public enum PdfNumberStyle
Examples
//Create new document.
PdfDocument document = new PdfDocument();
//Create new true type font.
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Times New Roman", 12f));
//Create new solid brush.
PdfSolidBrush brush = new PdfSolidBrush(Color.Green);
//Create new section.
PdfSection sec = document.Sections.Add();
//Declare new page.
PdfPage page;
//Creates page number field.
PdfDestinationPageNumberField dest = new PdfDestinationPageNumberField();
//Add pages to the section.
page = sec.Pages.Add();
//Set page for pagenumber field.
dest.Page = page;
//Set Number style.
dest.NumberStyle = PdfNumberStyle.LowerRoman;
//Set font for pagenumber field.
dest.Font = font;
//Set brush for pagenumber field.
dest.Brush = brush;
//Set size for the page number field.
dest.Size = new SizeF(50, 20);
//Draws the page number on page.
dest.Draw(page.Graphics);
//Save the document.
document.Save("NumberStyle.pdf");
//Close the document.
document.Close(true);
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Create new true type font.
Dim font As PdfTrueTypeFont = New PdfTrueTypeFont(New Font("Times New Roman", 12.0F))
'Create new solid brush.
Dim brush As PdfSolidBrush = New PdfSolidBrush(Color.Green)
'Create new section.
Dim sec As PdfSection = document.Sections.Add()
'Declare new page.
Dim page As PdfPage
'Creates page number field.
Dim dest As PdfDestinationPageNumberField = New PdfDestinationPageNumberField()
'Add pages to the section.
page = sec.Pages.Add()
'Set page for pagenumber field.
dest.Page = page
'Set Number style.
dest.NumberStyle = PdfNumberStyle.LowerRoman
'Set font for pagenumber field.
dest.Font = font
'Set brush for pagenumber field.
dest.Brush = brush
'Set size for the page number field.
dest.Size = New SizeF(50, 20)
'Draws the page number on page.
dest.Draw(page.Graphics)
'Save document to disk.
document.Save("NumberStyle.pdf")
'Close the document.
document.Close(True)
Fields
Name | Description |
---|---|
LowerLatin | Lowercase letters a-z. |
LowerRoman | Lowercase roman numerals. |
None | No numbering at all. |
Numeric | Decimal arabic numerals. |
UpperLatin | Uppercase letters A-Z. |
UpperRoman | Uppercase roman numerals. |