GroupDocs.Markdown for Python via .NET overview

What is GroupDocs.Markdown?

GroupDocs.Markdown for Python via .NET is a Python library that converts documents from 30+ formats (PDF, Word, Excel, EPUB, TXT, CHM) into clean, structured Markdown. It uses a custom DOM-based renderer that gives full control over every aspect of the output.

Designed for AI/ML workflows, static site generators, and document processing pipelines — Markdown is the ideal format for language models, text analysis tools, and content management systems.

Key capabilities

CapabilityDescription
30+ input formatsPDF, DOCX, DOC, XLSX, XLS, CSV, EPUB, MOBI, TXT, CHM, RTF, ODT, and more
Markdown flavorsGitHub Flavored Markdown or CommonMark
Image handlingBase64 embed, file system, skip, or custom with relative paths and image replacement
YAML front matterAuto-extract metadata for Jekyll, Hugo, Docusaurus
Document inspectionRead format, pages, title, author without converting
Spreadsheet controlColumn/row truncation, sheet separators, hidden sheet filtering
Heading offsetShift heading levels for content embedding
Async APINon-blocking conversion for web and serverless
Error handlingSpecific exception types and conversion warnings

Quick example

from groupdocs.markdown import MarkdownConverter, ConvertOptions, MarkdownFlavor

def quick_example():
    """Convert a Word document to Markdown with GitHub flavor and YAML front matter."""

    # One-liner
    md = MarkdownConverter.to_markdown("business-plan.docx")
    # # Quarterly Report
    #
    # ## Executive Summary
    #
    # This report covers the key initiatives...

    # With options
    options = ConvertOptions()
    options.flavor = MarkdownFlavor.GIT_HUB
    options.include_front_matter = True
    options.heading_level_offset = 1
    MarkdownConverter.to_file("business-plan.docx", "quick-example.md", convert_options=options)

if __name__ == "__main__":
    quick_example()

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

---
title: "Meridian Outdoor Co. — Business Plan"
author: "Meridian Outdoor Co."
format: Docx
pages: 5
---

![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAC0CAYAAABIf1IMAAAABHNCSVQICAgIfAhkiAAADcJJREFUeJzt3VFo3VWeB/BfF2EfdJraSWKkpovabiokaRZcfWiM4jCS0mELjvgwzlZt16fdlUFpKbLCgDKELQ7Oum+yNdYdH4StCLMkdBexSfow7sC0SUA7TZVJW0zbWI1OF/ap+xD+/97k/u/Nze1JbJLPBwo9/3vu/Z1/L5Qv55x7/uumJkauBQAAyfzZdz0AAIDVRsACAEhMwAIASEzAAgBI7Jaii//67/8dZ89dSlbkH576Qdy7+Y4F+6Wqq5566qmnnnrqqbdc9YoUBqyJyYsxevrcDQ2q1LdX/6
[TRUNCATED]

Download full output

Platform support

  • Windows, Linux, macOS
  • Python 3.5 or later
  • 64-bit interpreter

Get started

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.