com.groupdocs.viewer.domain

Class Watermark



  • public class Watermark
    extends Object

    Represents a container for the page watermark properties.

    • Constructor Detail

      • Watermark

        public Watermark(String text)

        Initializes a new instance of the Watermark class.

        Parameters:
        text - The text.
      • Watermark

        public Watermark(String text,
                 Color color,
                 int position,
                 float width)

        Initializes a new instance of the Watermark class.

        Parameters:
        text - The text.
        color - The color.
        position - The position. Possible options are in WatermarkPosition.
        width - The width.
    • Method Detail

      • getColor

        public Color getColor()

        The watermark text color.

        Returns:
        The watermark text color.
      • getFontName

        public String getFontName()

        The watermark text font name e.g. "MS Gothic" or "Verdana". In case you want to specify custom font please add path to the font directories list in ViewerConfig class.

        Returns:
        The watermark text font name.
      • getPosition

        public int getPosition()

        The watermark position.

        Returns:
        The watermark position. Possible options are in WatermarkPosition.
      • getText

        public String getText()

        The watermark text.

        Returns:
        The watermark text.
      • getWidth

        public float getWidth()

        The watermark width.

        Returns:
        The watermark width.
      • setColor

        public void setColor(Color value)
        Sets watermark text color.
        Parameters:
        value - The watermark text color.
      • setFontName

        public void setFontName(String value)

        The watermark text font name e.g. "MS Gothic" or "Verdana". In case you want to specify custom font please add path to the font directories list in ViewerConfig class.

        Parameters:
        value - The watermark text font name.
      • setPosition

        public void setPosition(int value)

        The watermark position.

        Parameters:
        value - The watermark position. Possible options are in WatermarkPosition.
      • setText

        public void setText(String value)

        The watermark text.

        Parameters:
        value - The watermark text.
      • setWidth

        public void setWidth(float value)

        The watermark width.

        Parameters:
        value - The watermark width.