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 SummaryConstructorsConstructorDescriptionInstantiates a new Text stamper.TextStamper(String text) Instantiates a new Text stamper.
- 
Method SummaryModifier and TypeMethodDescriptionfinal StringGets font family.final intGets font size.final StringgetText()Gets text to be stamped by the Stamperfinal booleanisBold()Is bold boolean.final booleanisItalic()Is italic boolean.final booleanIs strikethrough boolean.final booleanIs underline boolean.final booleanIs use google font boolean.final voidsetBold(boolean value) Sets bold.final voidsetFontFamily(String value) Sets font family.final voidsetFontSize(int value) Sets font size.final voidsetItalic(boolean value) Sets italic.final voidsetStrikethrough(boolean value) Sets strikethrough.final voidSets text to be stamped by the Stamperfinal voidsetUnderline(boolean value) Sets underline.final voidsetUseGoogleFont(boolean value) Sets use google font.Methods inherited from class com.ironsoftware.ironpdf.stamp.StampergetHorizontalAlignment, 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- 
TextStamperpublic 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)
- 
TextStamperInstantiates 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- 
getTextGets text to be stamped by the Stamper- Returns:
- the text
 
- 
setTextSets text to be stamped by the Stamper- Parameters:
- value- the value
 
- 
isBoldpublic final boolean isBold()Is bold boolean. Determines if the bold font weight is applied.- Returns:
- the boolean
 
- 
setBoldpublic final void setBold(boolean value) Sets bold. Determines if the bold font weight is applied.- Parameters:
- value- the value
 
- 
isItalicpublic final boolean isItalic()Is italic boolean. Determines if the text has the italic font style applied.- Returns:
- the boolean
 
- 
setItalicpublic final void setItalic(boolean value) Sets italic. Determines if the text has the italic font style applied.- Parameters:
- value- the value
 
- 
isUnderlinepublic final boolean isUnderline()Is underline boolean. Determines if the text has an underline font style applied.- Returns:
- the boolean
 
- 
setUnderlinepublic final void setUnderline(boolean value) Sets underline. Determines if the text has an underline font style applied.- Parameters:
- value- the value
 
- 
isStrikethroughpublic final boolean isStrikethrough()Is strikethrough boolean. Determines if the text has a strike-through applied.- Returns:
- the boolean
 
- 
setStrikethroughpublic final void setStrikethrough(boolean value) Sets strikethrough. Determines if the text has a strike-through applied.- Parameters:
- value- the value
 
- 
getFontSizepublic final int getFontSize()Gets font size. Font size in px.- Returns:
- the font size
 
- 
setFontSizepublic final void setFontSize(int value) Sets font size. Font size in px.- Parameters:
- value- the value
 
- 
getFontFamilyGets 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
 
- 
setFontFamilySets 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
 
- 
isUseGoogleFontpublic final boolean isUseGoogleFont()Is use google font boolean. Working withsetFontFamily(String)- Returns:
- the boolean
 
- 
setUseGoogleFontpublic final void setUseGoogleFont(boolean value) Sets use google font.setFontFamily(String)- Parameters:
- value- the value
 
 
-