GroupDocs.Markdown for Java 26.5 Release Notes

This is a major release introducing a redesigned public API, custom DOM-based Markdown renderer, Markdown flavor control, document inspection, URI resource support, and numerous quality improvements and bug fixes.

Full list of changes in this release

KeyCategorySummary
MARKDOWNJAVA-33FeatureRedesigned API and conversion workflow
MARKDOWNJAVA-32FeatureSupport URI resource
MARKDOWNJAVA-31FeatureCustom DOM-based Markdown renderer
MARKDOWNJAVA-30FeatureConversion warnings and unified error model
MARKDOWNJAVA-29FeatureRelative image paths and image replacement
MARKDOWNJAVA-28FeatureHeading level offset and YAML front matter generation
MARKDOWNJAVA-27FeatureMarkdown flavor control and spreadsheet rendering options
MARKDOWNJAVA-26FeatureDocument inspection without conversion
MARKDOWNJAVA-25FeatureStatic convenience methods and format discovery
MARKDOWNJAVA-24Bug FixQuality and functional issues

Major Features

Custom DOM-Based Markdown Renderer

The library now uses a custom DOM-based renderer for Markdown generation, providing full control over document rendering without relying on third-party export pipelines.

Word/PDF/Ebook/Text/CHM documents are rendered with support for paragraphs, headings (H1-H6), bold, italic, strikethrough, inline code, ordered and unordered lists, tables, hyperlinks, and images.

Spreadsheets are rendered with configurable worksheet traversal, value formatting, sheet separators, hidden sheet filtering, and row/column truncation.

URI Resource Support

Markdown documents can now be loaded directly from web addresses without requiring local download beforehand.

MarkdownConverter converter =
        new MarkdownConverter(new URI("https://example.com/document.md"));

Static Convenience Methods

Simple one-line APIs for common scenarios:

String md = MarkdownConverter.toMarkdown("report.docx");

MarkdownConverter.toFile("report.docx","report.md");

List<FileFormat> formats = MarkdownConverter.getSupportedFormats();

Document Inspection Without Conversion

Retrieve document metadata without performing conversion:

DocumentInfo info = MarkdownConverter.getInfo("report.docx");

System.out.

println(info.getFileFormat() + ", " + info.getPageCount() + " pages");

Markdown Flavor Control

Choose the target Markdown dialect:

DocumentConvertOptions options = new DocumentConvertOptions();
options.setFlavor(MarkdownFlavor.GITHUB);

or

DocumentConvertOptions options = new DocumentConvertOptions();
options.setFlavor(MarkdownFlavor.COMMON_MARK);

Spreadsheet Rendering Options

Control how spreadsheets are rendered to Markdown:

DocumentConvertOptions options = new DocumentConvertOptions();
options.setMaxColumns(8);
options.setMaxRows(50);
options.setSheetSeparator("\n---\n");
options.setIncludeHiddenSheets(false);

Heading Level Offset and YAML Front Matter

DocumentConvertOptions options = new DocumentConvertOptions();
options.setHeadingLevelOffset(2);
options.setIncludeFrontMatter(true);

Conversion Warnings and Unified Error Model

Conversion methods now throw exceptions on failure. Non-fatal warnings are returned through DocumentConvertResult.

DocumentConvertResult result = converter.convert();

for(String warning :result.getWarnings()) {
        System.out.println(warning);
}

Image Replacement and Relative Paths

Replace images during conversion and configure relative image paths:

ExportImagesToFileSystemStrategy strategy =
        new ExportImagesToFileSystemStrategy("output/images");

strategy.setImagesRelativePath("images");

Table of Contents Rendering

Table of Contents is now rendered as clean Markdown lists instead of raw field codes.

- Introduction
- Executive Summary
- Company Overview

Bug Fixes

  • Fixed leaking of raw Table of Contents field codes into Markdown output.
  • Reduced bold whitespace artifacts (** **) through improved formatting cleanup.
  • Removed invisible control characters from generated Markdown.
  • Fixed leaking of table cell field codes.
  • Added case-insensitive recognition of file extensions such as .PDF and .XLSX.
  • Fixed leaking of hyperlink field codes into output.
  • Improved handling of internal bookmarks.
  • Fixed potential stack overflow issues caused by reflection.
  • Fixed resource leaks during file processing.
  • Improved exception reporting with underlying error messages.
  • Fixed handling of out-of-range page numbers.
  • Improved support for password-protected documents.

Breaking Changes

FileFormat Enum Changes

Family-level values have been replaced with specific formats such as DOCX, XLSX, and TXT.

DocumentConvertOptions and LoadOptions Separated

Password and format hints are now configured through LoadOptions.

LoadOptions loadOptions = new LoadOptions(FileFormat.DOCX);

loadOptions.setPassword("secret");

DocumentConvertOptions convertOptions = new DocumentConvertOptions();

convertOptions.setHeadingLevelOffset(1);

MarkdownConverter converter =
        new MarkdownConverter("file.docx", loadOptions);

DocumentConvertResult result = converter.convert(convertOptions);

Image and URI Strategies Split

The single export strategy has been replaced with dedicated image and URI strategies.

DocumentConvertOptions options = new DocumentConvertOptions();

options.setImageExportStrategy(new ExportImagesToFileSystemStrategy("images"));

        options.setUriExportStrategy(new CustomUriExportStrategy(handler));

Handler Interfaces

Custom image and URI export logic now uses dedicated interfaces instead of callback delegates.

Public API Changes

New public types

  • DocumentInfo
  • MarkdownFlavor
  • IImageSavingHandler
  • IUriSavingHandler
  • GroupDocsMarkdownException
  • InvalidFormatException
  • DocumentProtectedException

New static methods on MarkdownConverter

  • toMarkdown()
  • toFile()
  • getInfo()
  • getSupportedFormats()

New instance methods on MarkdownConverter

  • getDocumentInfo()

New properties on DocumentConvertOptions

  • imageExportStrategy
  • uriExportStrategy
  • headingLevelOffset
  • includeFrontMatter
  • flavor
  • maxColumns
  • maxRows
  • sheetSeparator
  • includeHiddenSheets

New properties on DocumentConvertResult

  • warnings

New properties on ExportImagesToFileSystemStrategy

  • imagesRelativePath

New methods on CustomImageSavingArgs

  • setReplacementImage(InputStream imageStream)

Removed types

  • IExportStrategy
  • DocumentConverterOptions
  • DocumentConverterResult

Requirements

  • Java 8 or higher

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:

https://forum.groupdocs.com/