Features overview

Overview

GroupDocs.Markdown for Python via .NET converts documents from various formats into clean, structured Markdown. It uses a custom DOM-based renderer that gives full control over every aspect of the output.

Supported Input Formats

Convert from 30+ document formats including Word (DOCX, DOC, RTF), Excel (XLSX, XLS, CSV), PDF, EPUB, MOBI, TXT, and CHM. See the full list of supported formats.

Key Features

Static Convenience Methods

One-liner conversions that raise on failure — no result-checking ceremony:

md = MarkdownConverter.to_markdown("business-plan.docx")
MarkdownConverter.to_file("business-plan.docx", "output.md")

Markdown Flavor Control

Target GitHub Flavored Markdown (pipe tables, strikethrough) or strict CommonMark:

options = ConvertOptions()
options.flavor = MarkdownFlavor.GIT_HUB

Flexible Image Handling

Choose how images are processed during conversion:

  • Base64 embedding — images inline in the Markdown (default)
  • File system export — save images to disk with relative paths
  • Skip — omit images from the output
  • Custom — rename, replace, or redirect images via a Python callable

YAML Front Matter

Extract document metadata into YAML front matter for static site generators (Jekyll, Hugo, Docusaurus):

options = ConvertOptions()
options.include_front_matter = True

Heading Level Offset

Shift all heading levels when embedding converted content inside a larger document:

options = ConvertOptions()
options.heading_level_offset = 2
# # Title -> ### Title

Spreadsheet Options

Control how Excel and CSV tables are rendered:

  • Column and row truncation with ellipsis indicators
  • Custom sheet separators
  • Hidden worksheet filtering

Document Inspection

Retrieve document metadata (format, page count, title, author) without performing a full conversion:

info = MarkdownConverter.get_info("business-plan.docx")

Page Selection

Convert specific pages or worksheets instead of the full document:

options = ConvertOptions()
options.page_numbers = [1, 3, 5]

Relative Image Paths

Control how image file paths appear in the Markdown output:

strategy = ExportImagesToFileSystemStrategy("output/images")
strategy.images_relative_path = "images"

Image Replacement

Replace images in the source document with different images during conversion using a custom image-saving handler.

Async API

All static and instance methods have async counterparts with true async file I/O:

md = await MarkdownConverter.to_markdown_async("business-plan.docx")

Proper Error Handling

Specific exception types for common error scenarios:

  • DocumentProtectedException — wrong or missing password
  • InvalidFormatException — corrupt or unrecognized file
  • GroupDocsMarkdownException — general conversion error

Conversion Warnings

Non-fatal issues are reported via ConvertResult.warnings — for example, when spreadsheet tables are truncated.

Password-Protected Documents

Load encrypted documents by providing a password via LoadOptions:

load_options = LoadOptions(FileFormat.DOCX)
load_options.password = "secret"

Cross-Platform Support

Works on Windows, Linux, and macOS with Python 3.5 or later (64-bit).

Close
Loading

Analyzing your prompt, please hold on...

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