Skip to main content
Skip table of contents

List

List Public class

Description

A List contains several ListItems.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph iTextSharp.text
  iTextSharp.text.List[[List]]
  iTextSharp.text.ITextElementArray[[ITextElementArray]]
  class iTextSharp.text.ITextElementArray interfaceStyle;
  iTextSharp.text.IElement[[IElement]]
  class iTextSharp.text.IElement interfaceStyle;
  end
  subgraph iTextSharp.text.api
  iTextSharp.text.api.IIndentable[[IIndentable]]
  class iTextSharp.text.api.IIndentable interfaceStyle;
  end
  subgraph iTextSharp.text.pdf.interfaces
  iTextSharp.text.pdf.interfaces.IAccessibleElement[[IAccessibleElement]]
  class iTextSharp.text.pdf.interfaces.IAccessibleElement interfaceStyle;
  end
iTextSharp.text.ITextElementArray --> iTextSharp.text.List
iTextSharp.text.IElement --> iTextSharp.text.ITextElementArray
iTextSharp.text.api.IIndentable --> iTextSharp.text.List
iTextSharp.text.pdf.interfaces.IAccessibleElement --> iTextSharp.text.List

Members

Properties

Public properties
TypeNameMethods
boolAlignindentget, set
boolAutoindentget, set
IList<Chunk>Chunks
Gets all the chunks in this element.
get
intFirst
Get/set the first number
get, set
AccessibleElementIdIDget, set
floatIndentationLeft
Get/set the indentation of this paragraph on the left side.
get, set
floatIndentationRight
Get/set the indentation of this paragraph on the right side.
get, set
boolIsInlineget
boolIsLowercase
Alias for VB.NET compatibility.
get, set
List<IElement>Items
Gets all the items in the list.
get
boolLetteredget, set
ChunkListSymbol
Sets the symbol
set
boolLowercaseget, set
boolNumberedget, set
stringPostSymbolget, set
stringPreSymbolget, set
PdfNameRoleget, set
intSize
Gets the size of the list.
get
ChunkSymbol
Get/set the symbol indentation.
get, set
floatSymbolIndent
Gets the symbol indentation.
get, set
floatTotalLeading
Gets the leading of the first listitem.
get
intType
Gets the type of the text element.
get

Methods

Public methods
ReturnsName
boolAdd(...)
ListCloneShallow()
PdfObjectGetAccessibleAttribute(PdfName key)
Dictionary<PdfName, PdfObject>GetAccessibleAttributes()
ListItemGetFirstItem()
ListItemGetLastItem()
boolIsContent()
boolIsEmpty()
boolIsNestable()
voidNormalizeIndentation()
boolProcess(IElementListener listener)
Processes the element by adding it (or the different parts) to an
IElementListener.
voidSetAccessibleAttribute(PdfName key, PdfObject value)
voidSetListSymbol(string symbol)
Sets the listsymbol.
stringgetPostSymbol()
Protected methods
ReturnsName
voidPopulateProperties(List clone)

Details

Summary

A List contains several ListItems.

Example

Example 1:

List list = new List(true, 20);
            list.Add(new ListItem("First line"));
            list.Add(new ListItem("The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?"));
            list.Add(new ListItem("Third line"));

The result of this code looks like this: First line The second line is longer to see what happens once the end of the line is reached. Will it start on a new line? Third line Example 2:

List overview = new List(false, 10);
            overview.Add(new ListItem("This is an item"));
            overview.Add("This is another item");

Inheritance

Constructors

List [1/6]

Source code

public List()
List [2/6]

Source code

public List(float symbolIndent)
Arguments
TypeNameDescription
floatsymbolIndent
List [3/6]

Source code

public List(bool numbered)
Arguments
TypeNameDescription
boolnumbered
List [4/6]

Source code

public List(bool numbered, bool lettered)
Arguments
TypeNameDescription
boolnumbered
boollettered
List [5/6]

Source code

public List(bool numbered, float symbolIndent)
Arguments
TypeNameDescription
boolnumbereda bool
floatsymbolIndentthe indentation that has to be used for the listsymbol
Summary

Constructs a List.

Remarks

the parameter symbolIndent is important for instance when generating PDF-documents; it indicates the indentation of the listsymbol.

