Class PDTextState
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.state.PDTextState
- All Implemented Interfaces:
Cloneable
This class will hold the current state of the text parameters when executing a
content stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float
private PDFont
private float
private float
private boolean
private float
private RenderingMode
private float
private float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
float
Get the value of the characterSpacing.getFont()
Get the value of the font.float
Get the value of the fontSize.float
Get the value of the horizontalScaling.boolean
Get the value of the knockout.float
Get the value of the leading.Get the value of the renderingMode.float
getRise()
Get the value of the rise.float
Get the value of the wordSpacing.void
setCharacterSpacing
(float value) Set the value of the characterSpacing.void
Set the value of the font.void
setFontSize
(float value) Set the value of the fontSize.void
setHorizontalScaling
(float value) Set the value of the horizontalScaling.void
setKnockoutFlag
(boolean value) Set the value of the knockout.void
setLeading
(float value) Set the value of the leading.void
setRenderingMode
(RenderingMode renderingMode) Set the value of the renderingMode.void
setRise
(float value) Set the value of the rise.void
setWordSpacing
(float value) Set the value of the wordSpacing.
-
Field Details
-
characterSpacing
private float characterSpacing -
wordSpacing
private float wordSpacing -
horizontalScaling
private float horizontalScaling -
leading
private float leading -
font
-
fontSize
private float fontSize -
renderingMode
-
rise
private float rise -
knockout
private boolean knockout
-
-
Constructor Details
-
PDTextState
public PDTextState()
-
-
Method Details
-
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.
-
getHorizontalScaling
public float getHorizontalScaling()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.
-
setHorizontalScaling
public void setHorizontalScaling(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
Get the value of the font.- Returns:
- The font.
-
setFont
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
Get the value of the renderingMode.- Returns:
- The renderingMode.
-
setRenderingMode
Set the value of the renderingMode.- Parameters:
renderingMode
- 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
-