C# Class iTextSharp.text.Chunk

This is the smallest significant part of text that can be added to a document.
Most elements can be divided in one or more Chunks. A chunk is a string with a certain Font. all other layoutparameters should be defined in the object to which this chunk of text is added.
Inheritance: IElement, IAccessibleElement
ファイルを表示 Open project: mapo80/iTextSharp-Monotouch Class Usage Examples

Public Properties

Property Type Description
LINEHEIGHT String
NEWLINE Chunk
NEXTPAGE Chunk

Protected Properties

Property Type Description
attributes object>.Dictionary
content StringBuilder
font Font

Public Methods

Method Description
Append ( string str ) : StringBuilder

appends some text to this Chunk.

Chunk ( Chunk ck ) : System
Chunk ( IDrawInterface separator ) : System
Chunk ( IDrawInterface separator, bool vertical ) : System
Chunk ( IDrawInterface separator, float tabPosition ) : System
Chunk ( IDrawInterface separator, float tabPosition, bool newline ) : System
Chunk ( Image image, float offsetX, float offsetY ) : System

Constructs a chunk containing an Image.

Chunk ( Image image, float offsetX, float offsetY, bool changeLeading ) : System

Constructs a chunk containing an Image.

Chunk ( char c ) : System
Chunk ( char c, Font font ) : System
Chunk ( string content ) : System

Constructs a chunk of text with a certain content, without specifying a Font.

Chunk ( string content, Font font ) : System

Constructs a chunk of text with a certain content and a certain Font.

GetCharacterSpacing ( ) : float
GetHyphenation ( ) : IHyphenationEvent
GetImage ( ) : Image

Returns the image.

GetTextRise ( ) : float
GetWidthPoint ( ) : float
HasAttributes ( ) : bool

Checks the attributes of this Chunk.

IsContent ( ) : bool
IsEmpty ( ) : bool

Checks is this Chunk is empty.

IsNestable ( ) : bool
Process ( IElementListener listener ) : bool

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

SetAction ( PdfAction action ) : Chunk

Sets an action for this Chunk.

SetAnchor ( Uri url ) : Chunk

Sets an anchor for this Chunk.

SetAnchor ( string url ) : Chunk

Sets an anchor for this Chunk.

SetAnnotation ( PdfAnnotation annotation ) : Chunk

Sets a generic annotation to this Chunk.

SetBackground ( BaseColor color ) : Chunk

Sets the color of the background Chunk.

SetBackground ( BaseColor color, float extraLeft, float extraBottom, float extraRight, float extraTop ) : Chunk
SetCharacterSpacing ( float charSpace ) : Chunk
SetGenericTag ( string text ) : Chunk

Sets the generic tag Chunk.

The text for this tag can be retrieved with PdfPageEvent.

SetHorizontalScaling ( float scale ) : Chunk
SetHyphenation ( IHyphenationEvent hyphenation ) : Chunk

sets the hyphenation engine to this Chunk.

SetLocalDestination ( string name ) : Chunk

Sets a local destination for this Chunk.

SetLocalGoto ( string name ) : Chunk

Sets a local goto for this Chunk.

There must be a local destination matching the name.

SetNewPage ( ) : Chunk

Sets a new page tag.

SetRemoteGoto ( string filename, int page ) : Chunk

Sets a goto for a remote destination for this Chunk.

SetRemoteGoto ( string filename, string name ) : Chunk

Sets a goto for a remote destination for this Chunk.

SetSkew ( float alpha, float beta ) : Chunk
SetSplitCharacter ( ISplitCharacter splitCharacter ) : Chunk

Sets the split characters.

SetTextRenderMode ( int mode, float strokeWidth, BaseColor strokeColor ) : Chunk
SetTextRise ( float rise ) : Chunk

Sets the text displacement relative to the baseline. Positive values rise the text, negative values lower the text.

It can be used to implement sub/basescript.

SetUnderline ( BaseColor color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int cap ) : Chunk
SetUnderline ( float thickness, float yPosition ) : Chunk
ToString ( ) : string
createTabspace ( ) : Chunk
createTabspace ( float spacing ) : Chunk
createWhitespace ( String content ) : Chunk
createWhitespace ( String content, bool preserve ) : Chunk
isTabspace ( ) : bool
isWhitespace ( ) : bool
setLineHeight ( float lineheight ) : Chunk

