|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.itextpdf.text.pdf.PdfChunk
public class PdfChunk
A PdfChunk
is the PDF translation of a Chunk
.
A PdfChunk
is a PdfString
in a certain
PdfFont
and BaseColor
.
PdfString
,
Chunk
,
Font
Field Summary | |
---|---|
protected IAccessibleElement |
accessibleElement
|
protected HashMap<String,Object> |
attributes
Metric attributes. |
protected BaseFont |
baseFont
|
protected boolean |
changeLeading
Indicates if the height and offset of the Image has to be taken into account |
protected String |
encoding
The encoding. |
protected com.itextpdf.text.pdf.PdfFont |
font
The font for this PdfChunk . |
protected Image |
image
The image in this PdfChunk , if it has one |
protected float |
imageScalePercentage
|
protected float |
leading
The leading that can overrule the existing leading. |
protected boolean |
newlineSplit
true if the chunk split was cause by a newline. |
protected HashMap<String,Object> |
noStroke
Non metric attributes. |
protected float |
offsetX
The offset in the x direction for the image |
protected float |
offsetY
The offset in the y direction for the image |
protected SplitCharacter |
splitCharacter
|
protected String |
value
The value of this object. |
Method Summary | |
---|---|
boolean |
changeLeading()
|
float |
getImageScalePercentage()
Returns a scalePercentage in case the image needs to be scaled. |
float |
getLeading()
|
float |
getTextRise()
Gets the text displacement relative to the baseline. |
int |
getUnicodeEquivalent(int c)
Gets the Unicode equivalent to a CID. |
float |
getWidthCorrected(float charSpacing,
float wordSpacing)
Gets the width of the PdfChunk taking into account the
extra character and word spacing. |
protected int |
getWord(String text,
int start)
|
boolean |
isNewlineSplit()
Checks if the PdfChunk split was caused by a newline. |
static boolean |
noPrint(int c)
|
void |
setImageScalePercentage(float imageScalePercentage)
Sets a scale percentage in case the image needs to be scaled. |
String |
toString()
|
float |
trimFirstSpace()
|
float |
trimLastSpace()
Trims the last space. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String value
protected String encoding
protected com.itextpdf.text.pdf.PdfFont font
PdfChunk
.
protected BaseFont baseFont
protected SplitCharacter splitCharacter
protected HashMap<String,Object> attributes
This attributes require the measurement of characters widths when rendering such as underline.
protected HashMap<String,Object> noStroke
This attributes do not require the measurement of characters widths when rendering such as BaseColor.
protected boolean newlineSplit
true
if the chunk split was cause by a newline.
protected Image image
PdfChunk
, if it has one
protected float imageScalePercentage
protected float offsetX
protected float offsetY
protected boolean changeLeading
protected float leading
protected IAccessibleElement accessibleElement
Method Detail |
---|
public int getUnicodeEquivalent(int c)
c
- the CID code
protected int getWord(String text, int start)
public boolean isNewlineSplit()
PdfChunk
split was caused by a newline.
true
if the PdfChunk
split was caused by a newline.public float getWidthCorrected(float charSpacing, float wordSpacing)
PdfChunk
taking into account the
extra character and word spacing.
charSpacing
- the extra character spacingwordSpacing
- the extra word spacing
public float getTextRise()
public float trimLastSpace()
public float trimFirstSpace()
public float getImageScalePercentage()
public void setImageScalePercentage(float imageScalePercentage)
imageScalePercentage
- the imageScalePercentage to setpublic String toString()
toString
in class Object
Object.toString()
public boolean changeLeading()
public float getLeading()
public static boolean noPrint(int c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |