File Formats

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfOrderedMarker

    Show / Hide Table of Contents

    Class PdfOrderedMarker

    Represents marker for ordered list.

    Inheritance
    System.Object
    PdfMarker
    PdfOrderedMarker
    Inherited Members
    PdfMarker.Font
    PdfMarker.Brush
    PdfMarker.Pen
    PdfMarker.StringFormat
    PdfMarker.Alignment
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Pdf.Lists
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public class PdfOrderedMarker : PdfMarker
    Examples
     //Create a new PDf document
     PdfDocument document = new PdfDocument();
     //Creates a new page and adds it as the last page of the document
     PdfPage page = document.Pages.Add();
     PdfGraphics graphics = page.Graphics;
     //Create a font and write title
     PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold);            
     //Create a unordered list
     PdfOrderedMarker list = new PdfOrderedMarker(PdfNumberStyle.LowerRoman, font);
     //Create Ordered list as sublist of parent list
     PdfOrderedList subList = new PdfOrderedList();
     subList.Marker = list;
     //Add items to the list
     subList.Items.Add("List of Essential Studio products");
     subList.Items.Add("IO products");
     subList.Items.Add("Grid products");
     subList.Items.Add("Tools products");
     //Draw list
     subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
     document.Save("List.pdf");
     'Create a new PDf document
     Dim document As PdfDocument = New PdfDocument()
     'Create a page
     Dim page As PdfPage = document.Pages.Add()
     Dim graphics As PdfGraphics = page.Graphics
     'Create a font and write title
     Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14,PdfFontStyle.Bold)
     'Create a unordered list
     Dim list As PdfOrderedMarker = New PdfOrderedMarker(PdfNumberStyle.LowerRoman, font)
     'Create Ordered list as sublist of parent list
     Dim subList As PdfOrderedList = New PdfOrderedList()
     subList.Marker = list
     'Add items to the list
     subList.Items.Add("List of Essential Studio products")
     subList.Items.Add("IO products")
     subList.Items.Add("Grid products")
     subList.Items.Add("Tools products")
     'Draw list
     subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
     document.Save("List.pdf")

    Constructors

    PdfOrderedMarker(PdfNumberStyle, PdfFont)

    Initializes a new instance of the PdfOrderedMarker class.

    Declaration
    public PdfOrderedMarker(PdfNumberStyle style, PdfFont font)
    Parameters
    Type Name Description
    PdfNumberStyle style

    Number style of marker.

    PdfFont font

    Number font of marker.

    Examples
    //Create a new instance of PdfDocument class.
    PdfDocument document = new PdfDocument();
    //Add a new page to the document.
    PdfPage page = document.Pages.Add();
    //Get the PDF page graphics.
    PdfGraphics graphics = page.Graphics;
    SizeF size = page.Graphics.ClientSize;
    //Create font 
    PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
    //Create string format
    PdfStringFormat format = new PdfStringFormat();
    format.LineSpacing = 10f;
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList();
    //Create new order list marker.
    PdfOrderedMarker marker = new PdfOrderedMarker(PdfNumberStyle.Numeric, font);
    //Set marker brush.  
    marker.Brush = PdfBrushes.Black;
    //Set marker to the ordered list.
    list.Marker = marker;
    //Set line indent.
    list.Indent = 20;
    //Set format for sub list.
    list.Font = font;
    list.StringFormat = format;
    //Add items to the list
    list.Items.Add("PDF");
    list.Items.Add("XlsIO");
    list.Items.Add("DocIO");
    list.Items.Add("PPT");
    //Draw the PDF list to page.
    list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
    // Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);        
    'Create a new instance of PdfDocument class.
    Dim document As New PdfDocument()
    'Add a new page to the document.
    Dim page As PdfPage = document.Pages.Add()
    'Get the PDF page graphics.
    Dim graphics As PdfGraphics = page.Graphics
    Dim size As SizeF = page.Graphics.ClientSize
    'Create font 
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
    'Create string format
    Dim format As New PdfStringFormat()
    format.LineSpacing = 10F
    'Create Ordered list
    Dim list As New PdfOrderedList()
    'Create new order list marker.
    Dim marker As New PdfOrderedMarker(PdfNumberStyle.Numeric, font)
    'Set marker brush.
    marker.Brush = PdfBrushes.Black
    'Set marker to the ordered list.
    list.Marker = marker
    'Set line indent.
    list.Indent = 20
    'Set format for sub list
    list.Font = font
    list.StringFormat = format
    'Add items to the list
    list.Items.Add("PDF")
    list.Items.Add("XlsIO")
    list.Items.Add("DocIO")
    list.Items.Add("PPT")
    'Draw the PDF list to page.
    list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
    ' Save and close the document.
    document.Save("Output.pdf")
    document.Close(True)

    PdfOrderedMarker(PdfNumberStyle, String, PdfFont)

    Initializes a new instance of the PdfOrderedMarker class.

    Declaration
    public PdfOrderedMarker(PdfNumberStyle style, string suffix, PdfFont font)
    Parameters
    Type Name Description
    PdfNumberStyle style

    Number style of marker.

    System.String suffix

    Number suffix of the marker.

    PdfFont font

    Number font of marker.

    Examples
    //Create a new instance of PdfDocument class.
    PdfDocument document = new PdfDocument();
    //Add a new page to the document.
    PdfPage page = document.Pages.Add();
    //Get the PDF page graphics.
    PdfGraphics graphics = page.Graphics;
    SizeF size = page.Graphics.ClientSize;
    //Create font 
    PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
    //Create string format
    PdfStringFormat format = new PdfStringFormat();
    format.LineSpacing = 10f;
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList();
    //Create new order list marker.
    PdfOrderedMarker marker = new PdfOrderedMarker(PdfNumberStyle.Numeric, ".", font);
    //Set marker brush.  
    marker.Brush = PdfBrushes.Black;
    //Set marker to the ordered list.
    list.Marker = marker;
    //Set line indent.
    list.Indent = 20;
    //Set format for sub list.
    list.Font = font;
    list.StringFormat = format;
    //Add items to the list
    list.Items.Add("PDF");
    list.Items.Add("XlsIO");
    list.Items.Add("DocIO");
    list.Items.Add("PPT");
    //Draw the PDF list to page.
    list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
    // Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);        
    'Create a new instance of PdfDocument class.
    Dim document As New PdfDocument()
    'Add a new page to the document.
    Dim page As PdfPage = document.Pages.Add()
    'Get the PDF page graphics.
    Dim graphics As PdfGraphics = page.Graphics
    Dim size As SizeF = page.Graphics.ClientSize
    'Create font 
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
    'Create string format
    Dim format As New PdfStringFormat()
    format.LineSpacing = 10F
    'Create Ordered list
    Dim list As New PdfOrderedList()
    'Create new order list marker.
    Dim marker As New PdfOrderedMarker(PdfNumberStyle.Numeric, ".", font)
    'Set marker brush.
    marker.Brush = PdfBrushes.Black
    'Set marker to the ordered list.
    list.Marker = marker
    'Set line indent.
    list.Indent = 20
    'Set format for sub list
    list.Font = font
    list.StringFormat = format
    'Add items to the list
    list.Items.Add("PDF")
    list.Items.Add("XlsIO")
    list.Items.Add("DocIO")
    list.Items.Add("PPT")
    'Draw the PDF list to page.
    list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
    ' Save and close the document.
    document.Save("Output.pdf")
    document.Close(True)

    PdfOrderedMarker(PdfNumberStyle, String, String, PdfFont)

    Initializes a new instance of the PdfOrderedMarker class.

    Declaration
    public PdfOrderedMarker(PdfNumberStyle style, string delimiter, string suffix, PdfFont font)
    Parameters
    Type Name Description
    PdfNumberStyle style

    Number style of marker.

    System.String delimiter

    Number delimiter of marker.

    System.String suffix

    Number suffix of marker.

    PdfFont font

    Number font of marker.

    Examples
    //Create a new instance of PdfDocument class.
    PdfDocument document = new PdfDocument();
    //Add a new page to the document.
    PdfPage page = document.Pages.Add();
    //Get the PDF page graphics.
    PdfGraphics graphics = page.Graphics;
    SizeF size = page.Graphics.ClientSize;
    //Create font 
    PdfFont font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic);
    //Create string format
    PdfStringFormat format = new PdfStringFormat();
    format.LineSpacing = 10f;
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList();
    //Create new order list marker.
    PdfOrderedMarker marker = new PdfOrderedMarker(PdfNumberStyle.Numeric, ".", ".", font);
    //Set marker brush.  
    marker.Brush = PdfBrushes.Black;
    //Set marker to the ordered list.
    list.Marker = marker;
    //Set line indent.
    list.Indent = 20;
    //Set format for sub list.
    list.Font = font;
    list.StringFormat = format;
    //Add items to the list
    list.Items.Add("PDF");
    list.Items.Add("XlsIO");
    list.Items.Add("DocIO");
    list.Items.Add("PPT");
    //Draw the PDF list to page.
    list.Draw(page, new RectangleF(0, 20, size.Width, size.Height));
    // Save and close the document.
    document.Save("Output.pdf");
    document.Close(true);        
    'Create a new instance of PdfDocument class.
    Dim document As New PdfDocument()
    'Add a new page to the document.
    Dim page As PdfPage = document.Pages.Add()
    'Get the PDF page graphics.
    Dim graphics As PdfGraphics = page.Graphics
    Dim size As SizeF = page.Graphics.ClientSize
    'Create font 
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Italic)
    'Create string format
    Dim format As New PdfStringFormat()
    format.LineSpacing = 10F
    'Create Ordered list
    Dim list As New PdfOrderedList()
    'Create new order list marker.
    Dim marker As New PdfOrderedMarker(PdfNumberStyle.Numeric, ".", ".", font)
    'Set marker brush.
    marker.Brush = PdfBrushes.Black
    'Set marker to the ordered list.
    list.Marker = marker
    'Set line indent.
    list.Indent = 20
    'Set format for sub list
    list.Font = font
    list.StringFormat = format
    'Add items to the list
    list.Items.Add("PDF")
    list.Items.Add("XlsIO")
    list.Items.Add("DocIO")
    list.Items.Add("PPT")
    'Draw the PDF list to page.
    list.Draw(page, New RectangleF(0, 20, size.Width, size.Height))
    ' Save and close the document.
    document.Save("Output.pdf")
    document.Close(True)

    Properties

    Delimiter

    Gets or sets the delimiter.

    Declaration
    public string Delimiter { get; set; }
    Property Value
    Type Description
    System.String
    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    PdfGraphics graphics = page.Graphics;
    //Create a font and write title
    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);           
    //Create Ordered list as sublist of parent list
    PdfOrderedList subList = new PdfOrderedList();
    subList.Marker.Alignment = PdfListMarkerAlignment.Right;
    subList.Marker.Delimiter = ".";
    subList.Marker.StartNumber = 2;
    subList.Marker.Style = PdfNumberStyle.UpperRoman;
    //Add items to the list
    subList.Items.Add("List of Essential Studio products");
    subList.Items.Add("IO products");
    subList.Items.Add("Grid products");
    subList.Items.Add("Tools products");
    //Draw list
    subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
    document.Save("List.pdf");
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Creates a new page and adds it as the last page of the document
    Dim page As PdfPage = document.Pages.Add()
    Dim graphics As PdfGraphics = page.Graphics
    'Create a font and write title
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
    'Create Ordered list as sublist of parent list
    Dim subList As PdfOrderedList = New PdfOrderedList()
    subList.Marker.Alignment = PdfListMarkerAlignment.Right
    subList.Marker.Delimiter = "."
    subList.Marker.StartNumber = 2
    subList.Marker.Style = PdfNumberStyle.UpperRoman
    'Add items to the list
    subList.Items.Add("List of Essential Studio products")
    subList.Items.Add("IO products")
    subList.Items.Add("Grid products")
    subList.Items.Add("Tools products")
    'Draw list
    subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
    document.Save("List.pdf")
    See Also
    PdfDocument
    PdfPage
    PdfOrderedList

    StartNumber

    Gets ar sets start number for ordered list. Default value is 1.

    Declaration
    public int StartNumber { get; set; }
    Property Value
    Type Description
    System.Int32
    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    PdfGraphics graphics = page.Graphics;
    //Create a font and write title
    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);           
    //Create Ordered list as sublist of parent list
    PdfOrderedList subList = new PdfOrderedList();
    subList.Marker.Alignment = PdfListMarkerAlignment.Right;
    subList.Marker.Delimiter = ".";
    subList.Marker.StartNumber = 2;
    subList.Marker.Style = PdfNumberStyle.UpperRoman;
    //Add items to the list
    subList.Items.Add("List of Essential Studio products");
    subList.Items.Add("IO products");
    subList.Items.Add("Grid products");
    subList.Items.Add("Tools products");
    //Draw list
    subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
    document.Save("List.pdf");
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Creates a new page and adds it as the last page of the document
    Dim page As PdfPage = document.Pages.Add()
    Dim graphics As PdfGraphics = page.Graphics
    'Create a font and write title
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
    'Create Ordered list as sublist of parent list
    Dim subList As PdfOrderedList = New PdfOrderedList()
    subList.Marker.Alignment = PdfListMarkerAlignment.Right
    subList.Marker.Delimiter = "."
    subList.Marker.StartNumber = 2
    subList.Marker.Style = PdfNumberStyle.UpperRoman
    'Add items to the list
    subList.Items.Add("List of Essential Studio products")
    subList.Items.Add("IO products")
    subList.Items.Add("Grid products")
    subList.Items.Add("Tools products")
    'Draw list
    subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
    document.Save("List.pdf")
    See Also
    PdfDocument
    PdfPage
    PdfOrderedList

    Style

    Gets or sets the list numbering style.

    Declaration
    public PdfNumberStyle Style { get; set; }
    Property Value
    Type Description
    PdfNumberStyle
    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    PdfGraphics graphics = page.Graphics;
    //Create a font and write title
    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);           
    //Create Ordered list as sublist of parent list
    PdfOrderedList subList = new PdfOrderedList();
    subList.Marker.Alignment = PdfListMarkerAlignment.Right;
    subList.Marker.Delimiter = ".";
    subList.Marker.StartNumber = 2;
    subList.Marker.Style = PdfNumberStyle.UpperRoman;
    //Add items to the list
    subList.Items.Add("List of Essential Studio products");
    subList.Items.Add("IO products");
    subList.Items.Add("Grid products");
    subList.Items.Add("Tools products");
    //Draw list
    subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
    document.Save("List.pdf");
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Creates a new page and adds it as the last page of the document
    Dim page As PdfPage = document.Pages.Add()
    Dim graphics As PdfGraphics = page.Graphics
    'Create a font and write title
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
    'Create Ordered list as sublist of parent list
    Dim subList As PdfOrderedList = New PdfOrderedList()
    subList.Marker.Alignment = PdfListMarkerAlignment.Right
    subList.Marker.Delimiter = "."
    subList.Marker.StartNumber = 2
    subList.Marker.Style = PdfNumberStyle.UpperRoman
    'Add items to the list
    subList.Items.Add("List of Essential Studio products")
    subList.Items.Add("IO products")
    subList.Items.Add("Grid products")
    subList.Items.Add("Tools products")
    'Draw list
    subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
    document.Save("List.pdf")
    See Also
    PdfDocument
    PdfPage
    PdfOrderedList

    Suffix

    Gets or sets the suffix of the marker.

    Declaration
    public string Suffix { get; set; }
    Property Value
    Type Description
    System.String
    Examples
    //Create a new PDf document
    PdfDocument document = new PdfDocument();
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    PdfGraphics graphics = page.Graphics;
    //Create a font and write title
    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);           
    //Create Ordered list as sublist of parent list
    PdfOrderedList subList = new PdfOrderedList();
    subList.Marker.Alignment = PdfListMarkerAlignment.Right;
    subList.Marker.Suffix = ".";
    subList.Marker.StartNumber = 2;
    subList.Marker.Style = PdfNumberStyle.UpperRoman;
    //Add items to the list
    subList.Items.Add("List of Essential Studio products");
    subList.Items.Add("IO products");
    subList.Items.Add("Grid products");
    subList.Items.Add("Tools products");
    //Draw list
    subList.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
    document.Save("List.pdf");
    'Create a new PDf document
    Dim document As PdfDocument = New PdfDocument()
    'Creates a new page and adds it as the last page of the document
    Dim page As PdfPage = document.Pages.Add()
    Dim graphics As PdfGraphics = page.Graphics
    'Create a font and write title
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
    'Create Ordered list as sublist of parent list
    Dim subList As PdfOrderedList = New PdfOrderedList()
    subList.Marker.Alignment = PdfListMarkerAlignment.Right
    subList.Marker.Suffix = "."
    subList.Marker.StartNumber = 2
    subList.Marker.Style = PdfNumberStyle.UpperRoman
    'Add items to the list
    subList.Items.Add("List of Essential Studio products")
    subList.Items.Add("IO products")
    subList.Items.Add("Grid products")
    subList.Items.Add("Tools products")
    'Draw list
    subList.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
    document.Save("List.pdf")
    See Also
    PdfDocument
    PdfPage
    PdfOrderedList

    See Also

    PdfMarker
    PdfPage
    PdfOrderedMarker
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved