Class PdfChunk
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
A PdfChunk is the PDF translation of a Chunk . A PdfChunk is a PdfString in a certain PdfFont and Color . @see PdfString @see PdfFont @see iTextSharp.text.Chunk @see iTextSharp.text.Font
public class PdfChunk
- Inheritance
-
PdfChunk
- Inherited Members
Constructors
PdfChunk(string, PdfChunk)
membervariables
public PdfChunk(string str, PdfChunk other)
Parameters
PdfChunk(Chunk, PdfAction)
Constructs a PdfChunk -object.
public PdfChunk(Chunk chunk, PdfAction action)
Parameters
chunk
Chunkthe original Chunk -object
action
PdfActionthe PdfAction if the Chunk comes from an Anchor
Fields
Attributes
Metric attributes. This attributes require the mesurement of characters widths when rendering such as underline.
protected INullValueDictionary<string, object> Attributes
Field Value
BaseFont
protected BaseFont BaseFont
Field Value
NewlineSplit
true if the chunk split was cause by a newline.
protected bool NewlineSplit
Field Value
NoStroke
Non metric attributes. This attributes do not require the mesurement of characters widths when rendering such as Color.
protected INullValueDictionary<string, object> NoStroke
Field Value
OffsetX
The offset in the x direction for the image
protected float OffsetX
Field Value
OffsetY
The offset in the y direction for the image
protected float OffsetY
Field Value
SplitCharacter
protected ISplitCharacter SplitCharacter
Field Value
changeLeading
Indicates if the height and offset of the Image has to be taken into account
protected bool changeLeading
Field Value
encoding
The encoding.
protected string encoding
Field Value
font
The font for this PdfChunk .
protected PdfFont font
Field Value
image
The image in this PdfChunk , if it has one
protected Image image
Field Value
value
The value of this object.
protected string value
Field Value
Properties
ChangeLeading
methods
public bool ChangeLeading { get; }
Property Value
Color
public BaseColor Color { get; }
Property Value
Encoding
public string Encoding { get; }
Property Value
Font
public PdfFont Font { get; }
Property Value
Image
public Image Image { get; }
Property Value
ImageOffsetX
public float ImageOffsetX { get; set; }
Property Value
ImageOffsetY
public float ImageOffsetY { get; set; }
Property Value
Length
Gets the encoding of this string.
public int Length { get; }
Property Value
- int
a string
LengthUtf32
public int LengthUtf32 { get; }
Property Value
TextRise
Gets the text displacement relatiev to the baseline.
public float TextRise { get; }
Property Value
- float
a displacement in points
Value
public string Value { set; }
Property Value
Width
public float Width { get; }
Property Value
Methods
AdjustLeft(float)
Correction for the tab position based on the left starting position. @since 2.1.2
public void AdjustLeft(float newValue)
Parameters
newValue
floatthe new value for the left X.
GetAttribute(string)
public object GetAttribute(string name)
Parameters
name
string
Returns
GetCharWidth(int)
public float GetCharWidth(int c)
Parameters
c
int
Returns
GetUnicodeEquivalent(int)
Gets the Unicode equivalent to a CID. The (inexistent) CID FF00 is translated as '\n'. It has only meaning with CJK fonts with Identity encoding.
public int GetUnicodeEquivalent(int c)
Parameters
c
intthe CID code
Returns
- int
the Unicode equivalent
GetWidthCorrected(float, float)
public float GetWidthCorrected(float charSpacing, float wordSpacing)
Parameters
Returns
GetWord(string, int)
protected static int GetWord(string text, int start)
Parameters
Returns
IsAttribute(string)
public bool IsAttribute(string name)
Parameters
name
string
Returns
IsExtSplitCharacter(int, int, int, char[], PdfChunk[])
public bool IsExtSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)
Parameters
Returns
IsHorizontalSeparator()
Checks if this PdfChunk is a horizontal Separator Chunk. @since 2.1.2
public bool IsHorizontalSeparator()
Returns
- bool
true if this chunk is a horizontal separator.
IsImage()
public bool IsImage()
Returns
IsNewlineSplit()
public bool IsNewlineSplit()
Returns
IsSeparator()
Checks if this PdfChunk is a Separator Chunk. @since 2.1.2
public bool IsSeparator()
Returns
- bool
true if this chunk is a separator.
IsSpecialEncoding()
public bool IsSpecialEncoding()
Returns
IsStroked()
public bool IsStroked()
Returns
IsTab()
Checks if this PdfChunk is a tab Chunk. @since 2.1.2
public bool IsTab()
Returns
- bool
true if this chunk is a separator.
NoPrint(int)
public static bool NoPrint(int c)
Parameters
c
int
Returns
Split(float)
public PdfChunk Split(float width)
Parameters
width
float
Returns
ToString()
Gets the image in the PdfChunk .
public override string ToString()
Returns
- string
the image or null
Trim(string)
public string Trim(string str)
Parameters
str
string
Returns
TrimFirstSpace()
public float TrimFirstSpace()
Returns
TrimLastSpace()
public float TrimLastSpace()
Returns
Truncate(float)
public PdfChunk Truncate(float width)
Parameters
width
float