We’re pleased to announce the release of GroupDocs.Markdown for .NET 26.3, available as of March 2026. This major update introduces a redesigned public API, a custom DOM‑based Markdown renderer, full Markdown flavor control, async support, and a range of bug fixes. It also adds per‑TFM runtime NuGet packages and support for .NET 8 and .NET 10.

What’s new in this release

Key Category Summary
MARKDOWNNET-33 Feature Split NuGet package into per-TFM runtime packages
MARKDOWNNET-31 Feature Add support for .NET 8 and .NET 10
MARKDOWNNET-30 Feature Custom DOM-based Markdown renderer
MARKDOWNNET-29 Feature Conversion warnings and unified error model
MARKDOWNNET-28 Feature Relative image paths and image replacement
MARKDOWNNET-27 Feature Heading level offset and YAML front matter generation
MARKDOWNNET-26 Feature Markdown flavor control and spreadsheet rendering options
MARKDOWNNET-25 Feature Document inspection without conversion
MARKDOWNNET-24 Feature Async API
MARKDOWNNET-23 Feature Static convenience methods and format discovery
MARKDOWNNET-20 Enhancement Review and redesign the API
MARKDOWNNET-8 Feature Support for replacing images during conversion to Markdown
MARKDOWNNET-35 Bug Fix Quality and functional issues

Public API changes

New public types

  • DocumentInfo — ドキュメントのメタデータ(フォーマット、ページ数、タイトル、作成者、暗号化状態)
  • MarkdownFlavor — ターゲットとなる Markdown 方言(GitHub、CommonMark)を表す列挙型
  • IImageSavingHandler — カスタム画像保存コールバック用インターフェイス
  • IUriSavingHandler — カスタム URI 保存コールバック用インターフェイス
  • GroupDocsMarkdownException — 汎用的な変換例外
  • InvalidFormatException — 破損または認識できないファイル形式
  • DocumentProtectedException — パスワードが間違っている、または未設定

New static methods on MarkdownConverter

  • ToMarkdown(string sourcePath)LoadOptionsConvertOptions のオーバーロード
  • ToFile(string sourcePath, string outputPath) とオーバーロード
  • GetInfo(string sourcePath) とオーバーロード
  • GetSupportedFormats()
  • 非同期バリアント: ToMarkdownAsync, ToFileAsync, GetInfoAsync

New instance methods on MarkdownConverter

  • GetDocumentInfo()
  • ConvertAsync() とオーバーロード

New properties on ConvertOptions

  • ImageExportStrategyExportStrategy の代替)
  • UriExportStrategy
  • HeadingLevelOffset
  • IncludeFrontMatter
  • Flavor
  • MaxColumns, MaxRows, SheetSeparator, IncludeHiddenSheets

New properties on ConvertResult

  • Warnings — 致命的でない変換警告

New properties on ExportImagesToFileSystemStrategy and CustomImagesStrategy

  • ImagesRelativePath — Markdown の画像参照に書き込むパスを制御

New methods on CustomImageSavingArgs

  • SetReplacementImage(Stream imageStream) — 画像コンテンツを差し替える

Removed types

  • IExportStrategyIImageExportStrategyIUriExportStrategy に置き換え
  • DocumentConverterOptionsConvertOptions に名称変更
  • DocumentConverterResultConvertResult に名称変更

Breaking changes

Renamed Types

Before After
DocumentConverterOptions ConvertOptions
DocumentConverterResult ConvertResult

FileFormat Enum

ファミリーレベルの値(FileFormat.WordProcessing, FileFormat.Spreadsheet)は、具体的なフォーマット(FileFormat.Docx, FileFormat.Xlsx など)に置き換えられました。新規エントリ: FileFormat.Txt, FileFormat.Chm

ConvertOptions and LoadOptions separated

ConvertOptions はもはや LoadOptions を継承しません。パスワードやフォーマットヒントは LoadOptions に設定します:

var loadOptions = new LoadOptions(FileFormat.Docx) { Password = "secret" };
var convertOptions = new ConvertOptions { HeadingLevelOffset = 1 };
using var converter = new MarkdownConverter("file.docx", loadOptions);
var result = converter.Convert(convertOptions);

Image and URI strategies split

単一の ExportStrategy プロパティは、2 つの型付きプロパティに置き換えられました:

