Watermarker Constructor (Stream)
Initializes a new instance of the Watermarker class with the specified stream.

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public Watermarker(
	Stream document
)

Parameters

document
Type: System.IOStream
The stream to load document from.
Exceptions
ExceptionCondition
UnsupportedFileTypeExceptionSupplied document type is not supported.
InvalidPasswordExceptionSupplied password is incorrect.
Remarks
Learn more about loading documents Loading documents.
Examples
Load and save a document of any supported format.
C#
// Load a content from a stream.
using (FileStream inputStream = File.Open("D:\\input.pdf", FileMode.Open))
using (FileStream outputStream = File.Open("D:\\output.pdf", FileMode.Create))
using (Watermarker watermarker = new Watermarker(inputStream))
{
    // Use methods of Watermarker class to add, search or remove watermarks.

    // Save changes.
    watermarker.Save(outputStream);
}
See Also