public abstract class Watermark extends Object
Learn more
More details about watermark properties: Adding text watermarks.
| Constructor and Description |
|---|
Watermark() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyPropertiesValues(Watermark source,
Watermark destination) |
abstract WatermarkGeometry |
createGeometry(ContentPartGeometry parent) |
abstract Watermark |
deepClone() |
boolean |
getConsiderParentMargins()
Gets a value indicating whether the watermark size and coordinates are calculated
considering parent margins.
|
double |
getHeight()
Gets the desired height of this
. |
int |
getHorizontalAlignment()
Gets the horizontal alignment of this
. |
Margins |
getMargins()
Gets the margin settings of this
. |
double |
getOpacity()
Gets or sets the opacity of this
. |
PagesSetup |
getPagesSetup()
Gets the pages setup settings of this
. |
double |
getRotateAngle()
Gets the rotate angle of this
in degrees. |
double |
getScaleFactor()
Gets a value that defines how watermark size depends on parent size.
|
abstract SizeD |
getSize() |
int |
getSizingType()
Gets a value specifying a way watermark should be sized.
|
TileOptions |
getTileOptions() |
double |
getTransparency() |
int |
getVerticalAlignment()
Gets the vertical alignment of this
. |
double |
getWidth()
Gets the desired width of this
. |
double |
getX()
Gets the x-coordinate of this
. |
double |
getY()
Gets the y-coordinate of this
. |
boolean |
hasSameValues(Watermark watermark) |
boolean |
isBackground()
Gets a value indicating whether the watermark should be placed at background.
|
abstract boolean |
isImageWatermark() |
abstract boolean |
isTextWatermark() |
void |
setBackground(boolean value)
Sets a value indicating whether the watermark should be placed at background.
|
void |
setConsiderParentMargins(boolean value)
Sets a value indicating whether the watermark size and coordinates are calculated
considering parent margins.
|
void |
setHeight(double value)
Sets the desired height of this
. |
void |
setHorizontalAlignment(int value)
Sets the horizontal alignment of this
. |
void |
setMargins(Margins value)
Sets the margin settings of this
. |
void |
setOpacity(double value)
Gets or sets the opacity of this
. |
void |
setPagesSetup(PagesSetup value)
Sets the pages setup settings of this
. |
void |
setRotateAngle(double value)
Sets the rotate angle of this
in degrees. |
void |
setScaleFactor(double value)
Sets a value that defines how watermark size depends on parent size.
|
void |
setSizingType(int value)
Sets a value specifying a way watermark should be sized.
|
void |
setTileOptions(TileOptions tileOptions) |
void |
setVerticalAlignment(int value)
Sets the vertical alignment of this
. |
void |
setWidth(double value)
Sets the desired width of this
. |
void |
setX(double value)
Sets the x-coordinate of this
. |
void |
setY(double value)
Sets the y-coordinate of this
. |
public static void copyPropertiesValues(Watermark source, Watermark destination)
public abstract WatermarkGeometry createGeometry(ContentPartGeometry parent)
public abstract Watermark deepClone()
public final boolean getConsiderParentMargins()
Gets a value indicating whether the watermark size and coordinates are calculated considering parent margins.
public final double getHeight()
Watermark.Watermark.public final int getHorizontalAlignment()
Watermark.
Default value is .HorizontalAlignment.None
HorizontalAlignment
of this Watermark.public final Margins getMargins()
Watermark.Watermark.public final double getOpacity()
Watermark.
The value of opacity should be between 0 and 1. The default value is 1.
Watermark.public final PagesSetup getPagesSetup()
Watermark.Watermark.public final double getRotateAngle()
Watermark in degrees.Watermark in degrees.public final double getScaleFactor()
The value must be between 0 and 1.
Watermark.public abstract SizeD getSize()
public final int getSizingType()
Gets a value specifying a way watermark should be sized.
public TileOptions getTileOptions()
public final double getTransparency()
public final int getVerticalAlignment()
Watermark.
Default value is .VerticalAlignment.None
VerticalAlignment
of this Watermark.public final double getWidth()
Watermark.Watermark.public final double getX()
Watermark.Watermark.public final double getY()
Watermark.Watermark.public boolean hasSameValues(Watermark watermark)
public final boolean isBackground()
Gets a value indicating whether the watermark should be placed at background.
public abstract boolean isImageWatermark()
public abstract boolean isTextWatermark()
public final void setBackground(boolean value)
Sets a value indicating whether the watermark should be placed at background.
value - If the value is true, the watermark will be placed at the bottom.
By default, the value is false, the watermark will be placed at the top.public final void setConsiderParentMargins(boolean value)
Sets a value indicating whether the watermark size and coordinates are calculated considering parent margins.
value - If the value is true, watermark size and coordinates are calculated considering parent margins.
By default, the value is false, parent margins are ignored.public final void setHeight(double value)
Watermark.
Setting this property will also change the value of
property to getSizingType().SizingType.Absolute
value - The desired height of this Watermark.public final void setHorizontalAlignment(int value)
Watermark.
Default value is .HorizontalAlignment.None
value - The HorizontalAlignment
of this Watermark.public final void setMargins(Margins value)
Watermark.value - The margin settings of this Watermark.public final void setOpacity(double value)
Watermark.
The value of opacity should be between 0 and 1. The default value is 1.
value - The opacity of this Watermark.public final void setPagesSetup(PagesSetup value)
Watermark.value - The pages setup settings of this Watermark.public final void setRotateAngle(double value)
Watermark in degrees.value - The rotate angle of this Watermark in degrees.public final void setScaleFactor(double value)
The value must be between 0 and 1.
value - The scale factor of this Watermark.public final void setSizingType(int value)
Sets a value specifying a way watermark should be sized.
value - The sizing type.public void setTileOptions(TileOptions tileOptions)
public final void setVerticalAlignment(int value)
Watermark.
Default value is .VerticalAlignment.None
value - The VerticalAlignment
of this Watermark.public final void setWidth(double value)
Watermark.
Setting this property will also change the value of
property to getSizingType().SizingType.Absolute
value - The desired width of this Watermark.public final void setX(double value)
Watermark.value - The x-coordinate of this Watermark.Copyright © 2026. All rights reserved.