Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordMarkdownExportOptions

OfficeIMO.Word.Markdown

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

Provides settings that control how a Word document is converted to Markdown.

Inheritance

  • object
  • WordMarkdownExportOptions

Usage

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

Constructors

public WordMarkdownExportOptions() #

Properties

public bool FailOnLoss { get; set; } #

Rejects fidelity loss before returning the target document or writing its destination.

public string? FontFamily { get; set; } #

Font family whose runs should be rendered as inline code. When null, WordFontResolver.Resolve is used with "monospace" to determine the code font.

public bool EnableUnderline { get; set; } #

Enables wrapping underlined text with <u> tags.

public bool EnableHighlight { get; set; } #

Enables wrapping highlighted text with == delimiters.

public WordMarkdownImageExportMode ImageExportMode { get; set; } #

Determines how images are exported during Markdown conversion. Default is WordMarkdownImageExportMode.Base64. Saving to a path without options writes images as files next to the Markdown file.

public string? ImageDirectory { get; set; } #

When WordMarkdownImageExportMode is set to WordMarkdownImageExportMode.File, images are written to this directory. If not specified, the current working directory is used.

public long MaxEmbeddedImageBytes { get; set; } #

Maximum number of image bytes that may be materialized for one base64 data URI. The default is 32 MiB. Set a different positive value for trusted documents that intentionally contain larger embedded images.

public int MaxListNestingDepth { get; set; } #

Maximum Word list nesting level materialized during conversion. The default is 128.

public WordMarkdownPageBreakMode PageBreakMode { get; set; } #

Controls how Word page breaks are represented in Markdown. Default is WordMarkdownPageBreakMode.SemanticBlock so the break can round-trip.

public WordMarkdownUnsupportedContentMode UnsupportedContentMode { get; set; } #

Controls how converter-detected Word content without a native Markdown representation is handled. Default is WordMarkdownUnsupportedContentMode.WarnOnly.

public WordMarkdownVisualFallbackMode VisualFallbackMode { get; set; } #

Controls whether supported visual content, such as charts, is rendered as Markdown image fallbacks. Default is WordMarkdownVisualFallbackMode.None to keep Markdown semantic unless requested.

public string? VisualFallbackDirectory { get; set; } #

Directory used for generated visual fallback resources when WordMarkdownExportOptions.VisualFallbackMode is WordMarkdownVisualFallbackMode.SvgFile. When saving to a Markdown file and this is not set, resources are written to a sidecar folder next to the Markdown file.

public string? VisualFallbackPathPrefix { get; set; } #

Optional path prefix used in Markdown image links for generated visual fallback resources. When saving to a Markdown file and this is not set, the sidecar folder name is used.

public Action<string>? OnWarning { get; set; } #

Optional callback for non-fatal conversion warnings, such as external image fallback.

public bool IncludeHeadersAndFootersAsSemanticBlocks { get; set; } #

Enables exporting section headers and footers as semantic fenced blocks instead of omitting them. The fenced payload contains markdown for the header/footer body and can be reparsed with MarkdownWordExportOptions.CreateReaderOptions.