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: 19.10.0
Syntax
public class Watermarker : IDisposable

The Watermarker type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleWatermarker(Stream)
Creates a new Watermarker class for a document from the specified stream.
Public methodCode exampleWatermarker(String)
Creates a new Watermarker class for a document from the specified file.
Public methodCode exampleWatermarker(Stream, LoadOptions)
Creates a new Watermarker class for a document from the specified stream.
Public methodCode exampleWatermarker(Stream, WatermarkerSettings)
Creates a new Watermarker class for a document from the specified stream.
Public methodCode exampleWatermarker(String, LoadOptions)
Creates a new Watermarker class for a document from the specified file.
Public methodCode exampleWatermarker(String, WatermarkerSettings)
Creates a new Watermarker class for a document from the specified file.
Public methodCode exampleWatermarker(Stream, LoadOptions, WatermarkerSettings)
Creates a new Watermarker class for a document from the specified stream.
Public methodCode exampleWatermarker(String, LoadOptions, WatermarkerSettings)
Creates a new Watermarker class for a document from the specified file.
Properties
  NameDescription
Public propertyCode exampleSearchableObjects
Gets or sets the content objects that are to be included in a watermark search. Note, this property also specifies content objects which are used in image search. For more information see Search(SearchCriteria) and GetImages methods.
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.
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 loaded document.
Public methodGetHashCode (Inherited from Object.)
Public methodCode exampleGetImages
Finds all images in the document. The search is conducted in objects specified in SearchableObjects.
Public methodCode exampleGetImages(ImageSearchCriteria)
Finds images according to specified search criteria. The search is conducted in objects specified in SearchableObjects.
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.
Public methodCode exampleSave(Stream, SaveOptions)
Saves the document to the specified stream.
Public methodCode exampleSave(String, SaveOptions)
Saves the document to the specified file location.
Public methodCode exampleSearch
Searches all possible watermarks in the document. The search is conducted in objects specified in SearchableObjects.
Public methodCode exampleSearch(SearchCriteria)
Searches possible watermarks according to specified search criteria. The search is conducted in objects specified in SearchableObjects.
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