Private Methods

Method Description
Chunk ( ) : System
SetAttribute ( string name, Object obj ) : Chunk

Sets an arbitrary attribute.

Method Details

Append() public method

appends some text to this Chunk.
public Append ( string str ) : StringBuilder
str string a string
return StringBuilder

Chunk() public method

public Chunk ( Chunk ck ) : System
ck Chunk
return System

Chunk() public method

public Chunk ( IDrawInterface separator ) : System
separator IDrawInterface
return System

Chunk() public method

public Chunk ( IDrawInterface separator, bool vertical ) : System
separator IDrawInterface
vertical bool
return System

Chunk() public method

public Chunk ( IDrawInterface separator, float tabPosition ) : System
separator IDrawInterface
tabPosition float
return System

Chunk() public method

public Chunk ( IDrawInterface separator, float tabPosition, bool newline ) : System
separator IDrawInterface
tabPosition float
newline bool
return System

Chunk() public method

Constructs a chunk containing an Image.
public Chunk ( Image image, float offsetX, float offsetY ) : System
image Image the image
offsetX float the image offset in the x direction
offsetY float the image offset in the y direction
return System

Chunk() public method

Constructs a chunk containing an Image.
public Chunk ( Image image, float offsetX, float offsetY, bool changeLeading ) : System
image Image the image
offsetX float the image offset in the x direction
offsetY float the image offset in the y direction
changeLeading bool true if the leading has to be adapted to the image
return System

Chunk() public method

public Chunk ( char c ) : System
c char
return System

Chunk() public method

public Chunk ( char c, Font font ) : System
c char
font Font
return System

Chunk() public method

Constructs a chunk of text with a certain content, without specifying a Font.
public Chunk ( string content ) : System
content string the content
return System

Chunk() public method

Constructs a chunk of text with a certain content and a certain Font.
public Chunk ( string content, Font font ) : System
content string the content
font Font the font
return System

GetCharacterSpacing() public method

public GetCharacterSpacing ( ) : float
return float

GetHyphenation() public method

public GetHyphenation ( ) : IHyphenationEvent
return IHyphenationEvent

GetImage() public method

Returns the image.
public GetImage ( ) : Image
return Image

GetTextRise() public method

public GetTextRise ( ) : float
return float

GetWidthPoint() public method

public GetWidthPoint ( ) : float
return float

HasAttributes() public method

Checks the attributes of this Chunk.
public HasAttributes ( ) : bool
return bool

IsContent() public method

public IsContent ( ) : bool
return bool

IsEmpty() public method

Checks is this Chunk is empty.
public IsEmpty ( ) : bool
return bool

IsNestable() public method

public IsNestable ( ) : bool
return bool

Process() public method

Processes the element by adding it (or the different parts) to an IElementListener.
public Process ( IElementListener listener ) : bool
listener IElementListener an IElementListener
return bool

SetAction() public method

Sets an action for this Chunk.
public SetAction ( PdfAction action ) : Chunk
action iTextSharp.text.pdf.PdfAction the action
return Chunk

SetAnchor() public method

Sets an anchor for this Chunk.
public SetAnchor ( Uri url ) : Chunk
url System.Uri the Uri to link to
return Chunk

SetAnchor() public method

Sets an anchor for this Chunk.
public SetAnchor ( string url ) : Chunk
url string the url to link to
return Chunk

SetAnnotation() public method

Sets a generic annotation to this Chunk.
public SetAnnotation ( PdfAnnotation annotation ) : Chunk
annotation iTextSharp.text.pdf.PdfAnnotation the annotation
return Chunk

SetBackground() public method

Sets the color of the background Chunk.
public SetBackground ( BaseColor color ) : Chunk
color BaseColor the color of the background
return Chunk

SetBackground() public method

public SetBackground ( BaseColor color, float extraLeft, float extraBottom, float extraRight, float extraTop ) : Chunk
color BaseColor
extraLeft float
extraBottom float
extraRight float
extraTop float
return Chunk

SetCharacterSpacing() public method

public SetCharacterSpacing ( float charSpace ) : Chunk
charSpace float
return Chunk

SetGenericTag() public method

Sets the generic tag Chunk.
The text for this tag can be retrieved with PdfPageEvent.
public SetGenericTag ( string text ) : Chunk
text string the text for the tag
return Chunk

SetHorizontalScaling() public method

public SetHorizontalScaling ( float scale ) : Chunk
scale float
return Chunk

SetHyphenation() public method

sets the hyphenation engine to this Chunk.
public SetHyphenation ( IHyphenationEvent hyphenation ) : Chunk
hyphenation IHyphenationEvent the hyphenation engine
return Chunk

SetLocalDestination() public method

Sets a local destination for this Chunk.
public SetLocalDestination ( string name ) : Chunk
name string the name for this destination
return Chunk

SetLocalGoto() public method

Sets a local goto for this Chunk.
There must be a local destination matching the name.
public SetLocalGoto ( string name ) : Chunk
name string the name of the destination to go to
return Chunk

SetNewPage() public method

Sets a new page tag.
public SetNewPage ( ) : Chunk
return Chunk

SetRemoteGoto() public method

Sets a goto for a remote destination for this Chunk.
public SetRemoteGoto ( string filename, int page ) : Chunk
filename string the file name of the destination document
page int the page of the destination to go to. First page is 1
return Chunk

SetRemoteGoto() public method

Sets a goto for a remote destination for this Chunk.
public SetRemoteGoto ( string filename, string name ) : Chunk
filename string the file name of the destination document
name string the name of the destination to go to
return Chunk

SetSkew() public method

public SetSkew ( float alpha, float beta ) : Chunk
alpha float
beta float
return Chunk

SetSplitCharacter() public method

Sets the split characters.
public SetSplitCharacter ( ISplitCharacter splitCharacter ) : Chunk
splitCharacter ISplitCharacter the SplitCharacter interface
return Chunk

SetTextRenderMode() public method

public SetTextRenderMode ( int mode, float strokeWidth, BaseColor strokeColor ) : Chunk
mode int
strokeWidth float
strokeColor BaseColor
return Chunk

SetTextRise() public method

Sets the text displacement relative to the baseline. Positive values rise the text, negative values lower the text.
It can be used to implement sub/basescript.
public SetTextRise ( float rise ) : Chunk
rise float the displacement in points
return Chunk

SetUnderline() public method

public SetUnderline ( BaseColor color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int cap ) : Chunk
color BaseColor
thickness float
thicknessMul float
yPosition float
yPositionMul float
cap int
return Chunk

SetUnderline() public method

public SetUnderline ( float thickness, float yPosition ) : Chunk
thickness float
yPosition float
return Chunk

ToString() public method

public ToString ( ) : string
return string

createTabspace() public static method

public static createTabspace ( ) : Chunk
return Chunk

createTabspace() public static method

public static createTabspace ( float spacing ) : Chunk
spacing float
return Chunk

createWhitespace() public static method

public static createWhitespace ( String content ) : Chunk
content String
return Chunk

createWhitespace() public static method

public static createWhitespace ( String content, bool preserve ) : Chunk
content String
preserve bool
return Chunk

isTabspace() public method

public isTabspace ( ) : bool
return bool

isWhitespace() public method

public isWhitespace ( ) : bool
return bool

setLineHeight() public method

public setLineHeight ( float lineheight ) : Chunk
lineheight float
return Chunk

Property Details

LINEHEIGHT public_oe static_oe property

public static String LINEHEIGHT
return String

NEWLINE public_oe static_oe property

This is a Chunk containing a newline.
public static Chunk,iTextSharp.text NEWLINE
return Chunk

NEXTPAGE public_oe static_oe property

public static Chunk,iTextSharp.text NEXTPAGE
return Chunk

attributes protected_oe property

Contains some of the attributes for this Chunk.
protected Dictionary attributes
return object>.Dictionary

content protected_oe property

This is the content of this chunk of text.
protected StringBuilder content
return StringBuilder

font protected_oe property

This is the Font of this chunk of text.
protected Font,iTextSharp.text font
return Font