Package org.apache.pdfbox.pdmodel.text
Class PDTextState
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.text.PDTextState
-
- All Implemented Interfaces:
java.lang.Cloneable
public class PDTextState extends java.lang.Object implements java.lang.CloneableThis class will hold the current state of the text parameters when executing a content stream.- Version:
- $Revision: 1.4 $
- Author:
- Ben Litchfield
-
-
Field Summary
Fields Modifier and Type Field Description static intRENDERING_MODE_ADD_TEXT_TO_PATH_FOR_CLIPPINGSee PDF Reference 1.5 Table 5.3.static intRENDERING_MODE_FILL_TEXTSee PDF Reference 1.5 Table 5.3.static intRENDERING_MODE_FILL_TEXT_AND_ADD_TO_PATH_FOR_CLIPPINGSee PDF Reference 1.5 Table 5.3.static intRENDERING_MODE_FILL_THEN_STROKE_TEXTSee PDF Reference 1.5 Table 5.3.static intRENDERING_MODE_FILL_THEN_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPINGSee PDF Reference 1.5 Table 5.3.static intRENDERING_MODE_NEITHER_FILL_NOR_STROKE_TEXTSee PDF Reference 1.5 Table 5.3.static intRENDERING_MODE_STROKE_TEXTSee PDF Reference 1.5 Table 5.3.static intRENDERING_MODE_STROKE_TEXT_AND_ADD_TO_PATH_FOR_CLIPPINGSee PDF Reference 1.5 Table 5.3.
-
Constructor Summary
Constructors Constructor Description PDTextState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()floatgetCharacterSpacing()Get the value of the characterSpacing.PDFontgetFont()Get the value of the font.floatgetFontSize()Get the value of the fontSize.floatgetHorizontalScalingPercent()Get the value of the horizontalScaling.booleangetKnockoutFlag()Get the value of the knockout.floatgetLeading()Get the value of the leading.intgetRenderingMode()Get the value of the renderingMode.floatgetRise()Get the value of the rise.floatgetWordSpacing()Get the value of the wordSpacing.voidsetCharacterSpacing(float value)Set the value of the characterSpacing.voidsetFont(PDFont value)Set the value of the font.voidsetFontSize(float value)Set the value of the fontSize.voidsetHorizontalScalingPercent(float value)Set the value of the horizontalScaling.voidsetKnockoutFlag(boolean value)Set the value of the knockout.voidsetLeading(float value)Set the value of the leading.voidsetRenderingMode(int value)Set the value of the renderingMode.voidsetRise(float value)Set the value of the rise.voidsetWordSpacing(float value)Set the value of the wordSpacing.
-
-
-
Field Detail
-
RENDERING_MODE_FILL_TEXT
public static final int RENDERING_MODE_FILL_TEXT
See PDF Reference 1.5 Table 5.3.- See Also:
- Constant Field Values
-
RENDERING_MODE_STROKE_TEXT
public static final int RENDERING_MODE_STROKE_TEXT
See PDF Reference 1.5 Table 5.3.- See Also:
- Constant Field Values
-
RENDERING_MODE_FILL_THEN_STROKE_TEXT
public static final int RENDERING_MODE_FILL_THEN_STROKE_TEXT
See PDF Reference 1.5 Table 5.3.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
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.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCharacterSpacing
public float getCharacterSpacing()
Get the value of the characterSpacing.- Returns:
- The current characterSpacing.
-
setCharacterSpacing
public void setCharacterSpacing(float value)
Set the value of the characterSpacing.- Parameters:
value- The characterSpacing.
-
getWordSpacing
public float getWordSpacing()
Get the value of the wordSpacing.- Returns:
- The wordSpacing.
-
setWordSpacing
public void setWordSpacing(float value)
Set the value of the wordSpacing.- Parameters:
value- The wordSpacing.
-
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.- Returns:
- The horizontalScaling.
-
setHorizontalScalingPercent
public void setHorizontalScalingPercent(float value)
Set the value of the horizontalScaling.- Parameters:
value- The horizontalScaling.
-
getLeading
public float getLeading()
Get the value of the leading.- Returns:
- The leading.
-
setLeading
public void setLeading(float value)
Set the value of the leading.- Parameters:
value- The leading.
-
getFont
public PDFont getFont()
Get the value of the font.- Returns:
- The font.
-
setFont
public void setFont(PDFont value)
Set the value of the font.- Parameters:
value- The font.
-
getFontSize
public float getFontSize()
Get the value of the fontSize.- Returns:
- The fontSize.
-
setFontSize
public void setFontSize(float value)
Set the value of the fontSize.- Parameters:
value- The fontSize.
-
getRenderingMode
public int getRenderingMode()
Get the value of the renderingMode.- Returns:
- The renderingMode.
-
setRenderingMode
public void setRenderingMode(int value)
Set the value of the renderingMode.- Parameters:
value- The renderingMode.
-
getRise
public float getRise()
Get the value of the rise.- Returns:
- The rise.
-
setRise
public void setRise(float value)
Set the value of the rise.- Parameters:
value- The rise.
-
getKnockoutFlag
public boolean getKnockoutFlag()
Get the value of the knockout.- Returns:
- The knockout.
-
setKnockoutFlag
public void setKnockoutFlag(boolean value)
Set the value of the knockout.- Parameters:
value- The knockout.
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
-