Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordHtmlExportOptions

OfficeIMO.Word.Html

Namespace
OfficeIMO.Word.Html
Assembly
OfficeIMO.Word.Html
Source revision
e163ccb36643 with working tree changes

Options controlling Word to HTML conversion.

Inheritance

  • object
  • WordHtmlExportOptions

Usage

Explore 7 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.

Accepted by parameters 4

Constructors

public WordHtmlExportOptions() #

Methods

public static WordHtmlExportOptions CreateDocumentRoundTripProfile(OfficeVisualThemeKind theme = Report) #

Creates a trusted editable round-trip export with document structure and private review metadata enabled.

Parameters

theme OfficeIMO.Drawing.OfficeVisualThemeKind = Report optional
public static WordHtmlExportOptions CreatePrintReviewProfile(OfficeVisualThemeKind theme = WordLike) #

Creates a print-oriented review export with section, header, footer, and generated print styling.

Parameters

theme OfficeIMO.Drawing.OfficeVisualThemeKind = WordLike optional
public static WordHtmlExportOptions CreateSemanticDocumentProfile(OfficeVisualThemeKind theme = WordLike) #

Creates a readable semantic-document export with shared OfficeIMO document styling.

Parameters

theme OfficeIMO.Drawing.OfficeVisualThemeKind = WordLike optional

Properties

public bool FailOnLoss { get; set; } #

Rejects a converted target when completed stages report fidelity loss.

public WordHtmlExportProfile ExportProfile { get; set; } #

Named Word-to-HTML fidelity contract represented by this export.

public OfficeHtmlConversionProfile Profile { get; set; } #

Compatibility bridge to the former cross-format profile enum. New code should use WordHtmlExportOptions.ExportProfile so only Word profiles are representable.

public HtmlConversionProfile SharedProfile { get; } #

Shared engine profile used by the selected Word export lane.

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 string? Title { get; set; } #

Optional title override. Null preserves the Word built-in title.

public string? Language { get; set; } #

Optional language override. Null preserves the Word document language.

public bool EmitDocumentShell { get; set; } #

Whether to emit a complete HTML document instead of a fragment.

public string NewLine { get; set; } #

Newline sequence used between generated document-shell constructs.

public WordTrackedChangeExportPolicy TrackedChangePolicy { get; set; } #

Tracked-change view projected into static HTML. Defaults to markup, matching the PDF export, so insertions and deletions stay visible.

public WordFieldExportPolicy FieldPolicy { get; set; } #

Field representation used by the static HTML export.

public bool IncludeDrawingReviewMetadata { get; set; } #

Emits inert wrap, anchor, crop, transform, and supported picture-effect metadata for review without claiming browser reconstruction of Word's floating-layout algorithm. Named export profiles enable this; the compatibility default remains false.

public long MaxDocumentElements { get; set; } #

Maximum Open XML elements inspected during export. Defaults to 1,000,000.

public long MaxEmbeddedImageBytes { get; set; } #

Maximum bytes embedded for one image. Defaults to 64 MiB.

public long MaxTotalEmbeddedImageBytes { get; set; } #

Maximum aggregate image bytes embedded into one HTML result. Defaults to 256 MiB.

public long MaxOutputCharacters { get; set; } #

Maximum generated HTML characters. Defaults to 64 million.

public int MaxTableNestingDepth { get; set; } #

Maximum nested table depth exported from a Word document. The default is 128.

public int MaxListNestingDepth { get; set; } #

Maximum list nesting depth exported from a Word document. The default is 128.

public int MaxEquationNestingDepth { get; set; } #

Maximum OMML equation nesting depth projected to text or MathML. Defaults to and cannot exceed 256.

public string? FontFamily { get; set; } #

Optional font family applied to created runs during conversion.

public bool IncludeFontStyles { get; set; } #

When true, includes run font information as inline styles.

public bool IncludeListStyles { get; set; } #

When set, includes list style information in generated HTML.

public bool IncludeListDefinitions { get; set; } #

When true, emits reusable CSS classes and a head stylesheet for Word list definitions. Default is false to preserve the legacy inline/list-attribute output shape.

public bool IncludeParagraphClasses { get; set; } #

When true, paragraph styles are emitted as CSS classes.

public bool IncludeRunClasses { get; set; } #

When true, run character styles are emitted as CSS classes.

public bool IncludeRunColorStyles { get; set; } #

When true, includes run color information as inline styles. Defaults to true for conversion fidelity.

public bool IncludeRunHighlightStyles { get; set; } #

When true, includes run highlight information as inline styles. Defaults to true for conversion fidelity.

public bool IncludeParagraphSpacingStyles { get; set; } #

When true, includes paragraph spacing information as inline styles.

public bool IncludeParagraphIndentationStyles { get; set; } #

When true, includes paragraph indentation information as inline styles.

public bool ExportFootnotes { get; set; } #

When true, footnotes are exported to HTML. Set to false to omit footnotes.

public bool ExportEndnotes { get; set; } #

When true, endnotes are exported to HTML. Set to false to omit endnotes.

public bool ExportComments { get; set; } #

When true, Word comments are exported as linked HTML references and a comments section. Default is false so review metadata is not exposed unless requested.

public bool ExportHeadersAndFooters { get; set; } #

When true, Word section headers and footers are exported as semantic HTML header and footer regions with section/type metadata. Default is false to preserve the legacy body-only output.

public bool IncludeCustomProperties { get; set; } #

When true, custom document properties are exported as typed HTML meta tags. Default is false so callers explicitly choose whether custom metadata is browser-visible.

public bool IncludeSectionMetadata { get; set; } #

When true, wraps exported document content in per-section section elements that preserve Word page size, orientation, and margin metadata. Default is false to preserve the legacy flat body output.

public bool IncludeTableColumnGroups { get; set; } #

When true, emits table column width metadata as HTML colgroup and col elements when the Word table exposes usable column widths. Default is false to preserve the legacy row-first table output.

public bool EmbedImagesAsBase64 { get; set; } #

When true (default), embeds images as base64 data URIs. When false, uses the image file paths instead.

public List<ValueTuple<string, string>> AdditionalMetaTags { get; } #

Additional meta tags to include in the HTML head. Each tuple represents the name and content attributes of a meta element.

public List<ValueTuple<string, string>> AdditionalLinkTags { get; } #

Additional link tags to include in the HTML head. Each tuple represents the rel and href attributes of a link element.

public bool IncludeDefaultCss { get; set; } #

Includes the default OfficeIMO theme CSS for readable standalone output. Enabled by default. Set to false when the host page supplies its own styles.

public bool UseSharedDocumentShell { get; set; } #

Uses the shared responsive, print-aware OfficeIMO document shell when default CSS is included. Named export profiles enable this automatically. The default is false for legacy output compatibility.