ImageStamp

Inheritance: java.lang.Object, com.aspose.pdf.Stamp

public final class ImageStamp extends Stamp

Reresents graphic stamp.

Constructors

ConstructorDescription
ImageStamp(InputStream image)Initializes a new instance of the ImageStamp class.
ImageStamp(String fileName)Creates image stamp by image in the specified file.

Methods

MethodDescription
getImage()Gets image stream used for stamping.
getWidth()Gets image width.
setWidth(double value)Sets image width.
getHeight()Gets image height.
setHeight(double value)Sets image height.
getQuality()Gets quality of image stamp in percent.
setQuality(int value)Sets quality of image stamp in percent.
put(Page page)Adds graphic stamp on the page.
close()Closes this instance

ImageStamp(InputStream image)

public ImageStamp(InputStream image)

Initializes a new instance of the ImageStamp class.

Parameters:

ParameterTypeDescription
imagejava.io.InputStreamStream which contains image data.

ImageStamp(String fileName)

public ImageStamp(String fileName)

Creates image stamp by image in the specified file.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringName of the file which contains image.

getImage()

public InputStream getImage()

Gets image stream used for stamping.

Returns: java.io.InputStream - InputStream object

getWidth()

public double getWidth()

Gets image width. Setting this property allos to scal image horizontally.

Returns: double - double value

setWidth(double value)

public void setWidth(double value)

Sets image width. Setting this property allos to scal image horizontally.

Parameters:

ParameterTypeDescription
valuedoubledouble value

getHeight()

public double getHeight()

Gets image height. Setting this image allows to scale image vertically.

Returns: double - double value

setHeight(double value)

public void setHeight(double value)

Sets image height. Setting this image allows to scale image vertically.

Parameters:

ParameterTypeDescription
valuedoubledouble value

getQuality()

public int getQuality()

Gets quality of image stamp in percent. Valid values are 0..100%.

Returns: int - int value

setQuality(int value)

public void setQuality(int value)

Sets quality of image stamp in percent. Valid values are 0..100%.

Parameters:

ParameterTypeDescription
valueintint value

put(Page page)

public void put(Page page)

Adds graphic stamp on the page.

Parameters:

ParameterTypeDescription
pagePagePage for stamping.

close()

public void close()

Closes this instance