Markdown flavor control

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Markdown MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-markdown -- dnx GroupDocs.Markdown.Mcp --yes
Folders, licensing and more →

GroupDocs.Markdown supports two Markdown dialects. Call setFlavor on DocumentConvertOptions to control the output.

GitHub Flavored Markdown (default)

GFM supports pipe tables, strikethrough text, and other extensions:

import com.groupdocs.markdown.*;

public class FlavorGfm {

    public static void main(String[] args) {
        DocumentConvertOptions options = new DocumentConvertOptions();
        options.setFlavor(MarkdownFlavor.GITHUB);

        MarkdownConverter.toFile("business-plan.docx", "flavor-gfm.md", options);

        // Tables are rendered as:
        // | Column A | Column B |
        // | --- | --- |
        // | value1 | value2 |
    }
}

business-plan.docx is a sample file used in this example. Click here to download it.

![](data:...;base64,[elided])

**Meridian Outdoor Co. — Business Plan**

FY2026 Strategic Plan


# **Table of Contents**

FY2026 Strategic Plan	1
[TRUNCATED]

Download full output

CommonMark

Strict CommonMark output. Tables are rendered as fenced code blocks since CommonMark has no native table syntax:

import com.groupdocs.markdown.*;

public class FlavorCommonmark {

    public static void main(String[] args) {
        DocumentConvertOptions options = new DocumentConvertOptions();
        options.setFlavor(MarkdownFlavor.COMMON_MARK);

        MarkdownConverter.toFile("business-plan.docx", "flavor-commonmark.md", options);
    }
}

business-plan.docx is a sample file used in this example. Click here to download it.

![](data:...;base64,[elided])

**Meridian Outdoor Co. — Business Plan**

FY2026 Strategic Plan


# **Table of Contents**

FY2026 Strategic Plan	1
[TRUNCATED]

Download full output