Watermarker Constructor (String, LoadOptions, WatermarkerSettings)
Initializes a new instance of the Watermarker class with the specified document path, load options and settings.

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public Watermarker(
	string filePath,
	LoadOptions options,
	WatermarkerSettings settings
)

Parameters

filePath
Type: SystemString
The file path to load document from.
options
Type: GroupDocs.Watermark.OptionsLoadOptions
Additional options to use when loading a document.
settings
Type: GroupDocs.WatermarkWatermarkerSettings
Additional settings to use when working with loaded document.
Exceptions
ExceptionCondition
UnsupportedFileTypeExceptionSupplied document type is not supported.
InvalidPasswordExceptionSupplied password is incorrect.
Remarks
Learn more about loading documents: Loading documents.
Examples
Find particular text fragments in email message body/subject.
C#
WatermarkerSettings settings = new WatermarkerSettings();
settings.SearchableObjects = new SearchableObjects
{
    EmailSearchableObjects = EmailSearchableObjects.Subject
                           | EmailSearchableObjects.HtmlBody
                           | EmailSearchableObjects.PlainTextBody
};
EmailLoadOptions loadOptions = new EmailLoadOptions();
using (Watermarker watermarker = new Watermarker(@"D:\test.msg", loadOptions, settings))
{
    SearchCriteria criteria = new TextSearchCriteria("test", false);
    // Note, search is performed only if you pass TextSearchCriteria instance to Search method
    PossibleWatermarkCollection watermarks = watermarker.Search(criteria);
    // Remove found text fragments
    watermarks.Clear();
    // Save changes
    watermarker.Save();
}
See Also