Class PdfUnorderedList
- Namespace
- Syncfusion.Pdf.Lists
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents unordered list.
public class PdfUnorderedList : PdfList
- Inheritance
-
PdfUnorderedList
- Inherited Members
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.
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)
- See Also
PdfUnorderedList(PdfFont)
Initializes a new instance of the PdfUnorderedList class.
public PdfUnorderedList(PdfFont font)
Parameters
font
PdfFontThe 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)
- See Also
PdfUnorderedList(PdfListItemCollection)
Creates unordered list using items.
public PdfUnorderedList(PdfListItemCollection items)
Parameters
items
PdfListItemCollectionItems 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)
- See Also
PdfUnorderedList(PdfListItemCollection, PdfUnorderedMarker)
Initializes a new instance of the PdfUnorderedList class.
public PdfUnorderedList(PdfListItemCollection items, PdfUnorderedMarker marker)
Parameters
items
PdfListItemCollectionThe items collection.
marker
PdfUnorderedMarkerThe 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)
- See Also
PdfUnorderedList(PdfUnorderedMarker)
Initializes a new instance of the PdfUnorderedList class.
public PdfUnorderedList(PdfUnorderedMarker marker)
Parameters
marker
PdfUnorderedMarkerThe 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)
- See Also
PdfUnorderedList(string)
Initializes a new instance of the PdfUnorderedList class.
public PdfUnorderedList(string text)
Parameters
text
stringThe 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)
- See Also
PdfUnorderedList(string, PdfUnorderedMarker)
Initializes a new instance of the PdfUnorderedList class from formatted text that is splitted by new lines.
public PdfUnorderedList(string text, PdfUnorderedMarker marker)
Parameters
text
stringThe formatted text.
marker
PdfUnorderedMarkerThe 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)
- See Also
Properties
Marker
Gets or sets the marker.
public PdfUnorderedMarker Marker { get; set; }
Property Value
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)
- See Also