Package com.ironsoftware.ironpdf.stamp
Class TextStamper
- java.lang.Object
- 
- com.ironsoftware.ironpdf.stamp.Stamper
- 
- com.ironsoftware.ironpdf.stamp.TextStamper
 
 
- 
 public class TextStamper extends 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)
- 
- 
Constructor SummaryConstructors Constructor Description TextStamper()Instantiates a new Text stamper.TextStamper(String text)Instantiates a new Text stamper.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBackgroundColorCode()Gets Background Color.StringgetFontColorCode()Gets Font Color.StringgetFontFamily()Gets font family.intgetFontSize()Gets font size.StringgetText()Gets text to be stamped by the StamperbooleanisBold()Is bold boolean.booleanisItalic()Is italic boolean.booleanisStrikethrough()Is strikethrough boolean.booleanisUnderline()Is underline boolean.booleanisUseGoogleFont()Is use google font boolean.voidsetBackgroundColorCode(String value)Sets Background Color.voidsetBold(boolean value)Sets bold.voidsetFontColor(String value)Sets Font Color.voidsetFontFamily(String value)Sets font family.voidsetFontSize(int value)Sets font size.voidsetItalic(boolean value)Sets italic.voidsetStrikethrough(boolean value)Sets strikethrough.voidsetText(String value)Sets text to be stamped by the StampervoidsetUnderline(boolean value)Sets underline.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, getWaitFor, isStampBehindContent, setHorizontalAlignment, setHorizontalOffset, setHtml, setHyperlink, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setRotation, setScale, setStampBehindContent, setVerticalAlignment, setVerticalOffset, setWaitFor
 
- 
 
- 
- 
- 
Constructor Detail- 
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)
 - 
TextStamperpublic TextStamper(String text) 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 Detail- 
getTextpublic final String getText() Gets text to be stamped by the Stamper- Returns:
- the text
 
 - 
setTextpublic final void setText(String value) Sets 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
 
 - 
getFontFamilypublic final String 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
 
 - 
setFontFamilypublic final void setFontFamily(String value) 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
 
 - 
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
 
 - 
getFontColorCodepublic final String getFontColorCode() Gets Font Color. Default is '#000000' (Black).- Returns:
- the font color
 
 - 
setFontColorpublic final void setFontColor(String value) Sets Font Color. Default is '#000000' (Black).- Parameters:
- value- font color
 
 - 
getBackgroundColorCodepublic final String getBackgroundColorCode() Gets Background Color. Default is '#00FFFFFF' (Transparent).- Returns:
- the font color
 
 - 
setBackgroundColorCodepublic final void setBackgroundColorCode(String value) Sets Background Color. Default is '#00FFFFFF' (Transparent).- Parameters:
- value- font color
 
 
- 
 
-