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

NameTypeAccessDescription
fileStringReadReturns the file path of the image.
imageStreamInputStreamReadReturns the input stream providing the image data.
xIndentdoubleReadReturns the horizontal position (X indent) of the stamp in points.
yIndentdoubleReadReturns the vertical position (Y indent) of the stamp in points.
widthdoubleReadReturns the width of the stamp area in points.
heightdoubleReadReturns the height of the stamp area in points.
backgroundbooleanReadReturns whether this stamp is rendered behind the page content.
rotateRotationReadReturns the rotation enum for this stamp.
rotateAngledoubleReadReturns the rotation angle of the stamp in degrees.
opacitydoubleReadReturns the opacity (transparency) of the stamp.
horizontalAlignmentHorizontalAlignmentReadReturns the horizontal alignment of the stamp on the page.
verticalAlignmentVerticalAlignmentReadReturns the vertical alignment of the stamp on the page.
leftMargindoubleReadReturns the left margin of the stamp in points.
rightMargindoubleReadReturns the right margin of the stamp in points.
topMargindoubleReadReturns the top margin of the stamp in points.
bottomMargindoubleReadReturns the bottom margin of the stamp in points.
stampIdintReadReturns the stamp identifier.
zoomdoubleReadReturns the zoom (scale) factor for the stamp.
zoomXdoubleReadReturns the horizontal zoom (scale) factor for the stamp.
zoomYdoubleReadReturns the vertical zoom (scale) factor for the stamp.

Methods

SignatureDescription
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()StringReturns the file path of the image.
setFile(file: String)Sets the file path of the image.
getImageStream()InputStreamReturns 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()doubleReturns 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()doubleReturns 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()doubleReturns the width of the stamp area in points.
setWidth(width: double)Sets the width of the stamp area in points.
getHeight()doubleReturns the height of the stamp area in points.
setHeight(height: double)Sets the height of the stamp area in points.
isBackground()booleanReturns whether this stamp is rendered behind the page content.
setBackground(background: boolean)Sets whether this stamp is rendered behind the page content.
getRotate()RotationReturns the rotation enum for this stamp.
setRotate(rotate: Rotation)Sets the rotation using the {@link Rotation} enum.
getRotateAngle()doubleReturns the rotation angle of the stamp in degrees.
setRotateAngle(rotateAngle: double)Sets the rotation angle of the stamp in degrees.
getOpacity()doubleReturns the opacity (transparency) of the stamp.
setOpacity(opacity: double)Sets the opacity (transparency) of the stamp.
getHorizontalAlignment()HorizontalAlignmentReturns the horizontal alignment of the stamp on the page.
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment)Sets the horizontal alignment of the stamp on the page.
getVerticalAlignment()VerticalAlignmentReturns the vertical alignment of the stamp on the page.
setVerticalAlignment(verticalAlignment: VerticalAlignment)Sets the vertical alignment of the stamp on the page.
getLeftMargin()doubleReturns the left margin of the stamp in points.
setLeftMargin(leftMargin: double)Sets the left margin of the stamp in points.
getRightMargin()doubleReturns the right margin of the stamp in points.
setRightMargin(rightMargin: double)Sets the right margin of the stamp in points.
getTopMargin()doubleReturns the top margin of the stamp in points.
setTopMargin(topMargin: double)Sets the top margin of the stamp in points.
getBottomMargin()doubleReturns the bottom margin of the stamp in points.
setBottomMargin(bottomMargin: double)Sets the bottom margin of the stamp in points.
getStampId()intReturns the stamp identifier.
setStampId(stampId: int)Sets the stamp identifier.
getZoom()doubleReturns the zoom (scale) factor for the stamp.
setZoom(zoom: double)Sets the zoom (scale) factor for the stamp.
getZoomX()doubleReturns the horizontal zoom (scale) factor for the stamp.
setZoomX(zoomX: double)Sets the horizontal zoom (scale) factor for the stamp.
getZoomY()doubleReturns the vertical zoom (scale) factor for the stamp.
setZoomY(zoomY: double)Sets the vertical zoom (scale) factor for the stamp.

See Also

 English