com.groupdocs.viewer.domain

Class Watermark



  • public class Watermark
    extends Object

    Represents a container for the page watermark properties.

    Version:
    17.5.0
    Author:
    GroupDocs.Viewer Team
    • 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.
        width - The width.
    • Method Detail

      • getText

        public String getText()

        The watermark text.

        Returns:
        the text
      • setText

        public void setText(String value)

        The watermark text.

        Parameters:
        value - the value
      • getColor

        public Color getColor()

        The watermark text color.

        Returns:
        the color
      • setColor

        public void setColor(Color value)
        Sets color.
        Parameters:
        value - the value
      • getPosition

        public int getPosition()

        The watermark text color.

        Returns:
        the position
      • setPosition

        public void setPosition(int value)

        The watermark position.

        Parameters:
        value - the value
      • getWidth

        public float getWidth()

        The watermark width.

        Returns:
        the width
      • setWidth

        public void setWidth(float value)

        The watermark width.

        Parameters:
        value - the value
      • 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:
        a String object.
      • 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 - a String object.