Package com.lowagie.text.pdf
Class PdfChunk
java.lang.Object
com.lowagie.text.pdf.PdfChunk
Deprecated.
A
PdfChunk is the PDF translation of a Chunk.
A PdfChunk is a PdfString in a certain
PdfFont and Color.
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.Metric attributes.protected BaseFontDeprecated.protected booleanDeprecated.Indicates if the height and offset of the Image has to be taken into accountprotected StringDeprecated.The encoding.protected PdfFontDeprecated.The font for thisPdfChunk.protected ImageDeprecated.The image in thisPdfChunk, if it has oneprivate static final floatDeprecated.Deprecated.The allowed attributes in variableattributes.Deprecated.The allowed attributes in variablenoStroke.protected booleanDeprecated.trueif the chunk split was cause by a newline.Deprecated.Non metric attributes.protected floatDeprecated.The offset in the x direction for the imageprotected floatDeprecated.The offset in the y direction for the imageprivate static final char[]Deprecated.protected SplitCharacterDeprecated.private static final PdfChunk[]Deprecated.protected StringDeprecated.The value of this object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidadjustLeft(float newValue) Deprecated.Correction for the tab position based on the left starting position.booleanDeprecated.(package private) Colorcolor()Deprecated.Returns the color of thisChunk.(package private) PdfFontfont()Deprecated.Returns the font of thisChunk.(package private) ObjectgetAttribute(String name) Deprecated.Gets an attribute.(package private) floatgetCharWidth(int c) Deprecated.(package private) StringDeprecated.Gets the encoding of this string.(package private) ImagegetImage()Deprecated.Gets the image in thePdfChunk.(package private) floatDeprecated.Gets the image offset in the x direction(package private) floatDeprecated.Gets the image offset in the y directionfloatDeprecated.Gets the text displacement relative to the baseline.intgetUnicodeEquivalent(int c) Deprecated.Gets the Unicode equivalent to a CID.floatgetWidthCorrected(float charSpacing, float wordSpacing) Deprecated.Gets the width of thePdfChunktaking into account the extra character and word spacing.protected intDeprecated.(package private) booleanisAttribute(String name) Deprecated.Checks if the attribute exists.(package private) booleanisExtSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck) Deprecated.(package private) booleanDeprecated.Checks if thisPdfChunkis a horizontal Separator Chunk.(package private) booleanisImage()Deprecated.Checks if there is an image in thePdfChunk.booleanDeprecated.Checks if thePdfChunksplit was caused by a newline.(package private) booleanDeprecated.Checks if thisPdfChunkis a Separator Chunk.(package private) booleanDeprecated.Tells you if this string is in Chinese, Japanese, Korean or Identity-H.(package private) booleanDeprecated.Checks if thisPdfChunkneeds some special metrics handling.(package private) booleanisTab()Deprecated.Checks if thisPdfChunkis a tab Chunk.(package private) booleanDeprecated.Checks if thisPdfChunkis a vertical Separator Chunk.(package private) intlength()Deprecated.(package private) intDeprecated.static booleannoPrint(int c) Deprecated.(package private) voidsetImageOffsetX(float offsetX) Deprecated.Sets the image offset in the x direction(package private) voidsetImageOffsetY(float offsetY) Deprecated.Sets the image offset in the y direction(package private) voidDeprecated.sets the value.(package private) PdfChunksplit(float width) Deprecated.Splits thisPdfChunkif it's too long for the given width.toString()Deprecated.(package private) StringDeprecated.Removes all the ' ' and '-'-characters on the right of aString.floatDeprecated.floatDeprecated.Trims the last space.(package private) PdfChunktruncate(float width) Deprecated.Truncates thisPdfChunkif it's too long for the given width.(package private) floatwidth()Deprecated.Returns the width of thisPdfChunk.
-
Field Details
-
singleSpace
private static final char[] singleSpaceDeprecated. -
thisChunk
Deprecated. -
ITALIC_ANGLE
private static final float ITALIC_ANGLEDeprecated.- See Also:
-
keysAttributes
Deprecated.The allowed attributes in variableattributes. -
keysNoStroke
Deprecated.The allowed attributes in variablenoStroke. -
value
Deprecated.The value of this object. -
encoding
Deprecated.The encoding. -
font
Deprecated.The font for thisPdfChunk. -
baseFont
Deprecated. -
splitCharacter
Deprecated. -
attributes
Deprecated.Metric attributes.This attributes require the measurement of characters widths when rendering such as underline.
-
noStroke
Deprecated.Non metric attributes.This attributes do not require the measurement of characters widths when rendering such as Color.
-
newlineSplit
protected boolean newlineSplitDeprecated.trueif the chunk split was cause by a newline. -
image
Deprecated.The image in thisPdfChunk, if it has one -
offsetX
protected float offsetXDeprecated.The offset in the x direction for the image -
offsetY
protected float offsetYDeprecated.The offset in the y direction for the image -
changeLeading
protected boolean changeLeadingDeprecated.Indicates if the height and offset of the Image has to be taken into account
-
-
Constructor Details
-
PdfChunk
Deprecated.Constructs aPdfChunk-object.- Parameters:
string- the content of thePdfChunk-objectother- Chunk with the same style you want for the new Chunk
-
PdfChunk
Deprecated.Constructs aPdfChunk-object.- Parameters:
chunk- the originalChunk-objectaction- thePdfActionif theChunkcomes from anAnchor
-
-
Method Details
-
noPrint
public static boolean noPrint(int c) Deprecated. -
getUnicodeEquivalent
public int getUnicodeEquivalent(int c) Deprecated.Gets the Unicode equivalent to a CID. The (nonexistent) CIDFF00is translated as '\n'. It has only meaning with CJK fonts with Identity encoding.- Parameters:
c- the CID code- Returns:
- the Unicode equivalent
-
getWord
Deprecated. -
split
Deprecated.Splits thisPdfChunkif it's too long for the given width.Returns null if the
PdfChunkwasn't truncated.- Parameters:
width- a given width- Returns:
- the
PdfChunkthat doesn't fit into the width.
-
truncate
Deprecated.Truncates thisPdfChunkif it's too long for the given width.Returns null if the
PdfChunkwasn't truncated.- Parameters:
width- a given width- Returns:
- the
PdfChunkthat doesn't fit into the width.
-
font
PdfFont font()Deprecated.Returns the font of thisChunk.- Returns:
- a
PdfFont
-
color
Color color()Deprecated.Returns the color of thisChunk.- Returns:
- a
Color
-
width
float width()Deprecated.Returns the width of thisPdfChunk.- Returns:
- a width
-
isNewlineSplit
public boolean isNewlineSplit()Deprecated.Checks if thePdfChunksplit was caused by a newline.- Returns:
trueif thePdfChunksplit was caused by a newline.
-
getWidthCorrected
public float getWidthCorrected(float charSpacing, float wordSpacing) Deprecated.Gets the width of thePdfChunktaking into account the extra character and word spacing.- Parameters:
charSpacing- the extra character spacingwordSpacing- the extra word spacing- Returns:
- the calculated width
-
getTextRise
public float getTextRise()Deprecated.Gets the text displacement relative to the baseline.- Returns:
- a displacement in points
-
trimLastSpace
public float trimLastSpace()Deprecated.Trims the last space.- Returns:
- the width of the space trimmed, otherwise 0
-
trimFirstSpace
public float trimFirstSpace()Deprecated. -
getAttribute
Deprecated.Gets an attribute. The search is made inattributesandnoStroke.- Parameters:
name- the attribute key- Returns:
- the attribute value or null if not found
-
isAttribute
Deprecated.Checks if the attribute exists.- Parameters:
name- the attribute key- Returns:
trueif the attribute exists
-
isStroked
boolean isStroked()Deprecated.Checks if thisPdfChunkneeds some special metrics handling.- Returns:
trueif thisPdfChunkneeds some special metrics handling.
-
isSeparator
boolean isSeparator()Deprecated.Checks if thisPdfChunkis a Separator Chunk.- Returns:
- true if this chunk is a separator.
- Since:
- 2.1.2
-
isHorizontalSeparator
boolean isHorizontalSeparator()Deprecated.Checks if thisPdfChunkis a horizontal Separator Chunk.- Returns:
- true if this chunk is a horizontal separator.
- Since:
- 2.1.2
-
isVerticalSeparator
boolean isVerticalSeparator()Deprecated.Checks if thisPdfChunkis a vertical Separator Chunk.- Returns:
- true if this chunk is a vertical separator.
- Since:
- OpenPDF
-
isTab
boolean isTab()Deprecated.Checks if thisPdfChunkis a tab Chunk.- Returns:
- true if this chunk is a separator.
- Since:
- 2.1.2
-
adjustLeft
void adjustLeft(float newValue) Deprecated.Correction for the tab position based on the left starting position.- Parameters:
newValue- the new value for the left X.- Since:
- 2.1.2
-
isImage
boolean isImage()Deprecated.Checks if there is an image in thePdfChunk.- Returns:
trueif an image is present
-
getImage
Image getImage()Deprecated.Gets the image in thePdfChunk.- Returns:
- the image or
null
-
getImageOffsetX
float getImageOffsetX()Deprecated.Gets the image offset in the x direction- Returns:
- the image offset in the x direction
-
setImageOffsetX
void setImageOffsetX(float offsetX) Deprecated.Sets the image offset in the x direction- Parameters:
offsetX- the image offset in the x direction
-
getImageOffsetY
float getImageOffsetY()Deprecated.Gets the image offset in the y direction- Returns:
- Gets the image offset in the y direction
-
setImageOffsetY
void setImageOffsetY(float offsetY) Deprecated.Sets the image offset in the y direction- Parameters:
offsetY- the image offset in the y direction
-
setValue
Deprecated.sets the value.- Parameters:
value- content of the Chunk
-
toString
Deprecated. -
isSpecialEncoding
boolean isSpecialEncoding()Deprecated.Tells you if this string is in Chinese, Japanese, Korean or Identity-H.- Returns:
- true if the Chunk has a special encoding
-
getEncoding
String getEncoding()Deprecated.Gets the encoding of this string.- Returns:
- a
String
-
length
int length()Deprecated. -
lengthUtf32
int lengthUtf32()Deprecated. -
isExtSplitCharacter
Deprecated. -
trim
Deprecated.Removes all the ' ' and '-'-characters on the right of aString.- Parameters:
string- theStringthat has to be trimmed.- Returns:
- the trimmed
String
-
changeLeading
public boolean changeLeading()Deprecated. -
getCharWidth
float getCharWidth(int c) Deprecated.
-