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

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

Parameters

document
Type: System.IOStream
The stream 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 (FileStream fileStream = File.Open(@"D:\test.msg", FileMode.Open))
using (Watermarker watermarker = new Watermarker(fileStream, 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