menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfListMarkerAlignment - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Enum PdfListMarkerAlignment

    Represents marker alignment.

    Namespace: Syncfusion.Pdf.Lists
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfListMarkerAlignment
    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 unordered list
    PdfUnorderedList list = new PdfUnorderedList();            
    //Set the marker style
    list.Marker.Alignment = PdfListMarkerAlignment.Left
    //Create a font and write title
    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold);
    //Create string format
    PdfStringFormat format = new PdfStringFormat();
    format.LineSpacing = 20f;
    font = new PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold);
    //Apply formattings to list
    list.Font = font;
    list.StringFormat = format;
    //Set list indent
    list.Indent = 10;
    //Add items to the list
    list.Items.Add("List of Essential Studio products");
    list.Items.Add("IO products");
    //Set text indent
    list.TextIndent = 10;
    //Draw list
    list.Draw(page, new RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height));
    document.Save("UnOrderList.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 unordered list
    Dim list As PdfUnorderedList = New PdfUnorderedList()
    'Set the marker alignment
    list.Marker.Alignment = PdfListMarkerAlignment.Left
    'Create a font and write title
    Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 14, PdfFontStyle.Bold)
    'Create string format
    Dim format As PdfStringFormat = New PdfStringFormat()
    format.LineSpacing = 20f
    font = New PdfStandardFont(PdfFontFamily.TimesRoman, 10, PdfFontStyle.Bold)
    'Apply formattings to list
    list.Font = font
    list.StringFormat = format
    'Set list indent
    list.Indent = 10
    'Add items to the list
    list.Items.Add("List of Essential Studio products")
    list.Items.Add("IO products")
    'Set text indent
    list.TextIndent = 10
    'Draw list
    list.Draw(page, New RectangleF(0, 130, page.Graphics.ClientSize.Width, page.Graphics.ClientSize.Height))
    document.Save("UnOrderList.pdf")

    Fields

    Name Description
    Left

    Left alignment for marker.

    Right

    Right alignment for marker.

    See Also
    PdfMarker
    PdfDocument
    PdfFont
    PdfUnorderedList
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved