HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.Paragraph Class Reference

A Paragraph is a series of Chunks and/or Phrases. More...

Inheritance diagram for iTextSharp.text.Paragraph:
iTextSharp.text.Phrase iTextSharp.text.ITextElementArray iTextSharp.text.IElement iTextSharp.text.ListItem

Public Member Functions

 Paragraph ()
 Constructs a Paragraph. More...
 
 Paragraph (float leading)
 Constructs a Paragraph with a certain leading. More...
 
 Paragraph (Chunk chunk)
 Constructs a Paragraph with a certain Chunk. More...
 
 Paragraph (float leading, Chunk chunk)
 Constructs a Paragraph with a certain Chunk and a certain leading. More...
 
 Paragraph (string str)
 Constructs a Paragraph with a certain string. More...
 
 Paragraph (string str, Font font)
 Constructs a Paragraph with a certain string and a certain Font. More...
 
 Paragraph (float leading, string str)
 Constructs a Paragraph with a certain string and a certain leading. More...
 
 Paragraph (float leading, string str, Font font)
 Constructs a Paragraph with a certain leading, string and Font. More...
 
 Paragraph (Phrase phrase)
 Constructs a Paragraph with a certain Phrase. More...
 
override bool Add (Object o)
 Adds an Object to the Paragraph. More...
 
void SetAlignment (string alignment)
 Sets the alignment of this paragraph. More...
 
void SetLeading (float fixedLeading, float multipliedLeading)
 
- Public Member Functions inherited from iTextSharp.text.Phrase
 Phrase ()
 Constructs a Phrase without specifying a leading. More...
 
 Phrase (Phrase phrase)
 
 Phrase (float leading)
 Constructs a Phrase with a certain leading. More...
 
 Phrase (Chunk chunk)
 Constructs a Phrase with a certain Chunk. More...
 
 Phrase (float leading, Chunk chunk)
 Constructs a Phrase with a certain Chunk and a certain leading. More...
 
 Phrase (string str)
 Constructs a Phrase with a certain string. More...
 
 Phrase (string str, Font font)
 Constructs a Phrase with a certain string and a certain Font. More...
 
 Phrase (float leading, string str)
 Constructs a Phrase with a certain leading and a certain string. More...
 
 Phrase (float leading, string str, Font font)
 
virtual bool Process (IElementListener listener)
 Processes the element by adding it (or the different parts) to an iTextSharp.text.IElementListener. More...
 
bool IsContent ()
 
bool IsNestable ()
 
virtual void Add (int index, Object o)
 Adds a Chunk, an Anchor or another Phrase to this Phrase. More...
 
bool AddAll (ICollection collection)
 Adds a collection of Chunks to this Phrase. More...
 
void AddSpecial (Object obj)
 Adds a Object to the Paragraph. More...
 
bool IsEmpty ()
 Checks is this Phrase contains no or 1 empty Chunk. More...
 
bool HasLeading ()
 
override string ToString ()
 Gets the content of the text element. More...
 

Static Public Member Functions

static new bool IsTag (string tag)
 Checks if a given tag corresponds with this object. More...
 
- Static Public Member Functions inherited from iTextSharp.text.Phrase
static bool IsTag (string tag)
 Checks if a given tag corresponds with this object. More...
 
static Phrase GetInstance (String str)
 
static Phrase GetInstance (int leading, String str)
 
static Phrase GetInstance (int leading, String str, Font font)
 

Protected Attributes

int alignment = Element.ALIGN_UNDEFINED
 The alignment of the text. More...
 
float multipliedLeading = 0
 summary> The indentation of this paragraph on the left side. More...
 
float indentationLeft
 summary> The indentation of this paragraph on the right side. More...
 
float indentationRight
 
float spacingBefore
 
float spacingAfter
 
bool keeptogether = false
 
- Protected Attributes inherited from iTextSharp.text.Phrase
Single leading = Single.NaN
 This is the leading of this phrase. More...
 
