Document.Document

Document()

Initializes a new instance of the Document class. Creates a blank OneNote document.

public Document()

See Also


Document(string)

Initializes a new instance of the Document class. Opens an existing OneNote document from a file.

public Document(string filePath)
ParameterTypeDescription
filePathStringThe file path.

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.

See Also


Document(string, LoadOptions)

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

public Document(string filePath, LoadOptions loadOptions)
ParameterTypeDescription
filePathStringThe file path.
loadOptionsLoadOptionsOptions 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.

See Also


Document(Stream)

Initializes a new instance of the Document class. Opens an existing OneNote document from a stream.

public Document(Stream inStream)
ParameterTypeDescription
inStreamStreamThe stream.

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


Document(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.

public Document(Stream inStream, LoadOptions loadOptions)
ParameterTypeDescription
inStreamStreamThe stream.
loadOptionsLoadOptionsOptions 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