Class PdfNumberStyle
Specifies numbering style of page labels.
Inheritance
System.Object
PdfNumberStyle
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public sealed class PdfNumberStyle : Enum
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
LowerLatin
Lowercase letters a-z.
Declaration
public const PdfNumberStyle LowerLatin
Field Value
Type |
---|
PdfNumberStyle |
LowerRoman
Lowercase roman numerals.
Declaration
public const PdfNumberStyle LowerRoman
Field Value
Type |
---|
PdfNumberStyle |
None
No numbering at all.
Declaration
public const PdfNumberStyle None
Field Value
Type |
---|
PdfNumberStyle |
Numeric
Decimal arabic numerals.
Declaration
public const PdfNumberStyle Numeric
Field Value
Type |
---|
PdfNumberStyle |
UpperLatin
Uppercase letters A-Z.
Declaration
public const PdfNumberStyle UpperLatin
Field Value
Type |
---|
PdfNumberStyle |
UpperRoman
Uppercase roman numerals.
Declaration
public const PdfNumberStyle UpperRoman
Field Value
Type |
---|
PdfNumberStyle |