Font font
 
IHyphenationEvent hyphenation = null
 

Properties

override int Type [get]
 Gets the type of the text element. More...
 
override float Leading [set]
 
float MultipliedLeading [get, set]
 
int Alignment [get, set]
 Get/set the alignment of this paragraph. More...
 
float IndentationLeft [get, set]
 Get/set the indentation of this paragraph on the left side. More...
 
float IndentationRight [get, set]
 Get/set the indentation of this paragraph on the right side. More...
 
float SpacingBefore [get, set]
 
float SpacingAfter [get, set]
 
bool KeepTogether [get, set]
 Set/get if this paragraph has to be kept together on one page. More...
 
float? TotalLeading [get]
 
float FirstLineIndent [get, set]
 
float ExtraParagraphSpace [get, set]
 
- Properties inherited from iTextSharp.text.Phrase
virtual int Type [get]
 Gets the type of the text element. More...
 
virtual ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 
virtual float Leading [get, set]
 Gets/sets the leading of this phrase. More...
 
Font Font [get, set]
 Gets the font of the first Chunk that appears in this Phrase. More...
 
String Content [get]
 
IHyphenationEvent Hyphenation [get, set]
 
- Properties inherited from iTextSharp.text.IElement
int Type [get]
 Gets the type of the text element. More...
 
ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 

Additional Inherited Members

- Protected Member Functions inherited from iTextSharp.text.Phrase
bool AddChunk (Chunk chunk)
 Adds a Chunk. More...
 

Detailed Description

A Paragraph is a series of Chunks and/or Phrases.

A Paragraph has the same qualities of a Phrase, but also some additional layout-parameters:

  • the indentation the alignment of the text
<strong>Paragraph p = new Paragraph("This is a paragraph",
FontFactory.GetFont(FontFactory.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255)));</strong>
const int BOLDITALIC
this is a possible style.
Definition: Font.cs:104
Paragraph()
Constructs a Paragraph.
Definition: Paragraph.cs:118
Font Font
Gets the font of the first Chunk that appears in this Phrase.
Definition: Phrase.cs:395
p
Definition: glyphlist.txt:2969
See also
T:iTextSharp.text.Element, T:iTextSharp.text.Phrase, T:iTextSharp.text.ListItem

Constructor & Destructor Documentation

◆ Paragraph() [1/9]

iTextSharp.text.Paragraph.Paragraph ( )

Constructs a Paragraph.

◆ Paragraph() [2/9]

iTextSharp.text.Paragraph.Paragraph ( float  leading)

Constructs a Paragraph with a certain leading.

Parameters
leadingthe leading

◆ Paragraph() [3/9]

iTextSharp.text.Paragraph.Paragraph ( Chunk  chunk)

Constructs a Paragraph with a certain Chunk.

Parameters
chunka Chunk

◆ Paragraph() [4/9]

iTextSharp.text.Paragraph.Paragraph ( float  leading,
Chunk  chunk 
)

Constructs a Paragraph with a certain Chunk and a certain leading.

Parameters
leadingthe leading
chunka Chunk

◆ Paragraph() [5/9]

iTextSharp.text.Paragraph.Paragraph ( string  str)

Constructs a Paragraph with a certain string.

Parameters
stra string

◆ Paragraph() [6/9]

iTextSharp.text.Paragraph.Paragraph ( string  str,
Font  font 
)

Constructs a Paragraph with a certain string and a certain Font.

Parameters
stra string
fonta Font

◆ Paragraph() [7/9]

iTextSharp.text.Paragraph.Paragraph ( float  leading,
string  str 
)

Constructs a Paragraph with a certain string and a certain leading.

Parameters
leadingthe leading
stra string

◆ Paragraph() [8/9]

iTextSharp.text.Paragraph.Paragraph ( float  leading,
string  str,
Font  font 
)

Constructs a Paragraph with a certain leading, string and Font.

Parameters
leadingthe leading
stra string
fonta Font

