Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

MarkdownToWordOptions

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

Options controlling Markdown to Word conversion.

Inheritance

  • Object
  • MarkdownToWordOptions

Usage

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

Accepted by parameters

Constructors

Methods

public Void ApplyDefaults(WordDocument document) #
Returns: Void

Applies default page settings to the provided document instance.

Parameters

document OfficeIMO.Word.WordDocument requiredposition: 0
public MarkdownReaderOptions CreateReaderOptions() #
Returns: MarkdownReaderOptions

Creates the effective Markdown reader options for a Word import, including the Word semantic fenced-block extensions and this instance's base URI settings.

Properties

public MarkdownVisualTheme Theme { get; set; } #

Shared Markdown visual theme used to align generated Word output with Markdown HTML and PDF exports.

public Boolean ApplyDefaultTheme { get; set; } #

Applies the shared default visual theme when Theme is omitted. Set to false for plain output that relies only on Word defaults.

public String FontFamily { get; set; } #

Optional font family applied to created runs during conversion.

public String BaseUri { get; set; } #

Optional base URI applied when resolving relative links and images in Markdown.

public Action<String> OnWarning { get; set; } #

Emits warnings from the converter (e.g., invalid URIs). Optional.

public Int32 MaxNestingDepth { get; set; } #

Maximum nested block-rendering depth accepted by the Word converter. Default: 64.

public Nullable<WordPageSize> DefaultPageSize { get; set; } #

Optional default page size applied when creating new documents.

public Nullable<OfficePageOrientation> DefaultOrientation { get; set; } #

Optional default page orientation applied when creating new documents.

public Boolean AllowLocalImages { get; set; } #

Allow inserting local images from file paths. Default: false.

public HashSet<String> AllowedImageDirectories { get; } #

Restrict local images to these directories (optional). Paths are normalized for comparison.

public Func<Uri, Byte[]> RemoteImageResolver { get; set; } #

Optional resolver for remote image bytes. The converter never performs network requests itself; callers own download, cache, authentication, and trust policy.

public Boolean AllowDataUriImages { get; set; } #

Allow embedding base64 data:image/* Markdown images. Default: true so the default Word-to-Markdown image export mode can round-trip back into Word.

public Int64 MaxDataUriImageBytes { get; set; } #

Maximum decoded size for a single base64 data URI image. Default: 32 MiB.

public HashSet<String> AllowedImageSchemes { get; } #

Allowed URL schemes for remote images. Default: http, https.

public Func<Uri, Boolean> ImageUrlValidator { get; set; } #

Optional custom validator for remote image URLs.

public Int64 MaximumRemoteImageBytes { get; set; } #

Maximum byte length accepted from RemoteImageResolver for one image.

public Action<MarkdownImageLayoutDiagnostic> OnImageLayoutDiagnostic { get; set; } #

Optional callback receiving per-image layout diagnostics.

public MarkdownImageLayoutOptions ImageLayout { get; } #

Image sizing and fitting behavior for markdown conversion.

public Boolean PreferNarrativeSingleLineDefinitions { get; set; } #

When enabled, isolated single-line Label: value content is kept as narrative paragraphs while grouped definition-list blocks remain structured.

public MarkdownReaderOptions ReaderOptions { get; set; } #

Optional markdown reader configuration used before Word conversion. When omitted, the converter uses the default OfficeIMO reader profile.

public Boolean RenderFrontMatter { get; set; } #

Controls whether front matter is rendered as visible Word content. Disable this when front matter is consumed by a template or build pipeline as metadata.

public Nullable<Double> MaxImageWidthPixels { get; set; } #

Optional hard cap (pixels) applied to rendered markdown image width.

public Nullable<Double> MaxImageHeightPixels { get; set; } #

Optional hard cap (pixels) applied to rendered markdown image height.

public Nullable<Double> MaxImageWidthPercentOfContent { get; set; } #

Optional hard cap expressed as percent of available content width (for example 100, 85, 50).

public Boolean FitImagesToPageContentWidth { get; set; } #

When enabled, markdown images are constrained to section content width (page width minus left/right margins).

public Boolean FitImagesToContextWidth { get; set; } #

When enabled, markdown images are constrained to context width (section content width minus list/quote indentation).