public final class Watermark
extends java.lang.Object
To learn more, visit the Working with Watermark documentation article.
| Modifier and Type | Method and Description |
|---|---|
int |
getType()
Gets the watermark type.
|
void |
remove()
Removes the watermark.
|
void |
setImage(java.awt.image.BufferedImage image)
Adds Image watermark into the document.
|
void |
setImage(java.awt.image.BufferedImage image,
ImageWatermarkOptions options)
Adds Image watermark into the document.
|
void |
setImage(java.lang.String imagePath,
ImageWatermarkOptions options)
Adds Image watermark into the document.
|
void |
setText(java.lang.String text)
Adds Text watermark into the document.
|
void |
setText(java.lang.String text,
TextWatermarkOptions options)
Adds Text watermark into the document.
|
public final void setText(java.lang.String text)
throws java.lang.Exception
text - Text that is displayed as a watermark.java.lang.IllegalArgumentException - Throws when the text length is out of range or the text contains only whitespaces.com.aspose.words.net.System.ArgumentNullException - Throws when the text is null.java.lang.Exceptionpublic final void setText(java.lang.String text,
TextWatermarkOptions options)
throws java.lang.Exception
text - Text that is displayed as a watermark.options - Defines additional options for the text watermark.java.lang.IllegalArgumentException - Throws when the text length is out of range or the text contain only whitespaces.com.aspose.words.net.System.ArgumentNullException - Throws when the text is null.java.lang.Exceptionpublic final void setImage(java.awt.image.BufferedImage image)
throws java.lang.Exception
image - Image that is displayed as a watermark.com.aspose.words.net.System.ArgumentNullException - Throws when the image is null.java.lang.Exceptionpublic final void setImage(java.awt.image.BufferedImage image,
ImageWatermarkOptions options)
throws java.lang.Exception
image - Image that is displayed as a watermark.options - Defines additional options for the image watermark.com.aspose.words.net.System.ArgumentNullException - Throws when the image is null.java.lang.Exceptionpublic final void setImage(java.lang.String imagePath,
ImageWatermarkOptions options)
throws java.lang.Exception
imagePath - Path to the image file that is displayed as a watermark.options - Defines additional options for the image watermark.com.aspose.words.net.System.ArgumentNullException - Throws when the path is null.java.lang.Exceptionpublic final int getType()
WatermarkType constants.public final void remove()