Package com.ironsoftware.ironpdf.stamp
Class TextStamper
java.lang.Object
com.ironsoftware.ironpdf.stamp.Stamper
com.ironsoftware.ironpdf.stamp.TextStamper
This allows the user to edit an existing PDF by adding some stamped text. A subclass of
Stamper
. Defines a Text PDF Stamper. Can be applied with:
PdfDocument.applyStamp(Stamper, PageSelection)
-
Constructor Summary
ConstructorDescriptionInstantiates a new Text stamper.TextStamper
(String text) Instantiates a new Text stamper. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Gets font family.final int
Gets font size.final String
getText()
Gets text to be stamped by the Stamperfinal boolean
isBold()
Is bold boolean.final boolean
isItalic()
Is italic boolean.final boolean
Is strikethrough boolean.final boolean
Is underline boolean.final boolean
Is use google font boolean.final void
setBold
(boolean value) Sets bold.final void
setFontFamily
(String value) Sets font family.final void
setFontSize
(int value) Sets font size.final void
setItalic
(boolean value) Sets italic.final void
setStrikethrough
(boolean value) Sets strikethrough.final void
Sets text to be stamped by the Stamperfinal void
setUnderline
(boolean value) Sets underline.final void
setUseGoogleFont
(boolean value) Sets use google font.Methods inherited from class com.ironsoftware.ironpdf.stamp.Stamper
getHorizontalAlignment, getHorizontalOffset, getHtml, getHyperlink, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getRotation, getScale, getVerticalAlignment, getVerticalOffset, isStampBehindContent, setHorizontalAlignment, setHorizontalOffset, setHtml, setHyperlink, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setRotation, setScale, setStampBehindContent, setVerticalAlignment, setVerticalOffset
-
Constructor Details
-
TextStamper
public TextStamper()Instantiates a new Text stamper. This allows the user to edit an existing PDF by adding some stamped text. A subclass ofStamper
. Defines a Text PDF Stamper. Can be applied with:PdfDocument.applyStamp(Stamper, PageSelection)
-
TextStamper
Instantiates a new Text stamper. This allows the user to edit an existing PDF by adding some stamped text. A subclass ofStamper
. Defines a Text PDF Stamper. Can be applied with:PdfDocument.applyStamp(Stamper, PageSelection)
- Parameters:
text
- the text to be stamped by the Stamper
-
-
Method Details
-
getText
Gets text to be stamped by the Stamper- Returns:
- the text
-
setText
Sets text to be stamped by the Stamper- Parameters:
value
- the value
-
isBold
public final boolean isBold()Is bold boolean. Determines if the bold font weight is applied.- Returns:
- the boolean
-
setBold
public final void setBold(boolean value) Sets bold. Determines if the bold font weight is applied.- Parameters:
value
- the value
-
isItalic
public final boolean isItalic()Is italic boolean. Determines if the text has the italic font style applied.- Returns:
- the boolean
-
setItalic
public final void setItalic(boolean value) Sets italic. Determines if the text has the italic font style applied.- Parameters:
value
- the value
-
isUnderline
public final boolean isUnderline()Is underline boolean. Determines if the text has an underline font style applied.- Returns:
- the boolean
-
setUnderline
public final void setUnderline(boolean value) Sets underline. Determines if the text has an underline font style applied.- Parameters:
value
- the value
-
isStrikethrough
public final boolean isStrikethrough()Is strikethrough boolean. Determines if the text has a strike-through applied.- Returns:
- the boolean
-
setStrikethrough
public final void setStrikethrough(boolean value) Sets strikethrough. Determines if the text has a strike-through applied.- Parameters:
value
- the value
-
getFontSize
public final int getFontSize()Gets font size. Font size in px.- Returns:
- the font size
-
setFontSize
public final void setFontSize(int value) Sets font size. Font size in px.- Parameters:
value
- the value
-
getFontFamily
Gets font family. Font family name for the text. Note: If using a web font from font.google then you must setsetUseGoogleFont(boolean)
property of this TextStamper to true.- Returns:
- the font family
-
setFontFamily
Sets font family. Font family name for the text. Note: If using a web font from font.google then you must setsetUseGoogleFont(boolean)
property of this TextStamper to true.- Parameters:
value
- the value
-
isUseGoogleFont
public final boolean isUseGoogleFont()Is use google font boolean. Working withsetFontFamily(String)
- Returns:
- the boolean
-
setUseGoogleFont
public final void setUseGoogleFont(boolean value) Sets use google font.setFontFamily(String)
- Parameters:
value
- the value
-