LoadOptions Class |
Namespace: Aspose.Words
The LoadOptions type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | LoadOptions |
Initializes a new instance of this class with default values.
|
![]() ![]() | LoadOptions(String) |
A shortcut to initialize a new instance of this class with the specified password to load an encrypted document.
|
![]() ![]() | LoadOptions(LoadFormat, String, String) |
A shortcut to initialize a new instance of this class with properties set to the specified values.
|
Name | Description | |
---|---|---|
![]() | AnnotationsAtBlockLevel | Obsolete.
Gets or sets a flag indicating whether cross structure annotation nodes can be added at block/cell/row level.
|
![]() ![]() | AnnotationsAtBlockLevelAsDefault | Obsolete.
Gets or sets a default value for the AnnotationsAtBlockLevel property.
|
![]() ![]() | BaseUri |
Gets or sets the string that will be used to resolve relative URIs found in the document into absolute URIs when required.
Can be null or empty string. Default is null.
|
![]() ![]() | ConvertShapeToOfficeMath |
Gets or sets whether to convert shapes with EquationXML to Office Math objects.
|
![]() ![]() | Encoding |
Gets or sets the encoding that will be used to load an HTML or TXT document if the encoding is not specified in HTML/TXT.
Can be null. Default is null.
|
![]() ![]() | FontSettings |
Allows to specify document font settings.
|
![]() ![]() | LanguagePreferences |
Gets language preferences that will be used when document is loading.
|
![]() ![]() | LoadFormat |
Specifies the format of the document to be loaded.
Default is Auto.
|
![]() ![]() | MswVersion |
Allows to specify that the document loading process should match a specific MS Word version.
Default value is Word2007 |
![]() ![]() | Password |
Gets or sets the password for opening an encrypted document.
Can be null or empty string. Default is null.
|
![]() ![]() | PreserveIncludePictureField |
Gets or sets whether to preserve the INCLUDEPICTURE field when reading Microsoft Word formats.
The default value is false.
|
![]() ![]() | ResourceLoadingCallback |
Allows to control how external resources (images, style sheets) are loaded when a document is imported from HTML, MHTML.
|
![]() ![]() | UpdateDirtyFields |
Specifies whether to update the fields with the dirty attribute.
|
![]() ![]() | WarningCallback |
Called during a load operation, when an issue is detected that might result in data or formatting fidelity loss.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Document doc; // Trying to open a password-encrypted document the normal way will cause an exception to be thrown Assert.Throws<IncorrectPasswordException>(() => { doc = new Document(MyDir + "Encrypted.docx"); }); // To open it and access its contents, we need to open it using the correct password // The password is delivered via a LoadOptions object, after being passed to it's constructor LoadOptions options = new LoadOptions("docPassword"); // We can now open the document either by filename or stream doc = new Document(MyDir + "Encrypted.docx", options); using (Stream stream = File.OpenRead(MyDir + "Encrypted.docx")) { doc = new Document(stream, options); }