RtfHtmlExportOptions
OfficeIMO.Html
Controls RTF to semantic HTML conversion.
Inheritance
- object
- RtfHtmlExportOptions
Usage
Explore 8 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
Accepted by parameters 4
Constructors
public RtfHtmlExportOptions() #Methods
public RtfHtmlExportOptions Clone() #Creates a reusable copy of the current save options.
public static RtfHtmlExportOptions CreatePrintReviewProfile(OfficeVisualThemeKind theme = WordLike) #Creates a complete, styled HTML document for browser and print review. The profile remains static and never enables script execution or remote browser behavior.
Parameters
- theme OfficeIMO.Drawing.OfficeVisualThemeKind = WordLike
Returns
RtfHtmlExportOptionspublic static RtfHtmlExportOptions CreateRoundTripProfile() #Creates a complete HTML document for a trusted OfficeIMO round trip, including document-level metadata. The output can contain private metadata and binary payloads and must not be published without sanitization.
Returns
RtfHtmlExportOptionspublic static RtfHtmlExportOptions CreateWebSafeProfile() #Creates options for publishing untrusted RTF as semantic HTML. Private OfficeIMO round-trip metadata and inline data URI images are disabled, and only web and mail hyperlinks are allowed.
Returns
RtfHtmlExportOptionsInherited Methods
Properties
public RtfHtmlExportProfile ExportProfile { get; set; } #Named RTF-to-HTML fidelity contract represented by this export.
public OfficeHtmlConversionProfile Profile { get; set; } #Compatibility bridge to the shared profile catalog. New code should use RtfHtmlExportOptions.ExportProfile so only RTF profiles are representable.
public OfficeHtmlDocumentOptions DocumentOutput { get; set; } #Composed document-versus-fragment, theme, title, language, style, and newline settings.
public OfficeVisualThemeKind Theme { get; set; } #Compatibility alias for OfficeHtmlDocumentOptions.Theme.
public bool IncludeDefaultStyles { get; set; } #Compatibility alias for OfficeHtmlDocumentOptions.IncludeDefaultStyles.
public bool FragmentOnly { get; set; } #Compatibility alias inverse of OfficeHtmlDocumentOptions.EmitDocumentShell.
public bool IncludeMetadata { get; set; } #Includes document metadata when a full HTML document is requested.
public bool PreferEncapsulatedHtml { get; set; } #Prefers Outlook/Exchange HTML encapsulated in the RTF transport over its plain-text fallback. The encapsulated HTML is always reparsed through the bounded HTML reader and current URL policy.
public string? Title { get; set; } #Compatibility alias for OfficeHtmlDocumentOptions.Title. When unset, the RTF title is used.
public string? Language { get; set; } #Language override for the HTML root. Null preserves the RTF document language.
public HtmlUrlPolicy UrlPolicy { get; set; } #URL policy applied to every hyperlink and caller-supplied image source written to HTML. The default is the restrictive web-only policy.
public bool IncludeRoundTripMetadata { get; set; } #Includes private data-officeimo-rtf-* metadata used for trusted fidelity round trips. This can include encoded object and image payloads and is disabled by default.
public bool EmbedImagesAsDataUri { get; set; } #Embeds supported images as data URI values. Disabled by default for web-safe output.
public int MaxEmbeddedImageBytes { get; set; } #Maximum size of one image that may be embedded as a data URI.
public Func<RtfImage, string?>? ImageSourceResolver { get; set; } #Optional callback that stores or maps an RTF image and returns its HTML source URL. Returned URLs are validated using RtfHtmlExportOptions.UrlPolicy.
public string NewLine { get; set; } #Compatibility alias for OfficeHtmlDocumentOptions.NewLine.
public Encoding? Encoding { get; set; } #Encoding used when the HTML is saved. Null writes UTF-8 without a byte-order mark.
public bool FailOnLoss { get; set; } #Throws OfficeConversionException when the conversion reports loss.