Opens an existing password-protected document.

Namespace: TallComponents.PDF
Assembly: TallComponents.PDF.Controls.WinForms (in TallComponents.PDF.Controls.WinForms.dll) Version: 2.0.46.0

Syntax

C#
public Document(
	Stream stream,
	string password
)
Visual Basic
Public Sub New ( _
	stream As Stream, _
	password As String _
)

Parameters

stream
Type: System.IO..::..Stream
The stream from which the document is read.
password
Type: System..::..String
Password that is required to open this document.

Remarks

This method is optimized for speed, and will cache some data into memory if any is true:

  • the stream does not provide random access (!stream.CanSeek);
  • the stream is read from a file (stream is FileStream).
If caching does not occur, the stream must be kept open until the (target) document is written.

If you want to have full control over the caching behaviour, please use the overload with the BinaryReader, see the remarks available by that constructor for detailed information.

See Also