◆ Paragraph() [9/9]

iTextSharp.text.Paragraph.Paragraph ( Phrase  phrase)

Constructs a Paragraph with a certain Phrase.

Parameters
phrasea Phrase

Member Function Documentation

◆ Add()

override bool iTextSharp.text.Paragraph.Add ( Object  o)
virtual

Adds an Object to the Paragraph.

Parameters
othe object to add
Returns
a bool

Reimplemented from iTextSharp.text.Phrase.

◆ IsTag()

static new bool iTextSharp.text.Paragraph.IsTag ( string  tag)
static

Checks if a given tag corresponds with this object.

Parameters
tagthe given tag
Returns
true if the tag corresponds

◆ SetAlignment()

void iTextSharp.text.Paragraph.SetAlignment ( string  alignment)

Sets the alignment of this paragraph.

Parameters
alignmentthe new alignment as a string

◆ SetLeading()

void iTextSharp.text.Paragraph.SetLeading ( float  fixedLeading,
float  multipliedLeading 
)

Sets the leading fixed and variable. The resultant leading will be fixedLeading+multipliedLeading*maxFontSize where maxFontSize is the size of the bigest font in the line.

Parameters
fixedLeadingthe fixed leading
multipliedLeadingthe variable leading

Member Data Documentation

◆ alignment

int iTextSharp.text.Paragraph.alignment = Element.ALIGN_UNDEFINED
protected

The alignment of the text.

◆ indentationLeft

float iTextSharp.text.Paragraph.indentationLeft
protected

summary> The indentation of this paragraph on the right side.

◆ indentationRight

float iTextSharp.text.Paragraph.indentationRight
protected

◆ keeptogether

bool iTextSharp.text.Paragraph.keeptogether = false
protected

◆ multipliedLeading

float iTextSharp.text.Paragraph.multipliedLeading = 0
protected

summary> The indentation of this paragraph on the left side.

The text leading that is multiplied by the biggest font size in the line.

◆ spacingAfter

float iTextSharp.text.Paragraph.spacingAfter
protected

The spacing after the paragraph.

◆ spacingBefore

float iTextSharp.text.Paragraph.spacingBefore
protected

The spacing before the paragraph.

Property Documentation

◆ Alignment

int iTextSharp.text.Paragraph.Alignment
getset

Get/set the alignment of this paragraph.

a integer

◆ ExtraParagraphSpace

float iTextSharp.text.Paragraph.ExtraParagraphSpace
getset

◆ FirstLineIndent

float iTextSharp.text.Paragraph.FirstLineIndent
getset

◆ IndentationLeft

float iTextSharp.text.Paragraph.IndentationLeft
getset

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

a float

◆ IndentationRight

float iTextSharp.text.Paragraph.IndentationRight
getset

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

a float

◆ KeepTogether

bool iTextSharp.text.Paragraph.KeepTogether
getset

Set/get if this paragraph has to be kept together on one page.

a bool

◆ Leading

override float iTextSharp.text.Paragraph.Leading
set

◆ MultipliedLeading

float iTextSharp.text.Paragraph.MultipliedLeading
getset

Sets the variable leading. The resultant leading will be multipliedLeading*maxFontSize where maxFontSize is the size of the bigest font in the line.

Parameters
multipliedLeadingthe variable leading

◆ SpacingAfter

float iTextSharp.text.Paragraph.SpacingAfter
getset

◆ SpacingBefore

float iTextSharp.text.Paragraph.SpacingBefore
getset

◆ TotalLeading

float? iTextSharp.text.Paragraph.TotalLeading
get

Gets the total leading. This method is based on the assumption that the font of the Paragraph is the font of all the elements that make part of the paragraph. This isn't necessarily true.

Returns
the total leading (fixed and multiplied)

◆ Type

override int iTextSharp.text.Paragraph.Type
get

Gets the type of the text element.

a type


The documentation for this class was generated from the following file: