C# Класс 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.
Наследование: IElement, IAccessibleElement
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
LINEHEIGHT String
NEWLINE Chunk
NEXTPAGE Chunk

Защищенные свойства (Protected)

Свойство Тип Описание
attributes object>.Dictionary
content StringBuilder
font Font

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Chunk ( ) : System
SetAttribute ( string name, Object obj ) : Chunk

Sets an arbitrary attribute.

Описание методов

Append() публичный метод

appends some text to this Chunk.
public Append ( string str ) : StringBuilder
str string a string
Результат StringBuilder

Chunk() публичный метод

public Chunk ( Chunk ck ) : System
ck Chunk
Результат System

Chunk() публичный метод

public Chunk ( IDrawInterface separator ) : System
separator IDrawInterface
Результат System

Chunk() публичный метод

public Chunk ( IDrawInterface separator, bool vertical ) : System
separator IDrawInterface
vertical bool
Результат System

Chunk() публичный метод

public Chunk ( IDrawInterface separator, float tabPosition ) : System
separator IDrawInterface
tabPosition float
Результат System

Chunk() публичный метод

public Chunk ( IDrawInterface separator, float tabPosition, bool newline ) : System
separator IDrawInterface
tabPosition float
newline bool
Результат System

Chunk() публичный метод

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
Результат System

Chunk() публичный метод

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
Результат System

Chunk() публичный метод

public Chunk ( char c ) : System
c char
Результат System

Chunk() публичный метод

public Chunk ( char c, Font font ) : System
c char
font Font
Результат System

Chunk() публичный метод

Constructs a chunk of text with a certain content, without specifying a Font.
public Chunk ( string content ) : System
content string the content
Результат System

Chunk() публичный метод

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
Результат System

GetCharacterSpacing() публичный метод

public GetCharacterSpacing ( ) : float
Результат float

GetHyphenation() публичный метод

public GetHyphenation ( ) : IHyphenationEvent
Результат IHyphenationEvent

GetImage() публичный метод

Returns the image.
public GetImage ( ) : Image
Результат Image

GetTextRise() публичный метод

public GetTextRise ( ) : float
Результат float

GetWidthPoint() публичный метод

public GetWidthPoint ( ) : float
Результат float

HasAttributes() публичный метод

Checks the attributes of this Chunk.
public HasAttributes ( ) : bool
Результат bool

IsContent() публичный метод

public IsContent ( ) : bool
Результат bool

IsEmpty() публичный метод

Checks is this Chunk is empty.
public IsEmpty ( ) : bool
Результат bool

IsNestable() публичный метод

public IsNestable ( ) : bool
Результат bool

Process() публичный метод

Processes the element by adding it (or the different parts) to an IElementListener.
public Process ( IElementListener listener ) : bool
listener IElementListener an IElementListener
Результат bool

SetAction() публичный метод

Sets an action for this Chunk.
public SetAction ( PdfAction action ) : Chunk
action iTextSharp.text.pdf.PdfAction the action
Результат Chunk

SetAnchor() публичный метод

Sets an anchor for this Chunk.
public SetAnchor ( Uri url ) : Chunk
url System.Uri the Uri to link to
Результат Chunk

SetAnchor() публичный метод

Sets an anchor for this Chunk.
public SetAnchor ( string url ) : Chunk
url string the url to link to
Результат Chunk

SetAnnotation() публичный метод

Sets a generic annotation to this Chunk.
public SetAnnotation ( PdfAnnotation annotation ) : Chunk
annotation iTextSharp.text.pdf.PdfAnnotation the annotation
Результат Chunk

SetBackground() публичный метод

Sets the color of the background Chunk.
public SetBackground ( BaseColor color ) : Chunk
color BaseColor the color of the background
Результат Chunk

SetBackground() публичный метод

public SetBackground ( BaseColor color, float extraLeft, float extraBottom, float extraRight, float extraTop ) : Chunk
color BaseColor
extraLeft float
extraBottom float
extraRight float
extraTop float
Результат Chunk

SetCharacterSpacing() публичный метод

public SetCharacterSpacing ( float charSpace ) : Chunk
charSpace float
Результат Chunk

SetGenericTag() публичный метод

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
Результат Chunk

SetHorizontalScaling() публичный метод

public SetHorizontalScaling ( float scale ) : Chunk
scale float
Результат Chunk

SetHyphenation() публичный метод

sets the hyphenation engine to this Chunk.
public SetHyphenation ( IHyphenationEvent hyphenation ) : Chunk
hyphenation IHyphenationEvent the hyphenation engine
Результат Chunk

SetLocalDestination() публичный метод

Sets a local destination for this Chunk.
public SetLocalDestination ( string name ) : Chunk
name string the name for this destination
Результат Chunk

SetLocalGoto() публичный метод

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
Результат Chunk

SetNewPage() публичный метод

Sets a new page tag.
public SetNewPage ( ) : Chunk
Результат Chunk

SetRemoteGoto() публичный метод

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
Результат Chunk

SetRemoteGoto() публичный метод

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
Результат Chunk

SetSkew() публичный метод

public SetSkew ( float alpha, float beta ) : Chunk
alpha float
beta float
Результат Chunk

SetSplitCharacter() публичный метод

Sets the split characters.
public SetSplitCharacter ( ISplitCharacter splitCharacter ) : Chunk
splitCharacter ISplitCharacter the SplitCharacter interface
Результат Chunk

SetTextRenderMode() публичный метод

public SetTextRenderMode ( int mode, float strokeWidth, BaseColor strokeColor ) : Chunk
mode int
strokeWidth float
strokeColor BaseColor
Результат Chunk

SetTextRise() публичный метод

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
Результат Chunk

SetUnderline() публичный метод

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
Результат Chunk

SetUnderline() публичный метод

public SetUnderline ( float thickness, float yPosition ) : Chunk
thickness float
yPosition float
Результат Chunk

ToString() публичный метод

public ToString ( ) : string
Результат string

createTabspace() публичный статический метод

public static createTabspace ( ) : Chunk
Результат Chunk

createTabspace() публичный статический метод

public static createTabspace ( float spacing ) : Chunk
spacing float
Результат Chunk

createWhitespace() публичный статический метод

public static createWhitespace ( String content ) : Chunk
content String
Результат Chunk

createWhitespace() публичный статический метод

public static createWhitespace ( String content, bool preserve ) : Chunk
content String
preserve bool
Результат Chunk

isTabspace() публичный метод

public isTabspace ( ) : bool
Результат bool

isWhitespace() публичный метод

public isWhitespace ( ) : bool
Результат bool

setLineHeight() публичный метод

public setLineHeight ( float lineheight ) : Chunk
lineheight float
Результат Chunk

Описание свойств

LINEHEIGHT публичное статическое свойство

public static String LINEHEIGHT
Результат String

NEWLINE публичное статическое свойство

This is a Chunk containing a newline.
public static Chunk,iTextSharp.text NEWLINE
Результат Chunk

NEXTPAGE публичное статическое свойство

public static Chunk,iTextSharp.text NEXTPAGE
Результат Chunk

attributes защищенное свойство

Contains some of the attributes for this Chunk.
protected Dictionary attributes
Результат object>.Dictionary

content защищенное свойство

This is the content of this chunk of text.
protected StringBuilder content
Результат StringBuilder

font защищенное свойство

This is the Font of this chunk of text.
protected Font,iTextSharp.text font
Результат Font