@Deprecated public class ImageWatermark extends Watermark implements com.aspose.ms.System.IDisposable, Closeable
Represents an image watermark.
This example demonstrates how to add image watermark to a document of any supported format.
Document document = Document.load("D:\\input.doc"); // Create ImageWatermark instance. ImageWatermark watermark = new ImageWatermark("D:\\watermark.png"); // Add watermark to the document. document.addWatermark(watermark); watermark.close(); document.save("D:\\output.doc"); document.close();
Constructor and Description |
---|
ImageWatermark(InputStream stream)
Deprecated.
Initializes a new instance of the
ImageWatermark class. |
ImageWatermark(String filePath)
Deprecated.
Initializes a new instance of the
ImageWatermark class. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
void |
dispose()
Deprecated.
Disposes the current instance.
|
getConsiderParentMargins, getHeight, getHorizontalAlignment, getMargins, getOpacity, getRotateAngle, getScaleFactor, getSizingType, getVerticalAlignment, getWidth, getX, getY, isBackground, setBackground, setConsiderParentMargins, setHeight, setHorizontalAlignment, setMargins, setOpacity, setRotateAngle, setScaleFactor, setSizingType, setVerticalAlignment, setWidth, setX, setY
public ImageWatermark(String filePath)
Initializes a new instance of the ImageWatermark
class.
filePath
- Path to the image that will be used as watermark.public ImageWatermark(InputStream stream)
Initializes a new instance of the ImageWatermark
class.
stream
- Stream containing the image that will be used as watermark.public final void dispose()
Disposes the current instance.
dispose
in interface com.aspose.ms.System.IDisposable
public final void close()
close
in interface Closeable
close
in interface AutoCloseable