List [6/6]

Source code

public List(bool numbered, bool lettered, float symbolIndent)
Arguments
TypeNameDescription
boolnumbereda bool
boollettereda bool
floatsymbolIndentthe indentation that has to be used for the listsymbol
Summary

Constructs a List.

Methods

Process

Source code

public virtual bool Process(IElementListener listener)
Arguments
TypeNameDescription
IElementListenerlisteneran IElementListener
Summary

Processes the element by adding it (or the different parts) to an IElementListener.

Returns

true if the element was processed successfully

Add [1/2]

Source code

public virtual bool Add(string s)
Arguments
TypeNameDescription
strings
Add [2/2]

Source code

public virtual bool Add(IElement o)
Arguments
TypeNameDescription
IElementothe object to add
Summary

Adds an Object to the List.

Returns

true is successful

CloneShallow

Source code

public virtual List CloneShallow()
PopulateProperties

Source code

protected void PopulateProperties(List clone)
Arguments
TypeNameDescription
Listclone
NormalizeIndentation

Source code

public virtual void NormalizeIndentation()
SetListSymbol

Source code

public virtual void SetListSymbol(string symbol)
Arguments
TypeNameDescription
stringsymbola string
Summary

Sets the listsymbol.

Remarks

This is a shortcut for SetListSymbol(Chunk symbol).

IsContent

Source code

public virtual bool IsContent()
IsNestable

Source code

public virtual bool IsNestable()
IsEmpty

Source code

public virtual bool IsEmpty()
getPostSymbol

Source code

public virtual string getPostSymbol()
GetFirstItem

Source code

public virtual ListItem GetFirstItem()
GetLastItem

Source code

public virtual ListItem GetLastItem()
GetAccessibleAttribute

Source code

public virtual PdfObject GetAccessibleAttribute(PdfName key)
Arguments
TypeNameDescription
PdfNamekey
SetAccessibleAttribute

Source code

public virtual void SetAccessibleAttribute(PdfName key, PdfObject value)
Arguments
TypeNameDescription
PdfNamekey
PdfObjectvalue
GetAccessibleAttributes

Source code

public virtual Dictionary<PdfName, PdfObject> GetAccessibleAttributes()

Properties

Type
public virtual int Type { get; }
Summary

Gets the type of the text element.

Value

a type

Chunks
public virtual IList<Chunk> Chunks { get; }
Summary

Gets all the chunks in this element.

Value

an ArrayList

Numbered
public virtual bool Numbered { get; set; }
Lettered
public virtual bool Lettered { get; set; }
Lowercase
public virtual bool Lowercase { get; set; }
IsLowercase
public virtual bool IsLowercase { get; set; }
Summary

Alias for VB.NET compatibility.

Autoindent
public virtual bool Autoindent { get; set; }
Alignindent
public virtual bool Alignindent { get; set; }
First
public virtual int First { get; set; }
Summary

Get/set the first number

Value

an int

ListSymbol
public virtual Chunk ListSymbol { set; }
Summary

Sets the symbol

Value

a Chunk

IndentationLeft
public virtual float IndentationLeft { get; set; }
Summary

Get/set the indentation of this paragraph on the left side.

Value

the indentation

IndentationRight
public virtual float IndentationRight { get; set; }
Summary

Get/set the indentation of this paragraph on the right side.

Value

the indentation

SymbolIndent
public virtual float SymbolIndent { get; set; }
Summary

Gets the symbol indentation.

Value

the symbol indentation

Items
public virtual List<IElement> Items { get; }
Summary

Gets all the items in the list.

Value

an ArrayList containing ListItems

Size
public virtual int Size { get; }
Summary

Gets the size of the list.

Value

a size

TotalLeading
public virtual float TotalLeading { get; }
Summary

Gets the leading of the first listitem.

Value

a leading

Symbol
public virtual Chunk Symbol { get; set; }
Summary

Get/set the symbol indentation.

Value

a Chunk

PostSymbol
public virtual string PostSymbol { get; set; }
PreSymbol
public virtual string PreSymbol { get; set; }
Role
public virtual PdfName Role { get; set; }
ID
public virtual AccessibleElementId ID { get; set; }
IsInline
public virtual bool IsInline { get; }

Generated with ModularDoc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.