Watermarker Class
Represents a class for watermark management in a document.
Inheritance Hierarchy
SystemObject
  GroupDocs.WatermarkWatermarker

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public class Watermarker : IDisposable

The Watermarker type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleWatermarker(Stream)
Initializes a new instance of the Watermarker class with the specified stream.
Public methodCode exampleWatermarker(String)
Initializes a new instance of the Watermarker class with the specified document path.
Public methodCode exampleWatermarker(Stream, LoadOptions)
Initializes a new instance of the Watermarker class with the specified stream and load options.
Public methodCode exampleWatermarker(Stream, WatermarkerSettings)
Initializes a new instance of the Watermarker class with the specified stream and settings.
Public methodCode exampleWatermarker(String, LoadOptions)
Initializes a new instance of the Watermarker class with the specified document path and load options.
Public methodCode exampleWatermarker(String, WatermarkerSettings)
Initializes a new instance of the Watermarker class with the specified document path and settings.
Public methodCode exampleWatermarker(Stream, LoadOptions, WatermarkerSettings)
Initializes a new instance of the Watermarker class with the specified stream, load options and settings.
Public methodCode exampleWatermarker(String, LoadOptions, WatermarkerSettings)
Initializes a new instance of the Watermarker class with the specified document path, load options and settings.
Properties
  NameDescription
Public propertyCode exampleSearchableObjects
Gets or sets the content objects that are to be included in a watermark search.
Methods
  NameDescription
Public methodCode exampleAdd(Watermark)
Adds a watermark to the loaded document.
Public methodCode exampleAdd(Watermark, WatermarkOptions)
Adds a watermark to the loaded document using watermark options.
Public methodDispose
Disposes the current instance.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodCode exampleGeneratePreview
Generates preview images for the document.
Public methodCode exampleGetContentT
Returns the Content object for the loaded document.
Public methodCode exampleGetDocumentInfo
Gets the information about the format of the loaded document.
Public methodGetHashCode (Inherited from Object.)
Public methodCode exampleGetImages
Finds all images in the document.
Public methodCode exampleGetImages(ImageSearchCriteria)
Finds images according to specified search criteria.
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodCode exampleRemove(PossibleWatermark)
Removes watermark from the document.
Public methodCode exampleRemove(PossibleWatermarkCollection)
Removes all watermarks in the collection from the document.
Public methodCode exampleSave
Saves the document data to the underlying stream.
Public methodCode exampleSave(Stream)
Saves the document to the specified stream.
Public methodCode exampleSave(String)
Saves the document to the specified file location.
Public methodCode exampleSave(SaveOptions)
Saves the document data to the underlying stream using save options.
Public methodCode exampleSave(Stream, SaveOptions)
Saves the document to the specified stream using save options.
Public methodCode exampleSave(String, SaveOptions)
Saves the document to the specified file location using save options.
Public methodCode exampleSearch
Searches all possible watermarks in the document.
Public methodCode exampleSearch(SearchCriteria)
Searches possible watermarks according to specified search criteria.
Public methodToString (Inherited from Object.)
Examples
Load and save a content of any supported format.
C#
// Load a content from a file.
using (Watermarker watermarker = new Watermarker("D:\\input.pdf"))
{
    // Use methods of Watermarker class to add, search or remove watermarks.

    // Save changes.
    watermarker.Save("D:\\output.pdf");
}
See Also