Skip to main content

banner

PyPI PyPI - Python Version

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

GroupDocs.Editor for Python via .NET is a document-editing API built around an HTML round-trip: load a document, convert it to clean, editable HTML/CSS, edit that markup in any WYSIWYG editor or programmatically, then save it back to the original format — or convert it to another. It works with Word processing, spreadsheets, presentations, PDF, email, eBooks, and text/markup formats through one unified API, with no MS Office or OpenOffice installation required.

Get Started

pip install groupdocs-editor-net
from groupdocs.editor import Editor

with Editor("document.docx") as editor:
    editable = editor.edit()
    html = editable.get_body_content()
    print(html)

How It Works

The package is a self-contained Python wheel (~120 MB) that bundles the embedded .NET runtime and every native dependency (SkiaSharp, Aspose.Drawing) needed to load, render, and save documents. No external software installation is required — just pip install and start editing. The wheel works across Python 3.5 – 3.14 on Windows, Linux, and macOS (Intel + Apple Silicon).

Features

  • HTML round-trip editing — convert any supported document to editable HTML/CSS and save it back without losing fidelity.
  • Multi-format — Word processing, spreadsheets, presentations, PDF, email, eBooks, and text/markup, all behind one API.
  • Format conversion — save an edited document with a different *SaveOptions to convert it (e.g. DOCX → PDF, DOCX → Markdown) via the HTML intermediate.
  • Granular editing — edit a single worksheet, a single slide, or a page range; toggle pagination and language metadata.
  • Resource extraction — pull out a document's images, fonts, CSS, and audio as separate resources.
  • Document introspection — read format, page count, size, and encryption status without a full edit pass.
  • Form fields — inspect and update Word-processing form fields.
  • Cross-Platform — Windows x64/x86, Linux x64, macOS x64/ARM64.

Common Tasks

  • Round-trip edit a DOCX: open it, change the HTML body, save it back to DOCX
  • Convert a document to another format via HTML (DOCX → PDF, XLSX → HTML, MD → DOCX)
  • Edit one worksheet of a workbook or one slide of a deck at a time
  • Extract the embedded images, fonts, and stylesheets from a document
  • Read a file's format, page count, and encryption state before processing
  • Build an editable document from your own HTML and export it to Office formats

Supported File Formats

For a complete list, see supported formats.

Category Formats
Word Processing DOC, DOCX, DOCM, DOT, DOTX, DOTM, ODT, OTT, RTF, WordML, FlatOPC
Spreadsheets XLS, XLT, XLSX, XLSM, XLSB, XLTX, XLTM, XLAM, SpreadsheetML, ODS, FODS, SXC, DIF, CSV, TSV
Presentations PPT, PPTX, PPTM, PPS, PPSX, PPSM, POT, POTX, POTM, ODP, OTP
Fixed-Layout PDF, XPS
Email EML, EMLX, MSG, MBOX, MHT/MHTML, PST, OST, OFT, TNEF, ICS, VCF
eBooks EPUB, MOBI, AZW3
Text & Markup HTML, MHTML, CHM, XML, JSON, Markdown (MD), TXT

Examples

Open a document and extract its body content

from groupdocs.editor import Editor
from groupdocs.editor.options import WordProcessingLoadOptions

with Editor("input.docx", WordProcessingLoadOptions()) as editor:
    editable = editor.edit()
    body = editable.get_body_content()
    print("body length:", len(body))

Get document info

from groupdocs.editor import Editor

with Editor("input.docx") as editor:
    info = editor.get_document_info()
    print("Format:", info.format.name)
    print("Extension:", info.format.extension)
    print("Pages:", info.page_count)
    print("Size:", info.size, "bytes")
    print("Encrypted:", info.is_encrypted)

get_document_info() returns a lightweight view that supports both snake_case attribute access (shown above) and dict access (info["PageCount"], info["Format"]["Name"]) for the underlying PascalCase keys.

Edit with options (no pagination, keep language info)

from groupdocs.editor import Editor
from groupdocs.editor.options import WordProcessingLoadOptions, WordProcessingEditOptions

with Editor("input.docx", WordProcessingLoadOptions()) as editor:
    eo = WordProcessingEditOptions()
    eo.enable_pagination = False
    eo.enable_language_information = True
    html = editor.edit(eo).get_content()
    print(len(html))

Round-trip edit and save back to DOCX

