Skip to main content

GroupDocs.Markdown for Python via .NET - Markdown processing and conversion API

Project description

banner

PyPI PyPI - Python Version

Product Page | Docs | API Reference | Examples | Blog | Free Support | Temporary License

GroupDocs.Markdown for Python via .NET is a Markdown processing and conversion API. Convert documents to Markdown and Markdown back to other formats with full control over formatting, flavors, and rendering.

Get Started

pip install groupdocs-markdown-net
from groupdocs.markdown import MarkdownConverter

md = MarkdownConverter.to_markdown("document.docx")
print(md)

How It Works

The package is a self-contained Python wheel that includes everything needed to process documents. No external software installation is required - just pip install and start converting. The wheel works across Python 3.5 - 3.14 on Windows, Linux, and macOS (Intel + Apple Silicon).

Features

  • Document to Markdown: Convert DOCX, PDF, XLSX, PPTX, HTML, EPUB and 20+ formats to Markdown.
  • Markdown to Document: Convert Markdown back to PDF, DOCX, and other formats.
  • Markdown Flavors: CommonMark and GitHub Flavored Markdown (GFM).
  • Spreadsheet Control: Max rows, columns, sheet separator, hidden sheets.
  • Heading & Metadata: Heading level offset, YAML front matter.
  • Cross-Platform: Windows x64/x86, Linux x64, macOS x64/ARM64.

Supported Conversions

Source Format Examples
Word Processing DOCX, DOC, RTF, ODT
PDF PDF
Spreadsheets XLSX, XLS, ODS, CSV
Presentations PPTX, PPT, ODP
eBooks EPUB, MOBI, AZW3
Web HTML, MHTML, CHM
Text TXT, XML

Examples

Convert to Markdown String

from groupdocs.markdown import MarkdownConverter

md = MarkdownConverter.to_markdown("./report.docx")
print(md)

Save Markdown to File

from groupdocs.markdown import MarkdownConverter

MarkdownConverter.to_file("./report.pdf", "./report.md")

Convert with Options

from groupdocs.markdown import MarkdownConverter, ConvertOptions, MarkdownFlavor, SkipImagesStrategy

with MarkdownConverter("./document.docx") as converter:
    options = ConvertOptions()
    options.flavor = MarkdownFlavor.GIT_HUB
    options.heading_level_offset = 1
    options.include_front_matter = True
    options.image_export_strategy = SkipImagesStrategy()

    result = converter.convert(options)
    print(result.content)

Convert with Load Options

from groupdocs.markdown import MarkdownConverter, LoadOptions

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

md = MarkdownConverter.to_markdown("./protected.docx", load_options=load_opts)
print(md)

Get Document Info

from groupdocs.markdown import MarkdownConverter

info = MarkdownConverter.get_info("./document.docx")
print(f"Format: {info.file_format}")
print(f"Pages: {info.page_count}")

Convert from Stream / BytesIO

import io
from groupdocs.markdown import MarkdownConverter, ConvertOptions, SkipImagesStrategy

with open("document.docx", "rb") as stream:
    with MarkdownConverter(stream) as converter:
        result = converter.convert(ConvertOptions())
        print(result.content)

buf = io.BytesIO(downloaded_bytes)
with MarkdownConverter(buf) as converter:
    options = ConvertOptions()
    options.image_export_strategy = SkipImagesStrategy()
    result = converter.convert(options)
    print(result.content)

Spreadsheet Options

from groupdocs.markdown import MarkdownConverter, ConvertOptions, SkipImagesStrategy

with MarkdownConverter("./data.xlsx") as converter:
    options = ConvertOptions()
    options.max_columns = 10
    options.max_rows = 50
    options.include_hidden_sheets = False
    options.image_export_strategy = SkipImagesStrategy()

    result = converter.convert(options)
    print(result.content)

AI Agent & LLM Friendly

This package is designed for seamless integration with AI agents, LLMs, and automated code generation tools.

  • AGENTS.md in the package — AI coding assistants (Claude Code, Cursor, GitHub Copilot) auto-discover the API surface, usage patterns, and troubleshooting tips from the installed package
  • MCP server — connect your AI tool to GroupDocs documentation for on-demand API lookups:
    { "mcpServers": { "groupdocs-docs": { "url": "https://docs.groupdocs.com/mcp" } } }
    
  • Machine-readable docs — full documentation available as plain text for RAG and LLM context:
    • Single file: https://docs.groupdocs.com/markdown/python-net/llms-full.txt
    • Per page: append .md to any docs URL
  • Markdown output for RAG — clean, structured Markdown is the preferred input for LLMs and embedding pipelines

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"

Troubleshooting

Issue Platform Fix
DllNotFoundException: libSkiaSharp macOS Stale system copy — rename: sudo mv /usr/local/lib/libSkiaSharp.dylib{,.bak}
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT errors Linux Do NOT set this variable. Install ICU: apt-get install libicu-dev
TypeLoadException Any Reinstall: pip install --force-reinstall groupdocs-markdown-net

System Requirements

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

groupdocs_markdown_net-26.3.0-py3-none-win_amd64.whl (58.6 MB view details)

Uploaded Python 3Windows x86-64

groupdocs_markdown_net-26.3.0-py3-none-macosx_11_0_arm64.whl (57.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

groupdocs_markdown_net-26.3.0-py3-none-macosx_10_14_x86_64.whl (60.0 MB view details)

Uploaded Python 3macOS 10.14+ x86-64

File details

Details for the file groupdocs_markdown_net-26.3.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for groupdocs_markdown_net-26.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5c153247a8faac59cdd259ebdc7682c80f682186916a2faf63d4658485842a24
MD5 bdfdf8bcf23e22c056d0c6a2144449b4
BLAKE2b-256 85c19387de043ecee69b9f9ce383324e278bda79aba48b6d5b916c1da9d2e8bc

See more details on using hashes here.

File details

Details for the file groupdocs_markdown_net-26.3.0-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for groupdocs_markdown_net-26.3.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 79c1cab5e795bae2798a5e8a221ed20e21572d82abd35cb42d6f00f2bd78055f
MD5 ade40b749ca2fd25b5b091d9c3323c60
BLAKE2b-256 3647076e27766d75d9f6a793a06e3a3e0e2559d753740cd07e0fd45eaf475693

See more details on using hashes here.

File details

Details for the file groupdocs_markdown_net-26.3.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for groupdocs_markdown_net-26.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e67b545096aaed359802c8e6bc07bddfbf8024b0b7bf9630f44908ba185db246
MD5 49471fd2458a264607480991ff96b2ef
BLAKE2b-256 cf868995e5409a42ca053ac3c7105494da4b14f2aa97b995be39764cb56cd027

See more details on using hashes here.

File details

Details for the file groupdocs_markdown_net-26.3.0-py3-none-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for groupdocs_markdown_net-26.3.0-py3-none-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 14d7489737613bf0f162deabf90c341b3170b696e01cb0fa8272201a77e732ae
MD5 6cd41539e9d48da94a1381cb86270ac3
BLAKE2b-256 43c09372507ba6aaaaaaf4702a2e00830b393e9bf70b944e0eb04568f9b455f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page