Class TextStamper

    • Constructor Detail

      • TextStamper

        public TextStamper​(String text)
        Instantiates a new Text stamper. 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)
        Parameters:
        text - the text to be stamped by the Stamper
    • Method Detail

      • getText

        public final String getText()
        Gets text to be stamped by the Stamper
        Returns:
        the text
      • setText

        public final void setText​(String value)
        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

        public final String getFontFamily()
        Gets font family. Font family name for the text.
        Note: If using a web font from font.google then you must set setUseGoogleFont(boolean) property of this TextStamper to true.
        Returns:
        the font family
      • setFontFamily

        public 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 set setUseGoogleFont(boolean) property of this TextStamper to true.
        Parameters:
        value - the value
      • isUseGoogleFont

        public final boolean isUseGoogleFont()
        Is use google font boolean. Working with setFontFamily(String)
        Returns:
        the boolean
      • setUseGoogleFont

        public final void setUseGoogleFont​(boolean value)
        Sets use google font. setFontFamily(String)
        Parameters:
        value - the value
      • getFontColorCode

        public final String getFontColorCode()
        Gets Font Color. Default is '#000000' (Black).
        Returns:
        the font color
      • setFontColor

        public final void setFontColor​(String value)
        Sets Font Color. Default is '#000000' (Black).
        Parameters:
        value - font color
      • getBackgroundColorCode

        public final String getBackgroundColorCode()
        Gets Background Color. Default is '#00FFFFFF' (Transparent).
        Returns:
        the font color
      • setBackgroundColorCode

        public final void setBackgroundColorCode​(String value)
        Sets Background Color. Default is '#00FFFFFF' (Transparent).
        Parameters:
        value - font color