var options = new ConvertOptions
{
    ImageExportStrategy = new ExportImagesToFileSystemStrategy("images"),
    UriExportStrategy = new CustomUriExportStrategy(handler)
};

Delegates replaced with interfaces

CustomImagesStrategyCustomUriExportStrategy は、デリゲートコールバックの代わりに IImageSavingHandlerIUriSavingHandler インターフェイスを受け取ります。

LoadOptions.Extension and LoadOptions.MimeType are internal

ExtensionMimeType を直接設定する代わりに、new LoadOptions(FileFormat.Docx) を使用してください。

New features

Custom DOM‑Based Markdown Renderer

サードパーティのエクスポートに依存せず、ライブラリ自身がドキュメントオブジェクトモデルをノード単位で走査し、Markdown を直接生成します。これにより出力のあらゆる側面を完全に制御できます。

Word/PDF/Ebook/Text/CHM ドキュメント は、段落、見出し(H1‑H6)、太字、斜体、取り消し線、インラインコード、入れ子可能な順序付き・順序なしリスト、テーブル(GFM パイプ構文または CommonMark コードブロックのフォールバック)、ハイパーリンク、画像をサポートしてレンダリングされます。

スプレッドシート は、セル単位のグリッド走査、型に応じた値の書式設定、シート区切り、列・行の省略表示(省略記号付き)、非表示シートのフィルタリング、カスタムシートセパレータを備えてレンダリングされます。

Static Convenience Methods

リソース管理を自動的に行うワンライナー変換メソッド:

string md = MarkdownConverter.ToMarkdown("report.docx");
MarkdownConverter.ToFile("report.docx", "report.md");
IReadOnlyList<FileFormat> formats = MarkdownConverter.GetSupportedFormats();

Async API

すべての静的・インスタンスメソッドに対して、CancellationToken 対応の非同期バリアントが提供されます:

string md = await MarkdownConverter.ToMarkdownAsync("report.docx");
await MarkdownConverter.ToFileAsync("large.pdf", "output.md");
DocumentInfo info = await MarkdownConverter.GetInfoAsync("report.docx");

Document Inspection Without Conversion

変換を実行せずにドキュメントメタデータを取得できます:

DocumentInfo info = MarkdownConverter.GetInfo("report.docx");
Console.WriteLine($"{info.FileFormat}, {info.PageCount} pages, by {info.Author}");

Markdown Flavor Control

特定の Markdown 方言をターゲットにできます:

var options = new ConvertOptions { Flavor = MarkdownFlavor.GitHub }; // パイプテーブル、取り消し線
var options = new ConvertOptions { Flavor = MarkdownFlavor.CommonMark }; // テーブルはコードブロックとして出力

Spreadsheet Rendering Options

スプレッドシートの Markdown 変換方法を細かく制御できます:

var options = new ConvertOptions
{
    MaxColumns = 8,
    MaxRows = 50,
    SheetSeparator = "\n---\n",
    IncludeHiddenSheets = false
};

Heading Level Offset and YAML Front Matter

var options = new ConvertOptions
{
    HeadingLevelOffset = 2,       // # Title  ->  ### Title
    IncludeFrontMatter = true     // YAML メタデータを先頭に付加
};

Conversion Warnings and Unified Error Model

すべての Convert() メソッドは失敗時に例外をスローします。ConvertResult は致命的でない警告を保持します:

ConvertResult result = converter.Convert();
foreach (string w in result.Warnings)
    Console.WriteLine(w);  // 例: "Worksheet 'Data' truncated at 50 rows."

Image Replacement and Relative Paths

変換中に画像を差し替え、パス参照を制御できます:

var strategy = new ExportImagesToFileSystemStrategy("c:/output/images")
{
    ImagesRelativePath = "images"  // ![](images/img-001.png)
};

Table of Contents Rendering

目次があるドキュメントは、フィールドコードのままではなく、クリーンなリストとしてレンダリングされます:

- Introduction
- 1.  Executive Summary
- 2.  Company Overview

Code example

string md = MarkdownConverter.ToMarkdown("report.docx");
MarkdownConverter.ToFile("report.docx", "report.md");
IReadOnlyList<FileFormat> formats = MarkdownConverter.GetSupportedFormats();

How to get the update

NuGet

NuGet を使用して最新の GroupDocs.Markdown パッケージにアップグレードします(例: Install-Package GroupDocs.Markdown)。

Resources