DocumentHandlerAddPassword Method (Stream, AddPasswordOptions)
Protects document of known format with password. Source document file format should be specified explicitly.

Namespace: GroupDocs.Merger.Handler
Assembly: GroupDocs.Merger (in GroupDocs.Merger.dll) Version: 19.5
Syntax
public DocumentResult AddPassword(
	Stream documentStream,
	AddPasswordOptions addPasswordOptions
)

Parameters

documentStream
Type: System.IOStream
Unprotected document.
addPasswordOptions
Type: GroupDocs.Merger.Domain.SecurityAddPasswordOptions
The options for specifying password and document file format.

Return Value

Type: DocumentResult
Password-protected document.
See Also