setImage method

setImage(image)

setImage(image: Aspose.Words.JSImage)
ParameterTypeDescription
imageJSImage

setImage(image, options)

setImage(image: Aspose.Words.JSImage, options: Aspose.Words.ImageWatermarkOptions)
ParameterTypeDescription
imageJSImage
optionsImageWatermarkOptions

setImage(imagePath, options)

Adds Image watermark into the document.

setImage(imagePath: string, options: Aspose.Words.ImageWatermarkOptions)
ParameterTypeDescription
imagePathstringPath to the image file that is displayed as a watermark.
optionsImageWatermarkOptionsDefines additional options for the image watermark.

Remarks

If ImageWatermarkOptions is null, the watermark will be set with default options.

Exceptions

exceptioncondition
RuntimeError (Proxy error(ArgumentNullException))Throws when the path is null.

setImage(imageStream, options)

Adds Image watermark into the document.

setImage(imageStream: Buffer, options: Aspose.Words.ImageWatermarkOptions)
ParameterTypeDescription
imageStreamBufferThe stream containing the image data that is displayed as a watermark.
optionsImageWatermarkOptionsDefines additional options for the image watermark.

Remarks

If ImageWatermarkOptions is null, the watermark will be set with default options.

Exceptions

exceptioncondition
RuntimeError (Proxy error(ArgumentNullException))Throws when the path is null.

See Also