GroupDocs.Markdown for .NET 26.3 Release Notes
This is a major release with a redesigned public API, custom DOM-based Markdown renderer, full Markdown flavor control, async API, and numerous bug fixes. The release also adds .NET 8 and .NET 10 support with per-TFM NuGet runtime packages.
Full list of changes 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 |
Major Features
Custom DOM-Based Markdown Renderer
The library no longer delegates Markdown generation to a third-party export. A custom renderer walks the document object model node by node and produces Markdown directly, providing full control over every aspect of the output.
Word/PDF/Ebook/Text/CHM documents are rendered with support for paragraphs, headings (H1-H6), bold, italic, strikethrough, inline code, ordered and unordered lists with nesting, tables (GFM pipe syntax or CommonMark code block fallback), hyperlinks, and images.
Spreadsheets are rendered with cell-by-cell grid traversal, typed value formatting, worksheet sections, column/row truncation with ellipsis indicators, hidden sheet filtering, and custom sheet separators.
Static Convenience Methods
One-liner conversion methods that handle resource management automatically:
string md = MarkdownConverter.ToMarkdown("report.docx");
MarkdownConverter.ToFile("report.docx", "report.md");
IReadOnlyList<FileFormat> formats = MarkdownConverter.GetSupportedFormats();
Async API
Async counterparts for all static and instance methods with CancellationToken support:
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
Retrieve document metadata without performing a full conversion:
DocumentInfo info = MarkdownConverter.GetInfo("report.docx");
Console.WriteLine($"{info.FileFormat}, {info.PageCount} pages, by {info.Author}");
Markdown Flavor Control
Target a specific Markdown dialect:
var options = new ConvertOptions { Flavor = MarkdownFlavor.GitHub }; // pipe tables, strikethrough
var options = new ConvertOptions { Flavor = MarkdownFlavor.CommonMark }; // tables as code blocks
Spreadsheet Rendering Options
Full control over how spreadsheets are rendered to 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 // prepend YAML metadata
};
Conversion Warnings and Unified Error Model
All Convert() methods now throw on failure. ConvertResult carries non-fatal warnings:
ConvertResult result = converter.Convert();
foreach (string w in result.Warnings)
Console.WriteLine(w); // e.g. "Worksheet 'Data' truncated at 50 rows."
Image Replacement and Relative Paths
Replace images during conversion and control path references:
var strategy = new ExportImagesToFileSystemStrategy("c:/output/images")
{
ImagesRelativePath = "images" // 
};
Table of Contents Rendering
Documents with Table of Contents are rendered as clean lists instead of raw field codes:
- Introduction
- 1. Executive Summary
- 2. Company Overview
Bug Fixes
- Table of Contents field codes no longer leak as raw text (PAGEREF, HYPERLINK \l, TOC \o instructions). TOC entries are rendered as a plain list.
- Bold whitespace artifacts (
** **) reduced through whitespace-aware formatting and post-processing cleanup. - Control characters stripped from output — no more invisible characters in the Markdown.
- Table cell field codes no longer leak — cells are rendered through the inline content renderer instead of raw
GetText(). - Uppercase file extensions (.PDF, .XLSX) are now recognized via case-insensitive matching.
- Hyperlink field codes no longer leak as
HYPERLINK "http://..."in the output. - Internal bookmarks rendered as plain text instead of broken
\lreferences. - Stack overflow via reflection fixed by removing the IoC container.
- FileStream leak in the file-path constructor fixed with proper
usingblock. - Generic error messages replaced with actual exception messages from the underlying library.
- Out-of-range page numbers skipped gracefully instead of causing failure.
- Custom exceptions (
DocumentProtectedException,InvalidFormatException) now properly thrown.
Breaking Changes
Renamed Types
| Before | After |
|---|---|
DocumentConverterOptions | ConvertOptions |
DocumentConverterResult | ConvertResult |
FileFormat Enum
Family-level values (FileFormat.WordProcessing, FileFormat.Spreadsheet) replaced with specific formats (FileFormat.Docx, FileFormat.Xlsx, etc.). New entries: FileFormat.Txt, FileFormat.Chm.
ConvertOptions and LoadOptions Separated
ConvertOptions no longer inherits LoadOptions. Password and format hints go on 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
Single ExportStrategy property replaced with two typed properties:
var options = new ConvertOptions
{
ImageExportStrategy = new ExportImagesToFileSystemStrategy("images"),
UriExportStrategy = new CustomUriExportStrategy(handler)
};
Delegates Replaced with Interfaces
CustomImagesStrategy and CustomUriExportStrategy now accept IImageSavingHandler and IUriSavingHandler interfaces instead of delegate callbacks.
LoadOptions.Extension and LoadOptions.MimeType Are Internal
Use new LoadOptions(FileFormat.Docx) instead of setting Extension or MimeType directly.
Public API changes
New public types
DocumentInfo— document metadata (format, page count, title, author, encryption status)MarkdownFlavor— enum for target Markdown dialect (GitHub, CommonMark)IImageSavingHandler— interface for custom image saving callbacksIUriSavingHandler— interface for custom URI saving callbacksGroupDocsMarkdownException— general conversion exceptionInvalidFormatException— corrupt or unrecognized file formatDocumentProtectedException— wrong or missing password
New static methods on MarkdownConverter
ToMarkdown(string sourcePath)and overloads withLoadOptions/ConvertOptionsToFile(string sourcePath, string outputPath)and overloadsGetInfo(string sourcePath)and overloadsGetSupportedFormats()- Async variants:
ToMarkdownAsync,ToFileAsync,GetInfoAsync
New instance methods on MarkdownConverter
GetDocumentInfo()ConvertAsync()and overloads
New properties on ConvertOptions
ImageExportStrategy(replacesExportStrategy)UriExportStrategyHeadingLevelOffsetIncludeFrontMatterFlavorMaxColumns,MaxRows,SheetSeparator,IncludeHiddenSheets
New properties on ConvertResult
Warnings— non-fatal conversion warnings
New properties on ExportImagesToFileSystemStrategy and CustomImagesStrategy
ImagesRelativePath— controls the path written in Markdown image references
New methods on CustomImageSavingArgs
SetReplacementImage(Stream imageStream)— substitute image content
Removed types
IExportStrategy— replaced byIImageExportStrategyandIUriExportStrategyDocumentConverterOptions— renamed toConvertOptionsDocumentConverterResult— renamed toConvertResult
Requirements
- .NET 6.0+, .NET 8.0+, .NET 10.0+ (Windows or Linux)
- .NET Framework 4.6.2+ (Windows)
License
See detailed legal information, including terms of use, copyright, EULA, and privacy policy:
https://about.groupdocs.com/legal/
Support
For questions or technical assistance, please use our Free Support Forum.