LoadOptions

LoadOptions class

Allows a developer to specify additional options (such as a password) when loading a file.

public class LoadOptions

Constructors

Name Description
LoadOptions() Initializes a new instance of the LoadOptions class.
LoadOptions(FileFormat) Initializes a new instance of the LoadOptions class.

Properties

Name Description
Extension { get; set; } Gets or sets the file extension of the stream.
FileFormat { get; } Gets the exact type of the file that is to be loaded. The default value is Unknown which means that the type should be detected automatically.
MimeType { get; set; } Gets or sets the MIME type of the stream.
Password { get; set; } Gets or sets the password for opening an encrypted document.

Examples

The following example shows how to create a StreamInfo instance with file extension:

var streamInfo = new StreamInfo
{
    Extension = ".docx"
};

The following example shows how to create a StreamInfo instance with MIME type:

var streamInfo = new StreamInfo
{
    MimeType = "application/msword"
};

See Also