Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

WordToMarkdownOptions

Namespace OfficeIMO.Word.Markdown
Assembly OfficeIMO.Word.Markdown

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

Inheritance

  • Object
  • WordToMarkdownOptions

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

Methods

public MarkdownReaderOptions CreateReaderOptions(MarkdownDialectProfile profile = OfficeIMO) #
Returns: MarkdownReaderOptions

Creates reader options that understand the Word-specific semantic fenced blocks emitted by this converter.

Parameters

profile OfficeIMO.Markdown.MarkdownReaderOptions.MarkdownDialectProfile = OfficeIMO optionalposition: 0
Base markdown reader profile to start from.

Returns

Configured reader options.

Properties

public String FontFamily { get; set; } #

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

public Boolean EnableUnderline { get; set; } #

Enables wrapping underlined text with <u> tags.

public Boolean EnableHighlight { get; set; } #

Enables wrapping highlighted text with == delimiters.

public ImageExportMode ImageExportMode { get; set; } #

Determines how images are exported during Markdown conversion. Default is Base64.

public String ImageDirectory { get; set; } #

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

public Int64 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 Int32 MaxListNestingDepth { get; set; } #

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

public MarkdownPageBreakMode PageBreakMode { get; set; } #

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

public MarkdownUnsupportedContentMode UnsupportedContentMode { get; set; } #

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

public MarkdownVisualFallbackMode VisualFallbackMode { get; set; } #

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

public String VisualFallbackDirectory { get; set; } #

Directory used for generated visual fallback resources when VisualFallbackMode is 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 Boolean 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 MarkdownDialectProfile).