Document Constructor (Stream, LoadOptions)

Aspose.Note for .NET API

Document Constructor (Stream, LoadOptions)

Initializes a new instance of the Document class. Opens an existing OneNote document from a stream. Allows to specify additional options such as an encryption password.

Namespace:  Aspose.Note
Assembly:  Aspose.Note (in Aspose.Note.dll) Version: 18.1
Syntax
public Document(
	Stream inStream,
	LoadOptions loadOptions
)
Public Sub New ( 
	inStream As Stream,
	loadOptions As LoadOptions
)
public:
Document(
	Stream^ inStream, 
	LoadOptions^ loadOptions
)
new : 
        inStream : Stream * 
        loadOptions : LoadOptions -> Document

Parameters

inStream
Type: System.IOStream
The stream.
loadOptions
Type: Aspose.NoteLoadOptions
Options used to load a document. Can be null.
Exceptions
ExceptionCondition
UnsupportedFileFormatExceptionThe document format is not recognized or not supported.
FileCorruptedExceptionThe document appears to be corrupted and cannot be loaded.
IncorrectPasswordExceptionThe document is encrypted and requires a password to open, but you supplied an incorrect password.
InvalidOperationExceptionThere is a problem with the document and it should be reported to Aspose.Note developers.
IOExceptionThere is an input/output exception.
ArgumentExceptionThe stream does not support reading, is null, or is already closed.
See Also