menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfOrderedList - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfOrderedList

    Represents the ordered list.

    Inheritance
    System.Object
    PdfGraphicsElement
    PdfLayoutElement
    PdfList
    PdfOrderedList
    Inherited Members
    PdfGraphicsElement.Draw(PdfGraphics)
    PdfGraphicsElement.Draw(PdfGraphics, PointF)
    PdfLayoutElement.add_BeginPageLayout(BeginPageLayoutEventHandler)
    PdfLayoutElement.add_EndPageLayout(EndPageLayoutEventHandler)
    PdfLayoutElement.BeginPageLayout
    PdfLayoutElement.Draw(PdfPage, PointF)
    PdfLayoutElement.Draw(PdfPage, PointF, PdfLayoutFormat)
    PdfLayoutElement.Draw(PdfPage, RectangleF)
    PdfLayoutElement.Draw(PdfPage, RectangleF, PdfLayoutFormat)
    PdfLayoutElement.Draw(PdfPage, Single, Single)
    PdfLayoutElement.Draw(PdfPage, Single, Single, PdfLayoutFormat)
    PdfLayoutElement.EndPageLayout
    PdfLayoutElement.PdfTag
    PdfLayoutElement.remove_BeginPageLayout(BeginPageLayoutEventHandler)
    PdfLayoutElement.remove_EndPageLayout(EndPageLayoutEventHandler)
    PdfList.add_BeginItemLayout(BeginItemLayoutEventHandler)
    PdfList.add_EndItemLayout(EndItemLayoutEventHandler)
    PdfList.BeginItemLayout
    PdfList.Brush
    PdfList.c_splitChars
    PdfList.Draw(PdfGraphics, Single, Single)
    PdfList.EndItemLayout
    PdfList.Font
    PdfList.Indent
    PdfList.Items
    PdfList.Layout(PdfLayoutParams)
    PdfList.Pen
    PdfList.remove_BeginItemLayout(BeginItemLayoutEventHandler)
    PdfList.remove_EndItemLayout(EndItemLayoutEventHandler)
    PdfList.StringFormat
    PdfList.TextIndent
    Namespace: Syncfusion.Pdf.Lists
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public class PdfOrderedList : PdfList
    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

    PdfOrderedList()

    Initialize a new instance of the PdfOrderedList class.

    Declaration
    public PdfOrderedList()
    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)

    PdfOrderedList(PdfFont)

    Initializes a new instance of the PdfOrderedList class.

    Declaration
    public PdfOrderedList(PdfFont font)
    Parameters
    Type Name Description
    PdfFont font

    The font.

    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(font);
    //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(font)
    '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)

    PdfOrderedList(PdfListItemCollection)

    Creates ordered list using items.

    Declaration
    public PdfOrderedList(PdfListItemCollection items)
    Parameters
    Type Name Description
    PdfListItemCollection items

    Items for a list.

    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 new PDF list item instance.
    PdfListItemCollection collection = new PdfListItemCollection();
    collection.Add("PDF");
    collection.Add("XlsIO");
    collection.Add("DocIO");
    collection.Add("PPT");
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList(collection);
    //Set line indent.
    list.Indent = 20;
    //Set format for sub list.
    list.Font = font;
    list.StringFormat = format;      
    //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 new PDF list item instance.
    Dim collection As New PdfListItemCollection()
    collection.Add("PDF")
    collection.Add("XlsIO")
    collection.Add("DocIO")
    collection.Add("PPT")
    'Create Ordered list
    Dim list As New PdfOrderedList(collection)
    'Set line indent.
    list.Indent = 20
    'Set format for sub list
    list.Font = font
    list.StringFormat = format       
    '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)

    PdfOrderedList(PdfListItemCollection, PdfOrderedMarker)

    Initializes a new instance of the PdfOrderedList class.

    Declaration
    public PdfOrderedList(PdfListItemCollection items, PdfOrderedMarker marker)
    Parameters
    Type Name Description
    PdfListItemCollection items

    The item collection.

    PdfOrderedMarker marker

    The marker for the list.

    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 new order list marker.
    PdfOrderedMarker marker = new PdfOrderedMarker(PdfNumberStyle.Numeric, font);
    //Set marker brush.  
    marker.Brush = PdfBrushes.Black;
    //Create new PDF list item instance.
    PdfListItemCollection collection = new PdfListItemCollection();
    collection.Add("PDF");
    collection.Add("XlsIO");
    collection.Add("DocIO");
    collection.Add("PPT");
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList(collection, marker);       
    //Set line indent.
    list.Indent = 20;
    //Set format for sub list.
    list.Font = font;
    list.StringFormat = format;       
    //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 new order list marker.
    Dim marker As New PdfOrderedMarker(PdfNumberStyle.Numeric, font)
    'Set marker brush.
    marker.Brush = PdfBrushes.Black
    'Create new PDF list item instance.
    Dim collection As New PdfListItemCollection()
    collection.Add("PDF")
    collection.Add("XlsIO")
    collection.Add("DocIO")
    collection.Add("PPT")
    'Create Ordered list
    Dim list As New PdfOrderedList(collection, marker)
    'Set line indent.
    list.Indent = 20
    'Set format for sub list
    list.Font = font
    list.StringFormat = format       
    '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)

    PdfOrderedList(PdfOrderedMarker)

    Initializes a new instance of the PdfOrderedList class.

    Declaration
    public PdfOrderedList(PdfOrderedMarker marker)
    Parameters
    Type Name Description
    PdfOrderedMarker marker

    The marker for the list.

    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 new order list marker.
    PdfOrderedMarker marker = new PdfOrderedMarker(PdfNumberStyle.Numeric, font);
    //Set marker brush.  
    marker.Brush = PdfBrushes.Black;
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList(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 new order list marker.
    Dim marker As New PdfOrderedMarker(PdfNumberStyle.Numeric, font)
    'Set marker brush.
    marker.Brush = PdfBrushes.Black
    'Create Ordered list
    Dim list As New PdfOrderedList()
    '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)

    PdfOrderedList(PdfNumberStyle)

    Initializes a new instance of the PdfOrderedList class.

    Declaration
    public PdfOrderedList(PdfNumberStyle style)
    Parameters
    Type Name Description
    PdfNumberStyle style

    The style.

    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(PdfNumberStyle.Numeric);       
    //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(PdfNumberStyle.Numeric)        
    '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)

    PdfOrderedList(String)

    Initializes a new instance of the PdfOrderedList class.

    Declaration
    public PdfOrderedList(string text)
    Parameters
    Type Name Description
    System.String text

    The formatted text.

    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;
    string text = "PDF\nXlsIO\nDocIO\nPPT";
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList(text);
    //Set line indent.
    list.Indent = 20;
    //Set format for sub list.
    list.Font = font;
    list.StringFormat = format;      
    //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 new PDF list item instance.
    Dim text As String = "PDF" + vbLf + "XlsIO" + vbLf + "DocIO" + vbLf + "PPT"
    'Create Ordered list
    Dim list As New PdfOrderedList(collection)
    'Set line indent.
    list.Indent = 20
    'Set format for sub list
    list.Font = font
    list.StringFormat = format       
    '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)

    PdfOrderedList(String, PdfOrderedMarker)

    Initializes a new instance of the PdfOrderedList class from formatted text that is splitted by new lines.

    Declaration
    public PdfOrderedList(string text, PdfOrderedMarker marker)
    Parameters
    Type Name Description
    System.String text

    The formatted text.

    PdfOrderedMarker marker

    The 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;
    string text = "PDF\nXlsIO\nDocIO\nPPT";
    //Create new order list marker.
    PdfOrderedMarker marker = new PdfOrderedMarker(PdfNumberStyle.Numeric, font);
    //Set marker brush.  
    marker.Brush = PdfBrushes.Black;
    //Create Ordered list
    PdfOrderedList list = new PdfOrderedList(text, marker);
    //Set line indent.
    list.Indent = 20;
    //Set format for sub list.
    list.Font = font;
    list.StringFormat = format;      
    //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 new PDF list item instance.
    Dim text As String = "PDF" + vbLf + "XlsIO" + vbLf + "DocIO" + vbLf + "PPT"
    'Create new order list marker.
    Dim marker As New PdfOrderedMarker(PdfNumberStyle.Numeric, font)
    'Set marker brush.
    marker.Brush = PdfBrushes.Black
    'Create Ordered list
    Dim list As New PdfOrderedList(collection, marker)
    'Set line indent.
    list.Indent = 20
    'Set format for sub list
    list.Font = font
    list.StringFormat = format       
    '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

    Marker

    Gets or sets marker of the list items.

    Declaration
    public PdfOrderedMarker Marker { get; set; }
    Property Value
    Type
    PdfOrderedMarker
    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")
    See Also
    PdfDocument
    PdfPage
    PdfOrderedList

    MarkerHierarchy

    True if user want to use numbering hierarchy, otherwise false.

    Declaration
    public bool MarkerHierarchy { get; set; }
    Property Value
    Type
    System.Boolean
    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;
     subList.MarkerHierarchy = true;
     //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
     subList.MarkerHierarchy = True
     '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

    Extension Methods

    DateTimeExtension.ToDateTime(Object)

    See Also

    PdfList
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved