Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

MarkdownWordExportOptions

OfficeIMO.Word.Markdown

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

Options controlling Markdown to Word conversion.

Inheritance

  • object
  • MarkdownWordExportOptions

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.

Accepted by parameters 4

Constructors

public MarkdownWordExportOptions() #

Methods

public static MarkdownWordExportOptions CreateIntelligenceXTranscript(IReadOnlyList<string>? allowedImageDirectories = null, OfficeLength? visualMaxWidth = null) #

Creates the explicit IntelligenceX transcript Markdown-to-Word conversion options.

Parameters

allowedImageDirectories System.Collections.Generic.IReadOnlyList<string>? = null optional
Local image roots permitted by the transcript import policy.
visualMaxWidth OfficeIMO.OfficeLength? = null optional
Maximum visual width at 96 DPI, rounded to pixels and clamped to 320–2,000 pixels. Defaults to 760 pixels.
public MarkdownLoadOptions CreateReaderOptions() #

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

Returns

MarkdownLoadOptions

Properties

public bool FailOnLoss { get; set; } #

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

public WordDocument? Template { get; set; } #

Optional caller-owned template to populate rather than creating a detached document.

public string? ContentControlTag { get; set; } #

Tag identifying the template insertion content control.

public string? ContentControlAlias { get; set; } #

Alias identifying the template insertion content control.

public string? BookmarkName { get; set; } #

Bookmark identifying the insertion point.

public bool ReplacePlaceholder { get; set; } #

Replaces the selected placeholder after insertion.

public MarkdownVisualTheme? Theme { get; set; } #

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

public bool ApplyDefaultTheme { get; set; } #

Applies the shared default visual theme when MarkdownWordExportOptions.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 int MaxNestingDepth { get; set; } #

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

public WordPageSize? DefaultPageSize { get; set; } #

Optional default page size applied when creating new documents.

public OfficePageOrientation? DefaultOrientation { get; set; } #

Optional default page orientation applied when creating new documents.

public bool AllowLocalImages { get; set; } #

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

public HashSet<string> AllowedImageDirectories { get; private set; } #

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 bool 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 long MaxDataUriImageBytes { get; set; } #

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

public HashSet<string> AllowedImageSchemes { get; private set; } #

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

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

Optional custom validator for remote image URLs.

public long MaximumRemoteImageBytes { get; set; } #

Maximum byte length accepted from MarkdownWordExportOptions.RemoteImageResolver for one image.

public Action<WordMarkdownImageLayoutDiagnostic>? OnImageLayoutDiagnostic { get; set; } #

Optional callback receiving per-image layout diagnostics.

public WordMarkdownImageLayoutOptions ImageLayout { get; private set; } #

Image sizing and fitting behavior for markdown conversion.

public bool PreferNarrativeSingleLineDefinitions { get; set; } #

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

public MarkdownLoadOptions? ReaderOptions { get; set; } #

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

public bool RenderFrontMatter { get; set; } #

Controls whether front matter is rendered as visible Word content. The default is true for a new document and false when a template consumes it as metadata.

public OfficeLength? MaxImageWidth { get; set; } #

Optional physical hard cap applied to rendered markdown image width.

public OfficeLength? MaxImageHeight { get; set; } #

Optional physical hard cap applied to rendered markdown image height.

public double? MaxImageWidthPercentOfContent { get; set; } #

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

public bool FitImagesToPageContentWidth { get; set; } #

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

public bool FitImagesToContextWidth { get; set; } #

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