Watermarker constructor
init
Initializes a new instance of the Watermarker
class with the specified document path.
def __init__(self, file_path):
...
Parameter | Type | Description |
---|---|---|
file_path | str | The file path to load the document from. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Load and save a content of any supported format.
init
Initializes a new instance of the Watermarker
class with the specified stream.
def __init__(self, document):
...
Parameter | Type | Description |
---|---|---|
document | io.RawIOBase | The stream to load document from. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Load and save a document of any supported format.
init
Initializes a new instance of the Watermarker
class with the specified
document path and load options.
def __init__(self, file_path, options):
...
Parameter | Type | Description |
---|---|---|
file_path | str | The file path to load document from. |
options | groupdocs.watermark.options.LoadOptions | Additional options to use when loading a document. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Load encrypted PDF document using password.
init
Initializes a new instance of the Watermarker
class with the specified
document path and settings.
def __init__(self, file_path, settings):
...
Parameter | Type | Description |
---|---|---|
file_path | str | The file path to load document from. |
settings | WatermarkerSettings |
Additional settings to use when working with loaded document. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Set searchable objects globally (for all documents that will be loaded after that).
init
Initializes a new instance of the Watermarker
class with the specified stream
and load options.
def __init__(self, document, options):
...
Parameter | Type | Description |
---|---|---|
document | io.RawIOBase | The stream to load document from. |
options | groupdocs.watermark.options.LoadOptions | Additional options to use when loading a document. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Load encrypted PDF document using password
init
Initializes a new instance of the Watermarker
class with the specified stream
and settings.
def __init__(self, document, settings):
...
Parameter | Type | Description |
---|---|---|
document | io.RawIOBase | The stream to load document from. |
settings | WatermarkerSettings |
Additional settings to use when working with loaded document. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Set searchable objects globally (for all documents that will be loaded after that).
init
Initializes a new instance of the Watermarker
class with the specified
document path, load options and settings.
def __init__(self, file_path, options, settings):
...
Parameter | Type | Description |
---|---|---|
file_path | str | The file path to load document from. |
options | groupdocs.watermark.options.LoadOptions | Additional options to use when loading a document. |
settings | WatermarkerSettings |
Additional settings to use when working with loaded document. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Find particular text fragments in email message body/subject.
init
Initializes a new instance of the Watermarker
class with the specified stream,
load options and settings.
def __init__(self, document, options, settings):
...
Parameter | Type | Description |
---|---|---|
document | io.RawIOBase | The stream to load document from. |
options | groupdocs.watermark.options.LoadOptions | Additional options to use when loading a document. |
settings | WatermarkerSettings |
Additional settings to use when working with loaded document. |
Exceptions
Exception | Description |
---|---|
UnsupportedFileTypeException |
Supplied document type is not supported. |
InvalidPasswordException |
Supplied password is incorrect. |
Example
Find particular text fragments in email message body/subject.
See Also
- module
groupdocs.watermark
- class
InvalidPasswordException
- class
UnsupportedFileTypeException
- class
Watermarker