ImageStamp
Overview
ImageStamp is a class in Aspose.PDF FOSS for Java.
Inherits from: Stamp.
Represents an image stamp that can be overlaid on a PDF page.
This class provides 43 methods for working with ImageStamp objects in Java programs.
Available methods include: ImageStamp, getBottomMargin, getFile, getHeight, getHorizontalAlignment, getImageStream, getLeftMargin, getOpacity, getRightMargin, getRotate, getRotateAngle, getStampId, and 30 additional methods.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: background, bottomMargin, file, height, horizontalAlignment, imageStream, and 14 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
file | String | Read | Returns the file path of the image. |
imageStream | InputStream | Read | Returns the input stream providing the image data. |
xIndent | double | Read | Returns the horizontal position (X indent) of the stamp in points. |
yIndent | double | Read | Returns the vertical position (Y indent) of the stamp in points. |
width | double | Read | Returns the width of the stamp area in points. |
height | double | Read | Returns the height of the stamp area in points. |
background | boolean | Read | Returns whether this stamp is rendered behind the page content. |
rotate | Rotation | Read | Returns the rotation enum for this stamp. |
rotateAngle | double | Read | Returns the rotation angle of the stamp in degrees. |
opacity | double | Read | Returns the opacity (transparency) of the stamp. |
horizontalAlignment | HorizontalAlignment | Read | Returns the horizontal alignment of the stamp on the page. |
verticalAlignment | VerticalAlignment | Read | Returns the vertical alignment of the stamp on the page. |
leftMargin | double | Read | Returns the left margin of the stamp in points. |
rightMargin | double | Read | Returns the right margin of the stamp in points. |
topMargin | double | Read | Returns the top margin of the stamp in points. |
bottomMargin | double | Read | Returns the bottom margin of the stamp in points. |
stampId | int | Read | Returns the stamp identifier. |
zoom | double | Read | Returns the zoom (scale) factor for the stamp. |
zoomX | double | Read | Returns the horizontal zoom (scale) factor for the stamp. |
zoomY | double | Read | Returns the vertical zoom (scale) factor for the stamp. |
Methods
| Signature | Description |
|---|---|
ImageStamp(file: String) | Creates a new ImageStamp from a file path. |
ImageStamp(imageStream: InputStream) | Creates a new ImageStamp from an input stream of encoded image bytes |
| (JPEG, PNG, BMP or GIF). | |
getFile() → String | Returns the file path of the image. |
setFile(file: String) | Sets the file path of the image. |
getImageStream() → InputStream | Returns the input stream providing the image data. |
setImageStream(imageStream: InputStream) | Sets the input stream providing the image data. |
put(page: Page) | Applies this image stamp to the given page. |
getXIndent() → double | Returns the horizontal position (X indent) of the stamp in points. |
setXIndent(xIndent: double) | Sets the horizontal position (X indent) of the stamp in points. |
getYIndent() → double | Returns the vertical position (Y indent) of the stamp in points. |
setYIndent(yIndent: double) | Sets the vertical position (Y indent) of the stamp in points. |
getWidth() → double | Returns the width of the stamp area in points. |
setWidth(width: double) | Sets the width of the stamp area in points. |
getHeight() → double | Returns the height of the stamp area in points. |
setHeight(height: double) | Sets the height of the stamp area in points. |
isBackground() → boolean | Returns whether this stamp is rendered behind the page content. |
setBackground(background: boolean) | Sets whether this stamp is rendered behind the page content. |
getRotate() → Rotation | Returns the rotation enum for this stamp. |
setRotate(rotate: Rotation) | Sets the rotation using the {@link Rotation} enum. |
getRotateAngle() → double | Returns the rotation angle of the stamp in degrees. |
setRotateAngle(rotateAngle: double) | Sets the rotation angle of the stamp in degrees. |
getOpacity() → double | Returns the opacity (transparency) of the stamp. |
setOpacity(opacity: double) | Sets the opacity (transparency) of the stamp. |
getHorizontalAlignment() → HorizontalAlignment | Returns the horizontal alignment of the stamp on the page. |
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment) | Sets the horizontal alignment of the stamp on the page. |
getVerticalAlignment() → VerticalAlignment | Returns the vertical alignment of the stamp on the page. |
setVerticalAlignment(verticalAlignment: VerticalAlignment) | Sets the vertical alignment of the stamp on the page. |
getLeftMargin() → double | Returns the left margin of the stamp in points. |
setLeftMargin(leftMargin: double) | Sets the left margin of the stamp in points. |
getRightMargin() → double | Returns the right margin of the stamp in points. |
setRightMargin(rightMargin: double) | Sets the right margin of the stamp in points. |
getTopMargin() → double | Returns the top margin of the stamp in points. |
setTopMargin(topMargin: double) | Sets the top margin of the stamp in points. |
getBottomMargin() → double | Returns the bottom margin of the stamp in points. |
setBottomMargin(bottomMargin: double) | Sets the bottom margin of the stamp in points. |
getStampId() → int | Returns the stamp identifier. |
setStampId(stampId: int) | Sets the stamp identifier. |
getZoom() → double | Returns the zoom (scale) factor for the stamp. |
setZoom(zoom: double) | Sets the zoom (scale) factor for the stamp. |
getZoomX() → double | Returns the horizontal zoom (scale) factor for the stamp. |
setZoomX(zoomX: double) | Sets the horizontal zoom (scale) factor for the stamp. |
getZoomY() → double | Returns the vertical zoom (scale) factor for the stamp. |
setZoomY(zoomY: double) | Sets the vertical zoom (scale) factor for the stamp. |