setText method
Contents
[
Hide
]setText(text)
Adds Text watermark into the document.
setText(text: string)
Parameter | Type | Description |
---|---|---|
text | string | Text that is displayed as a watermark. |
Remarks
The text length must be in the range from 1 to 200 inclusive.
The text cannot be null
or contain only whitespaces.
Exceptions
exception | condition |
---|---|
RuntimeError (Proxy error(ArgumentOutOfRangeException)) | Throws when the text length is out of range or the text contains only whitespaces. |
RuntimeError (Proxy error(ArgumentNullException)) | Throws when the text is null . |
setText(text, options)
Adds Text watermark into the document.
setText(text: string, options: Aspose.Words.TextWatermarkOptions)
Parameter | Type | Description |
---|---|---|
text | string | Text that is displayed as a watermark. |
options | TextWatermarkOptions | Defines additional options for the text watermark. |
Remarks
The text length must be in the range from 1 to 200 inclusive.
The text cannot be null
or contain only whitespaces.
If TextWatermarkOptions is null
, the watermark will be set with default options.
Exceptions
exception | condition |
---|---|
RuntimeError (Proxy error(ArgumentOutOfRangeException)) | Throws when the text length is out of range or the text contain only whitespaces. |
RuntimeError (Proxy error(ArgumentNullException)) | Throws when the text is null . |
See Also
- module Aspose.Words
- class Watermark