ImageStamp
Inheritance: java.lang.Object, com.aspose.pdf.Stamp
public final class ImageStamp extends Stamp
Reresents graphic stamp.
Constructors
Constructor | Description |
---|---|
ImageStamp(InputStream image) | Initializes a new instance of the ImageStamp class. |
ImageStamp(String fileName) | Creates image stamp by image in the specified file. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
image | java.io.InputStream | Stream which contains image data. |
ImageStamp(String fileName)
public ImageStamp(String fileName)
Creates image stamp by image in the specified file.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | Name 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:
Parameter | Type | Description |
---|---|---|
value | double | double 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:
Parameter | Type | Description |
---|---|---|
value | double | double 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:
Parameter | Type | Description |
---|---|---|
value | int | int value |
put(Page page)
public void put(Page page)
Adds graphic stamp on the page.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | Page for stamping. |
close()
public void close()
Closes this instance