GroupDocs.Markdown for Python via .NET 26.3 Release Notes

This is the first public release of GroupDocs.Markdown for Python via .NET, shipped as a self-contained Python wheel on PyPI. The package brings the full capabilities of the underlying .NET library to Python — PDF, Word, Excel, eBook, and text files convert to clean Markdown with a single pip install and no external runtime dependencies.

Installation

pip install groupdocs-markdown-net

Quick start

from groupdocs.markdown import MarkdownConverter

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

Major Features

Pythonic API Surface

The entire .NET API is exposed through Python-native snake_case naming. Classes use PascalCase (matching Python conventions), methods and properties use snake_case, and enum values use UPPER_SNAKE_CASE.

from groupdocs.markdown import MarkdownConverter, ConvertOptions, MarkdownFlavor

options = ConvertOptions()
options.flavor = MarkdownFlavor.GIT_HUB
options.heading_level_offset = 1
options.include_front_matter = True

MarkdownConverter.to_file("report.docx", "report.md", convert_options=options)

Static Convenience Methods

One-liner conversions that handle resource management automatically:

md = MarkdownConverter.to_markdown("report.docx")
MarkdownConverter.to_file("report.docx", "report.md")
formats = MarkdownConverter.get_supported_formats()

Async API

Every static and instance method has an _async counterpart. File I/O is truly asynchronous and the CPU-bound conversion runs on a worker thread, so the asyncio event loop stays responsive:

import asyncio
from groupdocs.markdown import MarkdownConverter

async def convert_many():
    await asyncio.gather(
        MarkdownConverter.to_file_async("a.docx", "a.md", None),
        MarkdownConverter.to_file_async("b.pdf",  "b.md", None),
        MarkdownConverter.to_file_async("c.xlsx", "c.md", None),
    )

asyncio.run(convert_many())

Document Inspection Without Conversion

Retrieve document metadata without performing a full conversion — useful for file browsers, validation pipelines, and pre-conversion UIs:

info = MarkdownConverter.get_info("report.docx")
# info.file_format, info.page_count, info.title, info.author, info.is_encrypted

Markdown Flavor Control

Target a specific Markdown dialect:

options = ConvertOptions()
options.flavor = MarkdownFlavor.GIT_HUB     # pipe tables, strikethrough
options.flavor = MarkdownFlavor.COMMON_MARK  # tables as code blocks

Spreadsheet Rendering Options

Full control over how spreadsheets are rendered to Markdown:

options = ConvertOptions()
options.max_columns = 8
options.max_rows = 50
options.sheet_separator = "\n---\n"
options.include_hidden_sheets = False

Heading Level Offset and YAML Front Matter

Shift heading levels when embedding converted content inside a larger document, and auto-extract metadata for static site generators (Jekyll, Hugo, Docusaurus):

options = ConvertOptions()
options.heading_level_offset = 2   # # Title -> ### Title
options.include_front_matter = True  # prepend YAML metadata

Image Strategies

Four built-in strategies for image handling:

from groupdocs.markdown import (
    ExportImagesAsBase64Strategy,
    ExportImagesToFileSystemStrategy,
    SkipImagesStrategy,
    CustomImagesStrategy,
)

strategy = ExportImagesToFileSystemStrategy("output/images")
strategy.images_relative_path = "images"  # ![](images/img-001.png)

options = ConvertOptions()
options.image_export_strategy = strategy

Conversion Warnings and Unified Error Model

All convert() methods raise on failure. ConvertResult carries non-fatal warnings (e.g. spreadsheet truncation):

from groupdocs.markdown import (
    MarkdownConverter,
    DocumentProtectedException,
    InvalidFormatException,
    GroupDocsMarkdownException,
)

try:
    MarkdownConverter.to_file("annual-report.docx", "annual-report.md")
except DocumentProtectedException:
    print("Wrong or missing password.")
except InvalidFormatException:
    print("File is corrupt or unsupported.")
except GroupDocsMarkdownException as ex:
    print(f"Conversion failed: {ex}")

Loading from Streams and Password-Protected Documents

Load from any binary stream (file, network, database, upload) and unlock protected documents via LoadOptions:

from groupdocs.markdown import MarkdownConverter, LoadOptions, FileFormat

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

MarkdownConverter.to_file("protected.docx", "output.md", load_options=load_opts)

with open("document.docx", "rb") as stream:
    with MarkdownConverter(stream) as converter:
        converter.convert("output.md")

Context Manager Support

MarkdownConverter implements the context-manager protocol, so loaded documents are disposed deterministically:

with MarkdownConverter("report.docx") as converter:
    converter.convert("report.md")

AI Agent & LLM Friendly

The package is designed for seamless integration with AI coding assistants and LLM pipelines:

  • AGENTS.md bundled inside the installed wheel — Claude Code, Cursor, and GitHub Copilot auto-discover API surface, usage patterns, and troubleshooting hints.
  • Machine-readable docs at https://docs.groupdocs.com/markdown/python-net/llms-full.txt for RAG and LLM context.
  • Markdown output is the preferred input format for embeddings and retrieval pipelines.

Supported Input Formats

CategoryFormats
Word processingDOCX, DOC, DOCM, DOT, DOTX, DOTM, RTF, ODT, OTT
SpreadsheetXLSX, XLS, XLSB, XLSM, CSV, TSV, ODS, OTS
PDFPDF
eBookEPUB, MOBI
TextTXT
HelpCHM

Public API Surface

Classes

  • MarkdownConverter — main entry point, static and instance API, sync and async methods
  • ConvertOptions — conversion options (flavor, front matter, heading offset, image strategy, spreadsheet settings, page selection)
  • ConvertResult — result of an instance conversion, carries the Markdown content and warnings
  • LoadOptions — load options (explicit file format, password)
  • DocumentInfo — document metadata (file_format, page_count, title, author, is_encrypted)
  • License, Metered — licensing APIs

Image strategies

  • ExportImagesAsBase64Strategy (default) — inline images as Base64 data URIs
  • ExportImagesToFileSystemStrategy — save images to disk, optional relative path
  • SkipImagesStrategy — omit images entirely
  • CustomImagesStrategy — Python callable for rename/replace/redirect

Enums

  • MarkdownFlavorGIT_HUB, COMMON_MARK
  • FileFormat — DOCX, PDF, XLSX, EPUB, TXT, CHM, and more

Exceptions

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

Evaluation Mode

The API works without a license in evaluation mode with the following limitations:

  • Only the first 3 pages of a document are processed.
  • An evaluation watermark is added to the output.

To remove these limitations, apply a license or request a temporary license:

from groupdocs.markdown import License

License().set_license("path/to/license.lic")

Or set the environment variable (auto-applied at import):

export GROUPDOCS_LIC_PATH="path/to/license.lic"

System Requirements

  • Python: 3.5 - 3.14 (64-bit)
  • Platforms: Windows x64/x86, Linux x64, macOS x64/ARM64
  • No external dependencies on Windows. Linux/macOS may need ICU installed (see Troubleshooting).

Troubleshooting

IssuePlatformFix
DllNotFoundException: libSkiaSharpmacOSStale system copy — rename: sudo mv /usr/local/lib/libSkiaSharp.dylib{,.bak}
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT errorsLinuxDo NOT set this variable. Install ICU: apt-get install libicu-dev
TypeLoadExceptionAnyReinstall: pip install --force-reinstall groupdocs-markdown-net

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.