VOOZH about

URL: https://www.nuget.org/packages/OfficeIMO.Word.Markdown/

⇱ NuGet Gallery | OfficeIMO.Word.Markdown 1.0.42




👁 Image
OfficeIMO.Word.Markdown 1.0.42

Prefix Reserved
dotnet add package OfficeIMO.Word.Markdown --version 1.0.42
 
 
NuGet\Install-Package OfficeIMO.Word.Markdown -Version 1.0.42
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.Word.Markdown" Version="1.0.42" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Word.Markdown" Version="1.0.42" />
 
Directory.Packages.props
<PackageReference Include="OfficeIMO.Word.Markdown" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.Word.Markdown --version 1.0.42
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OfficeIMO.Word.Markdown, 1.0.42"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.Word.Markdown@1.0.42
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.Word.Markdown&version=1.0.42
 
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Word.Markdown&version=1.0.42
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

OfficeIMO.Word.Markdown - Word and Markdown conversion

👁 nuget version
👁 nuget downloads

OfficeIMO.Word.Markdown converts between OfficeIMO.Word documents and OfficeIMO.Markdown documents.

Install

dotnet add package OfficeIMO.Word.Markdown

Quick start

using OfficeIMO.Word;
using OfficeIMO.Word.Markdown;

using var document = WordDocument.Create();
document.AddParagraph("Hello");

string markdown = document.ToMarkdown();
using var fromMarkdown = "# Title\n\nBody".LoadFromMarkdown();

AST-first conversion

using OfficeIMO.Markdown;
using OfficeIMO.Markdown.Html;
using OfficeIMO.Word.Markdown;

MarkdownDoc markdownDocument = "<table><tr><td><p>Line 1</p><p>Line 2</p></td></tr></table>"
 .LoadFromHtml();

using var wordDocument = markdownDocument.ToWordDocument();

Use MarkdownDoc.ToWordDocument() when you already have a typed AST and want to avoid flattening back to Markdown text before Word conversion.

What it maps

  • Word to Markdown with headings, paragraphs, lists, task items, tables, images, links, code, footnotes, and GitHub-friendly output.
  • Markdown to Word through the typed OfficeIMO.Markdown model.
  • Markdown image layout options such as local-image allowance and page-content-width fitting.
  • Selected AST-preserved inline HTML wrappers such as underline, superscript, and subscript into Word run formatting.

HTML via Markdown

using OfficeIMO.Markdown;
var html = doc.ToHtmlViaMarkdown(); // full HTML document (defaults to HtmlStyle.Word)
var fragment = doc.ToHtmlFragmentViaMarkdown();
doc.SaveAsHtmlViaMarkdown("report.html"); // defaults to HtmlStyle.Word

// Override style if desired:
doc.SaveAsHtmlViaMarkdown("report.html", new HtmlOptions { Style = HtmlStyle.GithubAuto });

Use LoadFromHtmlViaMarkdown() when your source is HTML but you want the AST-first Markdown bridge instead of flattening HTML into Markdown text first.

Notes

  • Default styling: ToHtmlViaMarkdown/SaveAsHtmlViaMarkdown use HtmlStyle.Word for a document‑like look.
  • TOC markers: [TOC], [[TOC]], {:toc}, and `` are recognized. Markdown → Word creates a native Word table of contents, and Word → Markdown exports native TOCs back as [TOC ...] markers. Parameterized form: [TOC min=2 max=3 layout=sidebar-right sticky=true scrollspy=true title="On this page"].
  • Table cells: inline markdown (code/links/emphasis/images) is supported and <br> becomes a real line break in HTML.
  • AST-preserved inline HTML wrappers such as <u>, <sub>, and <sup> map to real Word run formatting during Markdown → Word conversion.
  • Inline tags without a native Word run equivalent degrade intentionally on the Word leg: <ins> is treated as underline semantics and <q> roundtrips as literal quoted text.

Markdown → Word image layout options

var options = new MarkdownToWordOptions {
 AllowLocalImages = true,
 FitImagesToPageContentWidth = true, // page width minus margins
 MaxImageWidthPercentOfContent = 85 // optional percent-based cap
};

using var doc = markdown.LoadFromMarkdown(options);
  • Typed contract is available via MarkdownToWordOptions.ImageLayout.
  • PreferNarrativeSingleLineDefinitions = true keeps isolated Label: value lines as narrative paragraphs while still allowing grouped definition-list blocks.
  • OnImageLayoutDiagnostic can be used to inspect final width/height and applied layout constraints.

