Metadata-Version: 2.4
Name: groupdocs-markdown-net
Version: 26.3.0
Summary: GroupDocs.Markdown for Python via .NET - Markdown processing and conversion API
Author-email: GroupDocs <support@groupdocs.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://products.groupdocs.com/markdown/python-net/
Project-URL: Documentation, https://docs.groupdocs.com/markdown/python-net/
Keywords: markdown,md,convert,render,document,pdf,html,docx,groupdocs,dotnet
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Markup :: Markdown
Classifier: Topic :: Utilities
Requires-Python: <3.15,>=3.5
Description-Content-Type: text/markdown

[![banner](https://raw.githubusercontent.com/groupdocs/groupdocs.github.io/master/img/banners/groupdocs-markdown-python-net-banner.png)](https://docs.groupdocs.com/markdown/python-net/)

[![PyPI](https://img.shields.io/pypi/v/groupdocs-markdown-net)](https://pypi.org/project/groupdocs-markdown-net/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/groupdocs-markdown-net)](https://pypi.org/project/groupdocs-markdown-net/)

[Product Page](https://products.groupdocs.com/markdown/python-net/) | [Docs](https://docs.groupdocs.com/markdown/python-net/) | [API Reference](https://reference.groupdocs.com/markdown/) | [Examples](https://github.com/groupdocs-markdown/GroupDocs.Markdown-for-Python-via-.NET) | [Blog](https://blog.groupdocs.com/category/markdown/) | [Free Support](https://forum.groupdocs.com/c/markdown) | [Temporary License](https://purchase.groupdocs.com/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

```bash
pip install groupdocs-markdown-net
```

```python
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

```python
from groupdocs.markdown import MarkdownConverter

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

### Save Markdown to File

```python
from groupdocs.markdown import MarkdownConverter

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

### Convert with Options

```python
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

```python
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

```python
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

```python
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

```python
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:
  ```json
  { "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](https://purchase.groupdocs.com/temporary-license):

```python
from groupdocs.markdown import License
License().set_license("path/to/license.lic")
```

Or set the environment variable (auto-applied at import):
```bash
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).
