Metadata-Version: 2.4
Name: groupdocs-conversion-net
Version: 26.9.0
Summary: GroupDocs.Conversion for Python via .NET - Document conversion API supporting 10,000+ format combinations
Author-email: GroupDocs <support@groupdocs.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://products.groupdocs.com/conversion/python-net/
Project-URL: Documentation, https://docs.groupdocs.com/conversion/python-net/
Keywords: conversion,convert,file,document,pdf,docx,xlsx,pptx,html,png,word,excel,powerpoint,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.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
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 :: 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-conversion-python-net-banner.png)](https://docs.groupdocs.com/conversion/python-net/)

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

[Product Page](https://products.groupdocs.com/conversion/python-net/) | [Docs](https://docs.groupdocs.com/conversion/python-net/) | [Demos](https://products.groupdocs.app/conversion/family) | [API Reference](https://reference.groupdocs.com/conversion/) | [Blog](https://blog.groupdocs.com/category/conversion/) | [Free Support](https://forum.groupdocs.com/c/conversion) | [Temporary License](https://purchase.groupdocs.com/temporary-license)

GroupDocs.Conversion for Python via .NET is a document conversion API that lets you easily convert the most popular file formats, including DOCX, XLSX, PPTX, PDF, CAD drawings, and many more. It preserves layout and formatting while offering customization options for each format.

## Get Started

```bash
pip install groupdocs-conversion-net
```

```python
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions

with Converter("document.docx") as converter:
    converter.convert("output.pdf", PdfConvertOptions())
```

## How It Works

The package is a self-contained Python wheel (~200 MB) 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

- **Wide Format Support**: Over 10,000 conversion pairs across Microsoft Office, PDF, HTML, images, CAD, and more.
- **Flexible Options**: Convert entire documents, specific pages, page ranges, or files within archives.
- **Format Detection**: Automatically detects input file format.
- **No External Dependencies**: No Microsoft Office or other software required.
- **Cross-Platform**: Windows x64/x86, Linux x64, macOS x64/ARM64.

## Supported File Formats

For a complete list, see [supported formats](http://docs.groupdocs.com/conversion/python-net/supported-file-formats/).

* **Microsoft Office** (Word, Excel, PowerPoint)
* **PDF** (Standard PDFs, PDF/A)
* **OpenDocument** (ODT, ODS, ODP)
* **Images** (JPEG, PNG, TIFF, BMP, SVG, WebP)
* **Email** (EML, MSG)
* **eBook** (EPUB, MOBI)
* **Text/Markup** (TXT, MD, HTML, MHTML)
* **AutoCAD** (DWG, DXF)

## Examples

### Convert DOCX to PDF

```python
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions

with Converter("./business-plan.docx") as converter:
    converter.convert("./business-plan.pdf", PdfConvertOptions())
```

### Convert with Advanced Options

```python
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions
from groupdocs.conversion.options.load import WordProcessingLoadOptions

load_options = WordProcessingLoadOptions()
load_options.password = "12345"

with Converter("./protected.docx", load_options) as converter:
    options = PdfConvertOptions()
    options.dpi = 300
    options.page_number = 1
    options.pages_count = 2
    converter.convert("./output.pdf", options)
```

### Get Document Info

```python
from groupdocs.conversion import Converter

with Converter("./document.pdf") as converter:
    info = converter.get_document_info()
    print(f"Pages: {info.pages_count}")
```

### Convert from Stream / BytesIO

```python
import io
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions

with open("document.docx", "rb") as stream:
    with Converter(stream) as converter:
        converter.convert("output.pdf", PdfConvertOptions())

buf = io.BytesIO(downloaded_bytes)
with Converter(buf) as converter:
    converter.convert("output.pdf", PdfConvertOptions())
```

## Command Line

Installing the wheel also puts `groupdocs-conversion` on `PATH`. Target format is inferred from the output extension; pass `--format` to override.

```bash
# Convert (extension picks the format)
groupdocs-conversion convert input.docx output.pdf
groupdocs-conversion convert input.docx page1.jpg --page 1 --count 1
groupdocs-conversion convert protected.docx out.pdf --password "secret"

# Inspect
groupdocs-conversion info input.pdf
groupdocs-conversion list-formats input.docx       # primary + secondary targets
groupdocs-conversion list-all-formats              # full source -> target matrix

# Apply a license up-front
groupdocs-conversion --license license.lic convert in.docx out.pdf

# Equivalent module form
python -m groupdocs.conversion convert in.docx out.pdf
```

Exit codes: `0` success, `2` user error (unknown format, missing input), `1` runtime error.

## 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/conversion/python-net/llms-full.txt`
  - Per page: append `.md` to any docs URL

## Evaluation Mode

The API works without a license in evaluation mode with the following limitations:
- A watermark is added to output documents.
- Only the first 3 pages are processed.

To remove these limitations, apply a license or request a [temporary license](https://purchase.groupdocs.com/temporary-license):

```python
from groupdocs.conversion 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 |
|---|---|---|
| Garbled text or missing fonts in PDF | Linux | `apt-get install ttf-mscorefonts-installer fontconfig && fc-cache -f` |
| `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` errors | Linux | Do NOT set this variable. ICU must be available. |

## System Requirements

- Python 3.5 - 3.14
- Windows x64/x86, Linux x64, macOS x64/ARM64

## More Resources

- [Documentation](http://docs.groupdocs.com/conversion/python-net/)
- [Code Examples](https://github.com/groupdocs-conversion/GroupDocs.Conversion-for-Python-via-.NET)
- [Free Support Forum](https://forum.groupdocs.com/c/conversion)
- [Temporary License](https://purchase.groupdocs.com/temporary-license)

Also available for other platforms:
[.NET](https://products.groupdocs.com/conversion/net/) | [Java](https://products.groupdocs.com/conversion/java/) | [Node.js](https://products.groupdocs.com/conversion/nodejs-java/)

---

[Product Page](https://products.groupdocs.com/conversion/python-net/) | [Docs](https://docs.groupdocs.com/conversion/python-net/) | [Demos](https://products.groupdocs.app/conversion/family) | [API Reference](https://reference.groupdocs.com/conversion/) | [Blog](https://blog.groupdocs.com/category/conversion/) | [Free Support](https://forum.groupdocs.com/c/conversion) | [Temporary License](https://purchase.groupdocs.com/temporary-license)
