Class PdfListMarkerAlignment
Represents marker alignment.
Inheritance
System.Object
PdfListMarkerAlignment
Namespace: Syncfusion.Pdf.Lists
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public sealed class PdfListMarkerAlignment : Enum
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
Left
Left alignment for marker.
Declaration
public const PdfListMarkerAlignment Left
Field Value
Type |
---|
PdfListMarkerAlignment |
Right
Right alignment for marker.
Declaration
public const PdfListMarkerAlignment Right
Field Value
Type |
---|
PdfListMarkerAlignment |