WatermarkArtifact

WatermarkArtifact

Overview

WatermarkArtifact is a class in Aspose.PDF FOSS for Java. Inherits from: Artifact.

Represents a watermark artifact — a convenience subclass for creating pagination artifacts with the Watermark subtype (ISO 32000-1:2008, §14.8.2.2).

This class provides 43 methods for working with WatermarkArtifact objects in Java programs. Available methods include: Artifact, WatermarkArtifact, getArtifactType, getBottomMargin, getColor, getContents, getFontName, getFontSize, getImage, getLeftMargin, getOpacity, getPosition, and 30 additional methods. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: artifactType, background, bottomMargin, color, contents, fontName, and 13 more.

Properties

NameTypeAccessDescription
fontNameStringReadReturns the font name used by the watermark.
fontSizedoubleReadReturns the font size (in points) used by the watermark.
colorColorReadReturns the watermark text colour.
watermarkTextStringReadReturns the watermark text content.
artifactTypeArtifactTypeReadReturns the artifact type.
typeArtifactTypeReadReturns the artifact type (alias for {@link #getArtifactType()}).
subtypeArtifactSubtypeReadReturns the artifact subtype.
rectangleRectangleReadReturns the bounding box rectangle of this artifact.
textStringReadReturns the text content of this artifact.
contentsList<Operator>ReadReturns the content stream operators that make up this artifact.
backgroundbooleanReadReturns whether this artifact is a background element.
imageImageReadReturns the image associated with this artifact, if any.
opacitydoubleReadReturns the opacity of this artifact (0.0 = fully transparent, 1.0 = fully opaque).
rotationdoubleReadReturns the rotation angle in degrees.
topMargindoubleReadReturns the top margin.
bottomMargindoubleReadReturns the bottom margin.
leftMargindoubleReadReturns the left margin.
rightMargindoubleReadReturns the right margin.
positionPositionReadReturns the position of this artifact on the page.

Methods

SignatureDescription
WatermarkArtifact()Creates a new watermark artifact with type Pagination and subtype Watermark.
WatermarkArtifact(text: String)Creates a new watermark artifact with the given text content.
setFont(fontName: String, fontSize: double)Sets the base font name and size used to render the watermark text.
getFontName()StringReturns the font name used by the watermark.
getFontSize()doubleReturns the font size (in points) used by the watermark.
setColor(color: Color)Sets the watermark text colour.
getColor()ColorReturns the watermark text colour.
setWatermarkText(text: String)Sets the watermark text content.
getWatermarkText()StringReturns the watermark text content.
setWatermarkOpacity(opacity: double)Sets the watermark opacity (0.0 = fully transparent, 1.0 = fully opaque).
setWatermarkRotation(degrees: double)Sets the watermark rotation angle in degrees.
Artifact(type: ArtifactType, subtype: ArtifactSubtype)Creates an artifact with the specified type and subtype.
getArtifactType()ArtifactTypeReturns the artifact type.
setArtifactType(type: ArtifactType)Sets the artifact type.
getType()ArtifactTypeReturns the artifact type (alias for {@link #getArtifactType()}).
setType(type: ArtifactType)Sets the artifact type (alias for {@link #setArtifactType(ArtifactType)}).
getSubtype()ArtifactSubtypeReturns the artifact subtype.
setSubtype(subtype: ArtifactSubtype)Sets the artifact subtype.
getRectangle()RectangleReturns the bounding box rectangle of this artifact.
setRectangle(rectangle: Rectangle)Sets the bounding box rectangle.
getText()StringReturns the text content of this artifact.
setText(text: String)Sets the text content of this artifact.
getContents()List<Operator>Returns the content stream operators that make up this artifact.
setContents(operators: List<Operator>)Sets the content stream operators for this artifact.
isBackground()booleanReturns whether this artifact is a background element.
setBackground(background: boolean)Sets whether this artifact is a background element.
getImage()ImageReturns the image associated with this artifact, if any.
setImage(image: Image)Sets the image associated with this artifact.
getOpacity()doubleReturns the opacity of this artifact (0.0 = fully transparent, 1.0 = fully opaque).
setOpacity(opacity: double)Sets the opacity of this artifact.
getRotation()doubleReturns the rotation angle in degrees.
setRotation(rotation: double)Sets the rotation angle in degrees.
getTopMargin()doubleReturns the top margin.
setTopMargin(topMargin: double)Sets the top margin.
getBottomMargin()doubleReturns the bottom margin.
setBottomMargin(bottomMargin: double)Sets the bottom margin.
getLeftMargin()doubleReturns the left margin.
setLeftMargin(leftMargin: double)Sets the left margin.
getRightMargin()doubleReturns the right margin.
setRightMargin(rightMargin: double)Sets the right margin.
getPosition()PositionReturns the position of this artifact on the page.
setPosition(position: Position)Sets the position of this artifact on the page.
toString()StringReturns a string representation of this artifact for debugging.

See Also

 English