Watermarker class

Watermarker class

Represents a class for watermark management in a document.

The Watermarker type exposes the following members:

Constructors

Constructor Description
init Initializes a new Watermarker instance with the specified document path.
init Initializes a new Watermarker instance with the specified document path and load options.
init Initializes a new Watermarker instance with the specified document path and settings.
init Initializes a new Watermarker with the specified document path, load options, and settings.
init Initializes a new Watermarker instance with the specified stream.
init Initializes a new instance of the Watermarker class with the specified stream and load options.
init Initializes a new instance of the Watermarker class with the specified stream and settings.
init Initializes a new Watermarker instance with the specified document stream, load options, and settings.

Methods

Method Description
add Adds a watermark to the loaded document.
add Adds a watermark to the loaded document using watermark options.
add_watermark
dispose Disposes the current instance.
generate_preview Generates preview images for the document.
generate_preview_preview_options
get_content
get_document_info Gets the information about the format of the loaded document.
get_images Finds images according to the specified search criteria.
get_images Finds all images in the document.
get_images_image_search_criteria
remove Removes watermark from the document.
remove Removes all watermarks in the collection from the document.
remove_possible_watermark
remove_possible_watermark_collection
save Saves the document data to the underlying stream.
save Saves the document to the specified file location.
save Saves the document to the specified stream.
save Saves the document data to the underlying stream using the specified save options.
save Saves the document to the specified file location using save options.
save Saves the document to the specified stream using save options.
save_file
save_save_options
save_stream
save_streams
save_string
search Searches all possible watermarks in the document.
search Searches possible watermarks according to specified search criteria.
search_search_criteria

Properties

Property Description
searchable_objects The objects that are to be included in a watermark search.

Example

import groupdocs.watermark as gw

with gw.Watermarker("D:\\input.pdf") as watermarker:
    # Use methods of Watermarker to add, search, or remove watermarks.
    watermarker.save("D:\\output.pdf")

Guides

Task guides that use Watermarker:

See Also