BackgroundArtifact

BackgroundArtifact

Overview

BackgroundArtifact is a class in Aspose.Pdf FOSS for Java. Inherits from: Artifact.

Represents a background artifact — a convenience subclass for creating artifacts that serve as page backgrounds (ISO 32000-1:2008, §14.8.2.2).

Properties

NameTypeAccessDescription
backgroundColorColorReadReturns the background color.
backgroundImageInputStreamReadReturns the background image input stream.
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
BackgroundArtifact()Creates a new background artifact with type Background and subtype Background.
getBackgroundColor()ColorReturns the background color.
setBackgroundColor(color: Color)Sets the background color.
getBackgroundImage()InputStreamReturns the background image input stream.
setBackgroundImage(imageStream: InputStream)Sets the background image from an input stream.
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