Class PdfUnorderedList
Represents unordered list.
Inherited Members
Namespace: Syncfusion.Pdf.Lists
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public class PdfUnorderedList : PdfList
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 a PDF unordered list.
PdfUnorderedList list = new PdfUnorderedList();
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Add items.
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 a PDF unordered list.
Dim list As New PdfUnorderedList()
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Add items.
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)
Constructors
PdfUnorderedList()
Initializes a new instance of the PdfUnorderedList class.
Declaration
public PdfUnorderedList()
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 a PDF unordered list.
PdfUnorderedList list = new PdfUnorderedList();
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Add items.
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 a PDF unordered list.
Dim list As New PdfUnorderedList()
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Add items.
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)
PdfUnorderedList(PdfFont)
Initializes a new instance of the PdfUnorderedList class.
Declaration
public PdfUnorderedList(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 a PDF unordered list.
PdfUnorderedList list = new PdfUnorderedList(font);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set string format.
list.StringFormat = format;
//Add items.
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 a PDF unordered list.
Dim list As New PdfUnorderedList(font)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set string format.
list.StringFormat = format
'Add items.
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)
PdfUnorderedList(PdfListItemCollection)
Creates unordered list using items.
Declaration
public PdfUnorderedList(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 a PDF unordered list.
//Create new list items.
PdfListItemCollection collection = new PdfListItemCollection();
collection.Add("PDF");
collection.Add("XlsIO");
collection.Add("DocIO");
collection.Add("PPT");
PdfUnorderedList list = new PdfUnorderedList(collection);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
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 list items.
Dim collection As PdfListItemCollection = New PdfListItemCollection()
collection.Add("PDF")
collection.Add("XlsIO")
collection.Add("DocIO")
collection.Add("PPT")
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(collection)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
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)
PdfUnorderedList(PdfListItemCollection, PdfUnorderedMarker)
Initializes a new instance of the PdfUnorderedList class.
Declaration
public PdfUnorderedList(PdfListItemCollection items, PdfUnorderedMarker marker)
Parameters
Type | Name | Description |
---|---|---|
PdfListItemCollection | items | The items collection. |
PdfUnorderedMarker | 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 a PDF unordered list.
//Create new list items.
PdfListItemCollection collection = new PdfListItemCollection();
collection.Add("PDF");
collection.Add("XlsIO");
collection.Add("DocIO");
collection.Add("PPT");
//Create new unorder marker instance.
PdfUnorderedMarker marker = new PdfUnorderedMarker(PdfUnorderedMarkerStyle.Asterisk);
PdfUnorderedList list = new PdfUnorderedList(collection, marker);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
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 list items.
Dim collection As PdfListItemCollection = New PdfListItemCollection()
collection.Add("PDF")
collection.Add("XlsIO")
collection.Add("DocIO")
collection.Add("PPT")
'Create new unorder marker instance.
Dim marker As PdfUnorderedMarker = New PdfUnorderedMarker(PdfUnorderedMarkerStyle.Asterisk);
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(collection, marker)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
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)
PdfUnorderedList(PdfUnorderedMarker)
Initializes a new instance of the PdfUnorderedList class.
Declaration
public PdfUnorderedList(PdfUnorderedMarker marker)
Parameters
Type | Name | Description |
---|---|---|
PdfUnorderedMarker | 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 unorder marker instance.
PdfUnorderedMarker marker = new PdfUnorderedMarker(PdfUnorderedMarkerStyle.Asterisk);
//Create a PDF unordered list.
PdfUnorderedList list = new PdfUnorderedList(marker);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Add items.
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 unorder marker instance.
Dim marker As PdfUnorderedMarker = New PdfUnorderedMarker(PdfUnorderedMarkerStyle.Asterisk);
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(marker)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Add items.
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)
PdfUnorderedList(String)
Initializes a new instance of the PdfUnorderedList class.
Declaration
public PdfUnorderedList(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;
//Create a PDF unordered list.
string text = "PDF\nXlsIO\ndDocIO\nPPT";
PdfUnorderedList list = new PdfUnorderedList(text);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
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
Dim text As String = "PDF\nXlsIO\ndDocIO\nPPT";
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(text)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
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)
PdfUnorderedList(String, PdfUnorderedMarker)
Initializes a new instance of the PdfUnorderedList class from formatted text that is splitted by new lines.
Declaration
public PdfUnorderedList(string text, PdfUnorderedMarker marker)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The formatted text. |
PdfUnorderedMarker | 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;
//Create a PDF unordered list.
string text = "PDF\nXlsIO\ndDocIO\nPPT";
//Create new unorder marker instance.
PdfUnorderedMarker marker = new PdfUnorderedMarker(PdfUnorderedMarkerStyle.Asterisk);
PdfUnorderedList list = new PdfUnorderedList(text, marker);
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
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
Dim text As String = "PDF\nXlsIO\ndDocIO\nPPT";
'Create new unorder marker instance.
Dim marker As PdfUnorderedMarker = New PdfUnorderedMarker(PdfUnorderedMarkerStyle.Asterisk);
'Create a PDF unordered list.
Dim list As New PdfUnorderedList(text, marker)
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
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 the marker.
Declaration
public PdfUnorderedMarker Marker { get; set; }
Property Value
Type |
---|
PdfUnorderedMarker |
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 a PDF unordered list.
PdfUnorderedList list = new PdfUnorderedList();
list.Marker.Style = PdfUnorderedMarkerStyle.Disk;
//Set line indent.
list.Indent = 20;
//Set font
list.Font = font;
//Set string format.
list.StringFormat = format;
//Add items.
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 a PDF unordered list.
Dim list As New PdfUnorderedList()
list.Marker.Style = PdfUnorderedMarkerStyle.Disk
'Set line indent.
list.Indent = 20
'Set font
list.Font = font
'Set string format.
list.StringFormat = format
'Add items.
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)