from groupdocs.editor import Editor, EditableDocument
from groupdocs.editor.formats import WordProcessingFormats
from groupdocs.editor.options import WordProcessingSaveOptions

with Editor("input.docx") as editor:
    editable = editor.edit()
    edited_html = editable.get_embedded_html().replace("Subtitle", "Edited subtitle")
    after_edit = EditableDocument.from_markup(edited_html)
    editor.save(after_edit, "output.docx", WordProcessingSaveOptions(WordProcessingFormats.DOCX))

Convert via HTML: DOCX → PDF

from groupdocs.editor import Editor
from groupdocs.editor.options import PdfSaveOptions

with Editor("input.docx") as editor:
    editable = editor.edit()
    editor.save(editable, "output.pdf", PdfSaveOptions())

Edit a specific worksheet of a workbook

from groupdocs.editor import Editor
from groupdocs.editor.options import SpreadsheetLoadOptions, SpreadsheetEditOptions

with Editor("book.xlsx", SpreadsheetLoadOptions()) as editor:
    eo = SpreadsheetEditOptions()
    eo.worksheet_index = 0          # 0-based
    html = editor.edit(eo).get_body_content()
    print(len(html))

Load from a binary stream

import io
from groupdocs.editor import Editor
from groupdocs.editor.options import WordProcessingLoadOptions

with open("input.docx", "rb") as stream:
    with Editor(stream, WordProcessingLoadOptions()) as editor:
        html = editor.edit().get_content()
        print(len(html))

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/editor/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 these limitations:

  • Output is restricted: PDF output carries an evaluation watermark and other formats show an equivalent evaluation mark.
  • A page/document-count cap applies to processed documents.

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

from groupdocs.editor 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
System.Drawing.Common is not supported Linux/macOS apt-get install libgdiplus (Linux) or brew install mono-libgdiplus (macOS)
The type initializer for 'Gdip' threw an exception macOS brew install mono-libgdiplus
Garbled text / missing fonts in output 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

Also available for other platforms: .NET | Java | Node.js


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

Metadata

Release files for groupdocs-editor-net 26.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for groupdocs-editor-net 26.5.0
File
groupdocs_editor_net-26.5.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
groupdocs_editor_net-26.5.0-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details
groupdocs_editor_net-26.5.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
groupdocs_editor_net-26.5.0-py3-none-macosx_10_14_x86_64.whl Python 3 none macOS 10.14+ x86-64 Details

Total release size: 395.6 MB

Release files / groupdocs_editor_net-26.5.0-py3-none-win_amd64.whl

Download URL groupdocs_editor_net-26.5.0-py3-none-win_amd64.whl
Size 109.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
3ab682ad0039879a0f6b9cd4327c36264ecf78c10eb4aa15509361292c7c9056
BLAKE2b-256 checksum
How to use checksums
4d4f936ee37f0f65417b01e839fe17828550b2b7a69119c09cb4df7db3da7542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / groupdocs_editor_net-26.5.0-py3-none-manylinux1_x86_64.whl

Download URL groupdocs_editor_net-26.5.0-py3-none-manylinux1_x86_64.whl
Size 94.8 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
39ae885fc32c093c155b6dccc5d18c8575dcd15af4c1c484ea0fb531d091a12b
BLAKE2b-256 checksum
How to use checksums
db2a0a6c20c426bb53616bd851f80e139041e646522c4249671c12c70b7b55b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / groupdocs_editor_net-26.5.0-py3-none-macosx_11_0_arm64.whl

Download URL groupdocs_editor_net-26.5.0-py3-none-macosx_11_0_arm64.whl
Size 94.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
86ce9157617dd57eb7b1895a88b728a5b5fe203f45740a4d089a754af71b4095
BLAKE2b-256 checksum
How to use checksums
f7a83412f43d294e0e2f03362339f7ae1a260e8c8563c2f18b8f485dbe4cdf30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / groupdocs_editor_net-26.5.0-py3-none-macosx_10_14_x86_64.whl

Download URL groupdocs_editor_net-26.5.0-py3-none-macosx_10_14_x86_64.whl
Size 97.1 MB
Tags Python 3 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
7c1b76999aa204bb0aaf531c4d1337da90da5e9260015e3641f232068730597f
BLAKE2b-256 checksum
How to use checksums
00c21e4f162bd75d8b09cdbf7950dfb1c9ab80f95ae8be31d4e75f44727cd477
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

26.5.0 This release

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page