Word → Markdown layout and visual fallback options

var options = new WordToMarkdownOptions {
 PageBreakMode = MarkdownPageBreakMode.SemanticBlock,
 UnsupportedContentMode = MarkdownUnsupportedContentMode.Placeholder,
 VisualFallbackMode = MarkdownVisualFallbackMode.SvgFile
};

doc.SaveAsMarkdown("report.md", options);
  • PageBreakMode.SemanticBlock writes page breaks as fenced semantic blocks so Markdown → Word can restore real Word page breaks.
  • Headers, footers, and native Word table-of-contents fields are exported as semantic Markdown blocks/markers and restored on import where possible.
  • VisualFallbackMode.SvgDataUri embeds supported Word chart snapshots directly in Markdown as SVG images.
  • VisualFallbackMode.SvgFile writes supported chart snapshots into a sidecar *.assets directory next to the Markdown file and links to those files.
  • Chart SVG fallbacks preserve cached chart data, chart type, dimensions, series colors, pie/doughnut point colors, common theme/scheme colors, and basic transparency transforms. Unsupported chart constructs remain semantic placeholders instead of being silently dropped when UnsupportedContentMode.Placeholder is enabled.

Explicit IntelligenceX transcript contract

var options = MarkdownToWordPresets.CreateIntelligenceXTranscript(
 allowedImageDirectories: new[] { @"C:\Exports\Images" },
 visualMaxWidthPx: 760);

using var doc = markdown.LoadFromMarkdown(options);
  • MarkdownToWordPresets.CreateIntelligenceXTranscript(...) is the explicit DOCX preset for IX transcript export.
  • That preset now reuses the shared MarkdownTranscriptPreparation.CreateIntelligenceXTranscriptReaderOptions(...) contract, including legacy IX visual JSON upgrades through document transforms.
  • MarkdownToWordCapabilities.PreservesNarrativeSingleLineDefinitionsAsSeparateParagraphs() exposes the grouped Label: value capability probe as a reusable OfficeIMO contract instead of host-local reflection logic.

Supported features (core)

  • Headings 1–6, paragraphs, hard breaks
  • Lists (unordered, ordered) and task items
  • Tables with per‑column alignment
  • Images (alt/title; size hints when provided in Markdown)
  • Links and autolinks
  • Code spans/blocks
  • AST-preserved inline HTML wrappers for underline, superscript, and subscript
  • Footnotes
  • Front matter passthrough when using OfficeIMO.Markdown model

Boundaries

  • Word document modeling belongs in OfficeIMO.Word.
  • Markdown parsing and AST behavior belongs in OfficeIMO.Markdown.
  • HTML ingestion belongs in OfficeIMO.Markdown.Html or OfficeIMO.Word.Html, depending on the desired source model.
  • PDF output belongs in OfficeIMO.Word.Pdf and OfficeIMO.Pdf.

Targets and license

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 is compatible.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OfficeIMO.Word.Markdown:

Package Downloads
OfficeIMO.Reader

Unified, read-only document extraction facade for OfficeIMO (Word/Excel/PowerPoint/Markdown/PDF) intended for AI ingestion.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on OfficeIMO.Word.Markdown:

Repository Stars
EvotecIT/PSWriteOffice
PowerShell Module to create and edit Microsoft Word, Microsoft Excel, and Microsoft PowerPoint documents without having Microsoft Office installed.
Version Downloads Last Updated
1.0.42 183 6/16/2026
1.0.41 307 6/16/2026
1.0.40 397 6/15/2026
1.0.39 544 6/13/2026
1.0.38 566 6/12/2026
1.0.37 459 6/9/2026
1.0.36 149 6/9/2026
1.0.35 96 6/9/2026
1.0.34 440 6/5/2026
1.0.33 581 5/27/2026
1.0.32 516 5/26/2026
1.0.31 451 5/26/2026
1.0.30 509 5/23/2026
1.0.29 486 5/22/2026
1.0.28 431 5/21/2026
1.0.27 443 5/21/2026
1.0.26 451 5/20/2026
1.0.25 455 5/19/2026
1.0.24 424 5/18/2026
1.0.23 698 5/16/2026
Loading failed