org.pdfbox.pdmodel.text
Class PDTextState
java.lang.Object
org.pdfbox.pdmodel.text.PDTextState
- Cloneable
public class PDTextState
extends java.lang.Object
implements Cloneable
This class will hold the current state of the text parameters when executing a
content stream.
RENDERING_MODE_ADD_TEXT_TO_PATH_FOR_CLIPPING
public static final int RENDERING_MODE_ADD_TEXT_TO_PATH_FOR_CLIPPING
See PDF Reference 1.5 Table 5.3.
RENDERING_MODE_FILL_TEXT
public static final int RENDERING_MODE_FILL_TEXT
See PDF Reference 1.5 Table 5.3.
RENDERING_MODE_FILL_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING
public static final int RENDERING_MODE_FILL_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING
See PDF Reference 1.5 Table 5.3.
RENDERING_MODE_FILL_THEN_STROKE_TEXT
public static final int RENDERING_MODE_FILL_THEN_STROKE_TEXT
See PDF Reference 1.5 Table 5.3.
RENDERING_MODE_FILL_THEN_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING
public static final int RENDERING_MODE_FILL_THEN_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING
See PDF Reference 1.5 Table 5.3.
RENDERING_MODE_NEITHER_FILL_NOR_STROKE_TEXT
public static final int RENDERING_MODE_NEITHER_FILL_NOR_STROKE_TEXT
See PDF Reference 1.5 Table 5.3.
RENDERING_MODE_STROKE_TEXT
public static final int RENDERING_MODE_STROKE_TEXT
See PDF Reference 1.5 Table 5.3.
RENDERING_MODE_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING
public static final int RENDERING_MODE_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPING
See PDF Reference 1.5 Table 5.3.
clone
public Object clone()
getCharacterSpacing
public float getCharacterSpacing()
Get the value of the characterSpacing.
- The current characterSpacing.
getFont
public PDFont getFont()
Get the value of the font.
getFontSize
public float getFontSize()
Get the value of the fontSize.
getHorizontalScalingPercent
public float getHorizontalScalingPercent()
Get the value of the horizontalScaling. The default is 100. This value
is the percentage value 0-100 and not 0-1. So for mathematical operations
you will probably need to divide by 100 first.
getKnockoutFlag
public boolean getKnockoutFlag()
Get the value of the knockout.
getLeading
public float getLeading()
Get the value of the leading.
getRenderingMode
public int getRenderingMode()
Get the value of the renderingMode.
getRise
public float getRise()
Get the value of the rise.
getWordSpacing
public float getWordSpacing()
Get the value of the wordSpacing.
setCharacterSpacing
public void setCharacterSpacing(float value)
Set the value of the characterSpacing.
value
- The characterSpacing.
setFont
public void setFont(PDFont value)
Set the value of the font.
setFontSize
public void setFontSize(float value)
Set the value of the fontSize.
setHorizontalScalingPercent
public void setHorizontalScalingPercent(float value)
Set the value of the horizontalScaling.
value
- The horizontalScaling.
setKnockoutFlag
public void setKnockoutFlag(boolean value)
Set the value of the knockout.
setLeading
public void setLeading(float value)
Set the value of the leading.
setRenderingMode
public void setRenderingMode(int value)
Set the value of the renderingMode.
value
- The renderingMode.
setRise
public void setRise(float value)
Set the value of the rise.
setWordSpacing
public void setWordSpacing(float value)
Set the value of the wordSpacing.