Section Public class
Description
A Section is a part of a Document containing other Sections, Paragraphs, List and/or Tables.
Diagram
flowchart LR classDef interfaceStyle stroke-dasharray: 5 5; classDef abstractStyle stroke-width:4px subgraph iTextSharp.text iTextSharp.text.Section[[Section]] iTextSharp.text.ITextElementArray[[ITextElementArray]] class iTextSharp.text.ITextElementArray interfaceStyle; iTextSharp.text.IElement[[IElement]] class iTextSharp.text.IElement interfaceStyle; iTextSharp.text.ILargeElement[[ILargeElement]] class iTextSharp.text.ILargeElement 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 subgraph System.Collections.Generic System.Collections.Generic.List_1[[List]] end iTextSharp.text.ITextElementArray --> iTextSharp.text.Section iTextSharp.text.IElement --> iTextSharp.text.ITextElementArray iTextSharp.text.ILargeElement --> iTextSharp.text.Section iTextSharp.text.IElement --> iTextSharp.text.ILargeElement iTextSharp.text.api.IIndentable --> iTextSharp.text.Section iTextSharp.text.pdf.interfaces.IAccessibleElement --> iTextSharp.text.Section System.Collections.Generic.List_1 --> iTextSharp.text.Section
Members
Properties
Public properties
|
Type |
Name |
Methods |
|---|---|---|
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Protected properties
|
Type |
Name |
Methods |
|---|---|---|
|
|
|
|
Methods
Public methods
|
Returns |
Name |
|---|---|
|
|
( |
|
|
( |
|
|
() |
|
|
( |
|
|
() |
|
|
(
key) |
|
,
> |
() |
|
|
() |
|
|
()
|
|
|
() |
|
|
() |
|
|
()
|
|
|
() |
|
|
(
listener)
|
|
|
(
key,
value) |
|
|
( |
|
|
() |
Public Static methods
|
Returns |
Name |
|---|---|
|
|
(
title, |
Details
Summary
A Section is a part of a Document containing other Sections, Paragraphs, List and/or Tables.
Remarks
You can not construct a Section yourself. You will have to ask an instance of Section to the Chapter or Section to which you want to add the new Section.
Example
Paragraph title2 = new Paragraph("This is Chapter 2", FontFactory.GetFont(FontFactory.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255))); Chapter chapter2 = new Chapter(title2, 2); Paragraph someText = new Paragraph("This is some text"); chapter2.Add(someText); Paragraph title21 = new Paragraph("This is Section 1 in Chapter 2", FontFactory.GetFont(FontFactory.HELVETICA, 16, Font.BOLD, new Color(255, 0, 0))); Section section1 = chapter2.AddSection(title21); Paragraph someSectionText = new Paragraph("This is some silly paragraph in a chapter and/or section. It contains some text to test the functionality of Chapters and Section."); section1.Add(someSectionText); Paragraph title211 = new Paragraph("This is SubSection 1 in Section 1 in Chapter 2", FontFactory.GetFont(FontFactory.HELVETICA, 14, Font.BOLD, new Color(255, 0, 0))); Section section11 = section1.AddSection(40, title211, 2); section11.Add(someSectionText);strong>
Inheritance
Constructors
Section [1/2]
Source code
protected internal Section()
Summary
Constructs a new Section.
Section [2/2]
Source code
protected internal Section(Paragraph title, int numberDepth)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
title |
a Paragraph |
|
|
numberDepth |
the numberDepth |
Summary
Constructs a new Section.
Methods
Process
Source code
public virtual bool Process(IElementListener listener)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
listener |
the IElementListener |
Summary
Processes the element by adding it (or the different parts) to an IElementListener.
Returns
true if the element was processed successfully
IsContent
Source code
public virtual bool IsContent()
IsNestable
Source code
public virtual bool IsNestable()
Add [1/2]
Source code
public virtual void Add(int index, IElement element)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
index |
index at which the specified element is to be inserted |
|
|
element |
Summary
Adds a Paragraph, List or Table to this Section.
Add [2/2]
Source code
public virtual bool Add(IElement element)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
element |
Summary
Adds a Paragraph, List, Table or another Section to this Section.
Returns
a bool
AddAll
Source code
public virtual bool AddAll<T>(ICollection<T> collection) where T : IElement
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
collection |
AddSection [1/8]
Source code
public virtual Section AddSection(float indentation, Paragraph title, int numberDepth)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
indentation |
the indentation of the new section |
|
|
title |
the title of the new section |
|
|
numberDepth |
the numberDepth of the section |
Summary
Creates a Section, adds it to this Section and returns it.
Returns
the newly added Section
AddSection [2/8]
Source code
public virtual Section AddSection(float indentation, Paragraph title)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
indentation |
the indentation of the new section |
|
|
title |
the title of the new section |
Summary
Creates a Section, adds it to this Section and returns it.
Returns
the newly added Section
AddSection [3/8]
Source code
public virtual Section AddSection(Paragraph title, int numberDepth)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
title |
the title of the new section |
|
|
numberDepth |
the numberDepth of the section |
Summary
Creates a Section, add it to this Section and returns it.
Returns
the newly added Section
AddMarkedSection
Source code
public virtual MarkedSection AddMarkedSection()
AddSection [4/8]
Source code
public virtual Section AddSection(Paragraph title)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
title |
the title of the new section |
Summary
Creates a Section, adds it to this Section and returns it.
Returns
the newly added Section
AddSection [5/8]
Source code
public virtual Section AddSection(float indentation, string title, int numberDepth)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
indentation |
the indentation of the new section |
|
|
title |
the title of the new section |
|
|
numberDepth |
the numberDepth of the section |
Summary
Adds a Section to this Section and returns it.
Returns
the newly added Section
AddSection [6/8]
Source code
public virtual Section AddSection(string title, int numberDepth)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
title |
the title of the new section |
|
|
numberDepth |
the numberDepth of the section |
Summary
Adds a Section to this Section and returns it.
Returns
the newly added Section
AddSection [7/8]
Source code
public virtual Section AddSection(float indentation, string title)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
indentation |
the indentation of the new section |
|
|
title |
the title of the new section |
Summary
Adds a Section to this Section and returns it.
Returns
the newly added Section
AddSection [8/8]
Source code
public virtual Section AddSection(string title)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
title |
the title of the new section |
Summary
Adds a Section to this Section and returns it.
Returns
the newly added Section
ConstructTitle
Source code
public static Paragraph ConstructTitle(Paragraph title, List<int> numbers, int numberDepth, int numberStyle)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
title |
|
|
|
numbers |
|
|
|
numberDepth |
|
|
|
numberStyle |
IsChapter
Source code
public virtual bool IsChapter()
Summary
Checks if this object is a Chapter.
Returns
true if it is a Chapter, false if it is a Section
IsSection
Source code
public virtual bool IsSection()
Summary
Checks if this object is a Section.
Returns
true if it is a Section, false if it is a Chapter.
GetBookmarkTitle
Source code
public virtual Paragraph GetBookmarkTitle()
ToString
Source code
public override string ToString()
SetChapterNumber
Source code
public virtual void SetChapterNumber(int number)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
number |
FlushContent
Source code
public virtual void FlushContent()
NewPage
Source code
public virtual void NewPage()
GetAccessibleAttribute
Source code
public virtual PdfObject GetAccessibleAttribute(PdfName key)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
key |
SetAccessibleAttribute
Source code
public virtual void SetAccessibleAttribute(PdfName key, PdfObject value)
Arguments
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
Title
public virtual Paragraph Title { get; set; }
Summary
Get/set the title of this section
Value
a Paragraph
NumberStyle
public virtual int NumberStyle { get; set; }
NumberDepth
public virtual int NumberDepth { get; set; }
Summary
Get/set the numberdepth of this Section.
Value
a int
IndentationLeft
public virtual float IndentationLeft { get; set; }
Summary
Get/set the indentation of this Section on the left side.
Value
the indentation
IndentationRight
public virtual float IndentationRight { get; set; }
Summary
Get/set the indentation of this Section on the right side.
Value
the indentation
Indentation
public virtual float Indentation { get; set; }
Summary
Get/set the indentation of the content of this Section.
Value
the indentation
Depth
public virtual int Depth { get; }
Summary
Returns the depth of this section.
Value
the depth
BookmarkOpen
public virtual bool BookmarkOpen { get; set; }
Summary
Get/set the bookmark
Value
a bool
BookmarkTitle
public virtual string BookmarkTitle { set; }
TriggerNewPage
public virtual bool TriggerNewPage { get; set; }
NotAddedYet
public virtual bool NotAddedYet { get; set; }
AddedCompletely
protected virtual bool AddedCompletely { get; set; }
ElementComplete
public virtual bool ElementComplete { 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