Table of Contents

Class MarkedSection

Namespace
iTextSharp.text
Assembly
iTextSharp.LGPLv2.Core.dll

Wrapper that allows to add properties to a Chapter/Section object. Before iText 1.5 every 'basic building block' implemented the MarkupAttributes interface. By setting attributes, you could add markup to the corresponding XML and/or HTML tag. This functionality was hardly used by anyone, so it was removed, and replaced by the MarkedObject functionality.

public class MarkedSection : MarkedObject, IElement
Inheritance
MarkedSection
Implements
Inherited Members

Constructors

MarkedSection(Section)

Creates a MarkedObject with a Section or Chapter object.

public MarkedSection(Section section)

Parameters

section Section

the marked section

Fields

title

This is the title of this section.

protected MarkedObject title

Field Value

MarkedObject

Properties

BookmarkOpen

Setter for property bookmarkOpen. visible.

public bool BookmarkOpen { set; }

Property Value

bool

BookmarkTitle

Sets the bookmark title. The bookmark title is the same as the section title but can be changed with this method.

public string BookmarkTitle { set; }

Property Value

string

Indentation

Sets the indentation of the content of this Section .

public float Indentation { set; }

Property Value

float

IndentationLeft

Sets the indentation of this Section on the left side.

public float IndentationLeft { set; }

Property Value

float

IndentationRight

public float IndentationRight { set; }

Property Value

float

NumberDepth

Sets the depth of the sectionnumbers that will be shown preceding the title. If the numberdepth is 0, the sections will not be numbered. If the numberdepth is 1, the section will be numbered with their own number. If the numberdepth is higher (for instance x > 1), the numbers of x - 1 parents will be shown.

public int NumberDepth { set; }

Property Value

int

Title

Sets the title of this section.

public MarkedObject Title { get; set; }

Property Value

MarkedObject

TriggerNewPage

Setter for property triggerNewPage.

public bool TriggerNewPage { set; }

Property Value

bool

Methods

Add(int, IElement)

public void Add(int index, IElement o)

Parameters

index int
o IElement

Add(IElement)

Adds a Paragraph , List , Table or another Section to this Section . @throws ClassCastException if the object is not a Paragraph , List , Table or Section

public bool Add(IElement o)

Parameters

o IElement

an object of type Paragraph , List , Table or another Section

Returns

bool

a bool

AddAll(ICollection<IElement>)

public bool AddAll(ICollection<IElement> collection)

Parameters

collection ICollection<IElement>

Returns

bool

AddSection()

Creates a Section , adds it to this Section and returns it.

public MarkedSection AddSection()

Returns

MarkedSection

a new Section object

AddSection(int)

Adds a collection of Element s to this Section . @throws ClassCastException if one of the objects isn't a Paragraph , List , Table

public MarkedSection AddSection(int numberDepth)

Parameters

numberDepth int

Returns

MarkedSection

AddSection(float)

public MarkedSection AddSection(float indentation)

Parameters

indentation float

Returns

MarkedSection

AddSection(float, int)

public MarkedSection AddSection(float indentation, int numberDepth)

Parameters

indentation float
numberDepth int

Returns

MarkedSection

NewPage()

Adds a new page to the section. @since 2.1.1

public void NewPage()

Process(IElementListener)

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

public override bool Process(IElementListener listener)

Parameters

listener IElementListener

an ElementListener

Returns

bool

true if the element was processed successfully