RtfLoadOptions Class

Wordize.Loading.RtfLoadOptions class. Allows to specify additional options when loading Rtf document.

RtfLoadOptions class

Allows to specify additional options when loading Rtf document.

public class RtfLoadOptions : LoadOptions

Constructors

NameDescription
RtfLoadOptions()Initializes a new instance of this class with default values.

Properties

NameDescription
BaseUri { get; set; }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.
ConvertMetafilesToPng { get; set; }Gets or sets whether to convert metafile (Wmf or Emf) images to Png image format. Default is false.
ConvertShapeToOfficeMath { get; set; }Gets or sets whether to convert shapes with EquationXML to Office Math objects. Default is false.
Encoding { get; set; }Gets or sets the encoding that will be used to load an HTML, TXT, or CHM document if the encoding is not specified inside the document. Can be null. Default is null.
FontSettings { get; set; }Allows to specify document font settings.
IgnoreOleData { get; set; }Specifies whether to ignore the OLE data.
LanguagePreferences { get; }Gets language preferences that will be used when document is loading.
LoadFormat { get; set; }Specifies the format of the document to be loaded. Default is Auto.
MswVersion { get; set; }Allows to specify that the document loading process should match a specific MS Word version. Default value is Word2019
Password { get; set; }Gets or sets the password for opening an encrypted document. Can be null or empty string. Default is null.
PreserveIncludePictureField { get; set; }Gets or sets whether to preserve the INCLUDEPICTURE field when reading Microsoft Word formats. The default value is false.
RecognizeUtf8Text { get; set; }When set to true, Wordize will try to detect UTF8 characters, they will be preserved during import.
RecoveryMode { get; set; }Defines how the document should be handled if errors occur during loading. Use this property to specify whether the system should attempt to recover the document or follow another defined behavior. The default value is TryRecover.
TempFolder { get; set; }Allows to use temporary files when reading document. By default this property is null and no temporary files are used.
UpdateDirtyFields { get; set; }Specifies whether to update the fields with the dirty attribute. Default is false.
UseSystemLcid { get; set; }Gets or sets whether to use LCID value obtained from Windows registry to determine page setup default margins.
WarningCallback { get; set; }Called during a load operation, when an issue is detected that might result in data or formatting fidelity loss.

Methods

NameDescription
override Equals(object)Determines whether the specified object is equal in value to the current object.

Examples

Shows how to detect UTF-8 characters while loading an RTF document.

RtfLoadOptions rtfLoadOptions = new RtfLoadOptions();
rtfLoadOptions.RecognizeUtf8Text = true;

Converter.Create()
    .From(MyDir + "UTF-8 characters.rtf", rtfLoadOptions)
    .To(ArtifactsDir + "RtfLoadOptions.RecognizeUtf8Text.docx")
    .Execute();

See Also