com.aspose.words
Class Watermark

java.lang.Object
    extended by com.aspose.words.Watermark

public class Watermark 
extends java.lang.Object

Represents class to work with document watermark.

Property Getters/Setters Summary
intgetType()
           Gets the watermark type. The value of the property is WatermarkType integer constant.
 
Method Summary
voidremove()
           Removes the watermark.
voidsetImage(java.awt.image.BufferedImage image)
           Adds Image watermark into the document.
voidsetImage(java.awt.image.BufferedImage image, ImageWatermarkOptions options)
           Adds Image watermark into the document.
voidsetText(java.lang.String text)
           Adds Text watermark into the document.
voidsetText(java.lang.String text, TextWatermarkOptions options)
           Adds Text watermark into the document.
 

Property Getters/Setters Detail

getType

public int getType()
Gets the watermark type. The value of the property is WatermarkType integer constant.

Method Detail

remove

public void remove()
Removes the watermark.

setImage

public void setImage(java.awt.image.BufferedImage image)
             throws java.lang.Exception
Adds Image watermark into the document.
Parameters:
image - Image that is displayed as a watermark.

setImage

public void setImage(java.awt.image.BufferedImage image, ImageWatermarkOptions options)
             throws java.lang.Exception
Adds Image watermark into the document. If ImageWatermarkOptions is null, the watermark will be set with default options.
Parameters:
image - Image that is displayed as a watermark.
options - Defines additional options for the image watermark.

setText

public void setText(java.lang.String text)
Adds Text watermark into the document. The text length must be in the range from 1 to 200 inclusive. The text cannot be null or contain only whitespaces.
Parameters:
text - Text that is displayed as a watermark.

setText

public void setText(java.lang.String text, TextWatermarkOptions options)
Adds Text watermark into the document. The text length must be in the range from 1 to 200 inclusive. The text cannot be null or contain only whitespaces. If TextWatermarkOptions is null, the watermark will be set with default options.
Parameters:
text - Text that is displayed as a watermark.
options - Defines additional options for the text watermark.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.