Artifact
Overview
Artifact is a class in Aspose.Pdf FOSS for Java.
Represents a PDF artifact — elements that are separate from the authored page content but is produced as a side effect of pagination or layout (ISO 32000-1:2008, §14.8.2.2).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
artifactType | ArtifactType | Read | Returns the artifact type. |
type | ArtifactType | Read | Returns the artifact type (alias for {@link #getArtifactType()}). |
subtype | ArtifactSubtype | Read | Returns the artifact subtype. |
rectangle | Rectangle | Read | Returns the bounding box rectangle of this artifact. |
text | String | Read | Returns the text content of this artifact. |
contents | List<Operator> | Read | Returns the content stream operators that make up this artifact. |
background | boolean | Read | Returns whether this artifact is a background element. |
image | Image | Read | Returns the image associated with this artifact, if any. |
opacity | double | Read | Returns the opacity of this artifact (0.0 = fully transparent, 1.0 = fully opaque). |
rotation | double | Read | Returns the rotation angle in degrees. |
topMargin | double | Read | Returns the top margin. |
bottomMargin | double | Read | Returns the bottom margin. |
leftMargin | double | Read | Returns the left margin. |
rightMargin | double | Read | Returns the right margin. |
position | Position | Read | Returns the position of this artifact on the page. |
Methods
| Signature | Description |
|---|---|
Artifact(type: ArtifactType, subtype: ArtifactSubtype) | Creates an artifact with the specified type and subtype. |
Artifact(properties: COSDictionary) | Creates an artifact by parsing a properties dictionary from a BDC operator. |
Artifact() | Creates an artifact with no type or subtype. |
getArtifactType() → ArtifactType | Returns the artifact type. |
setArtifactType(type: ArtifactType) | Sets the artifact type. |
getType() → ArtifactType | Returns the artifact type (alias for {@link #getArtifactType()}). |
setType(type: ArtifactType) | Sets the artifact type (alias for {@link #setArtifactType(ArtifactType)}). |
getSubtype() → ArtifactSubtype | Returns the artifact subtype. |
setSubtype(subtype: ArtifactSubtype) | Sets the artifact subtype. |
getRectangle() → Rectangle | Returns the bounding box rectangle of this artifact. |
setRectangle(rectangle: Rectangle) | Sets the bounding box rectangle. |
getText() → String | Returns 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() → boolean | Returns whether this artifact is a background element. |
setBackground(background: boolean) | Sets whether this artifact is a background element. |
getImage() → Image | Returns the image associated with this artifact, if any. |
setImage(image: Image) | Sets the image associated with this artifact. |
getOpacity() → double | Returns the opacity of this artifact (0.0 = fully transparent, 1.0 = fully opaque). |
setOpacity(opacity: double) | Sets the opacity of this artifact. |
getRotation() → double | Returns the rotation angle in degrees. |
setRotation(rotation: double) | Sets the rotation angle in degrees. |
getTopMargin() → double | Returns the top margin. |
setTopMargin(topMargin: double) | Sets the top margin. |
getBottomMargin() → double | Returns the bottom margin. |
setBottomMargin(bottomMargin: double) | Sets the bottom margin. |
getLeftMargin() → double | Returns the left margin. |
setLeftMargin(leftMargin: double) | Sets the left margin. |
getRightMargin() → double | Returns the right margin. |
setRightMargin(rightMargin: double) | Sets the right margin. |
getPosition() → Position | Returns the position of this artifact on the page. |
setPosition(position: Position) | Sets the position of this artifact on the page. |
toString() → String | Returns a string representation of this artifact for debugging. |