GroupDocs.Conversion for Python via .NET 26.9 Release Notes
This release upgrades GroupDocs.Conversion engine from 26.3 to 26.8. It adds the ConversionEvents API for observing a conversion as it runs, support for XAR archives and draw.io / Mermaid diagrams, and several new load and convert options. It also fixes a long-standing defect that made every delegate-typed property impossible to assign from Python.
The API surface is almost entirely additive, with two breaking changes to check before upgrading: the duplicate groupdocs.conversion.file_types module is gone (use groupdocs.conversion.filetypes), and PdfOptions.remove_pdf_acompliance is now remove_pdf_a_compliance. Both are one-line fixes — see API Changes.
Full List of Changes in This Release
| Key | Category | Summary |
|---|---|---|
| CONVERSIONPYTHON‑93 | Feature | Add support for ConversionEvents to observe start, progress, per-page and per-document completion, failures and font substitution |
| CONVERSIONPYTHON‑94 | Feature | Add support for new formats — XAR archives, draw.io diagrams and Mermaid (.mmd) diagrams |
| CONVERSIONPYTHON‑95 | Feature | Add CadLoadOptions.layout_scope to restrict CAD conversion to model space, paper-space layouts, or both |
| CONVERSIONPYTHON‑96 | Feature | Add MarkdownOptions.image_saving_callback to control where images extracted to Markdown are written |
| CONVERSIONPYTHON‑97 | Feature | Add EmailLoadOptions.page_layout_options and WebLoadOptions.margin_settings / orientation_settings / size_settings |
| CONVERSIONPYTHON‑98 | Feature | Add ImageConvertOptions.min_resolution and cap_resolution_to_page_content |
| CONVERSIONPYTHON‑99 | Feature | Add WordProcessingLoadOptions.auto_detect_rtl_direction |
| CONVERSIONPYTHON‑100 | Feature | Add MissingDependencyException for a clearer failure when an optional engine dependency is absent |
| CONVERSIONPYTHON‑101 | Enhancement | Update GroupDocs.Conversion engine from 26.3 to 26.8 |
| CONVERSIONPYTHON‑102 | Enhancement | Remove the duplicate groupdocs.conversion.file_types module — use groupdocs.conversion.filetypes |
| CONVERSIONPYTHON‑103 | Enhancement | Rename PdfOptions.remove_pdf_acompliance to remove_pdf_a_compliance |
| CONVERSIONPYTHON‑104 | Enhancement | Add a Developer Guide section and groupdocs.conversion.integration.* pages to the API reference |
| CONVERSIONPYTHON‑91 | Fix | Cannot import module when using Python 3.5 – 3.7 |
| CONVERSIONPYTHON‑92 | Fix | Runtime error when passing Enum argument in Python versions 3.8 – 3.10 |
| CONVERSIONPYTHON‑105 | Fix | Indexer item on *DocumentInfo and PossibleConversions is a property and cannot be called |
| CONVERSIONPYTHON‑106 | Fix | Delegate-typed properties cannot be assigned from Python (Object must implement IConvertible) |
| CONVERSIONPYTHON‑107 | Fix | Delegate-typed properties are annotated with the wrong type in stubs and docstrings |
Major Features
Conversion events
ConversionEvents lets you observe a conversion while it runs — progress, per-page and per-document completion, failures, and font substitution. Attach ordinary Python functions:
from groupdocs.conversion import ConversionEvents, Converter, ConverterSettings
from groupdocs.conversion.options.convert import PdfConvertOptions
events = ConversionEvents()
events.on_conversion_started = lambda: print("started")
events.on_conversion_progress = lambda percent: print(f"{percent}%")
events.on_document_converted = lambda ctx: print("document done")
events.on_font_substituted = lambda ctx: print(
f"{ctx.original_font_name} -> {ctx.substitute_font_name} ({ctx.reason})")
events.on_conversion_completed = lambda: print("completed")
with Converter("business-plan.docx", ConverterSettings(), events) as converter:
converter.convert("business-plan.pdf", PdfConvertOptions())
Note the constructor takes (path, settings, events) — there is no (path, events) overload, so pass a ConverterSettings() even when you do not need to configure anything.
The available hooks are on_conversion_started, on_conversion_progress, on_conversion_completed, on_document_converted, on_document_failed, on_page_converted, on_page_failed, on_compression_completed and on_font_substituted.
New formats
| Format | File type constant | Notes |
|---|---|---|
| XAR archive | CompressionFileType.XAR | Also XarDocumentInfo for inspection |
| draw.io diagram | DiagramFileType.DRAWIO | |
| Mermaid diagram | DiagramFileType.MMD |
CAD layout scope
from groupdocs.conversion.options.load import CadLayoutScope, CadLoadOptions
load_options = CadLoadOptions()
load_options.layout_scope = CadLayoutScope.MODEL # MODEL | LAYOUTS | BOTH
BOTH is the default and does not restrict the conversion.
API Changes
New classes
| Class | Module |
|---|---|
ConversionEvents | groupdocs.conversion |
FontSubstitutionContext | groupdocs.conversion.contracts |
XarDocumentInfo | groupdocs.conversion.contracts |
MissingDependencyException | groupdocs.conversion.exceptions |
CadLayoutScope | groupdocs.conversion.options.load |
IPageLayoutOptions | groupdocs.conversion.options.load |
MarkdownImageSavingArgs, IMarkdownImageSavingCallback | groupdocs.conversion.options.convert |
IConversionHandlersStage, IConversionByPageHandlersStage | groupdocs.conversion.fluent |
New members on existing classes
FluentConverter.with_events(...), and the same onIConversionFromandIConversionSettingsConverter(...)— four new constructor overloads accepting aConversionEventsCadLoadOptions.layout_scopeEmailLoadOptions.page_layout_optionsWebLoadOptions.margin_settings,.orientation_settings,.size_settingsMarkdownOptions.image_saving_callbackImageConvertOptions.min_resolution,.cap_resolution_to_page_contentWordProcessingLoadOptions.auto_detect_rtl_directionCompressionFileType.XAR,DiagramFileType.DRAWIO,DiagramFileType.MMD
Removed — groupdocs.conversion.file_types
The module groupdocs.conversion.file_types and its 23 classes are gone. The classes
themselves are not — every one of them still exists, unchanged, in
groupdocs.conversion.filetypes.
file_types was a duplicate that shipped by accident. Both modules defined the same 23
classes and both mapped to the same underlying GroupDocs.Conversion.FileTypes.* types,
but only filetypes was ever exported from the package root, and only filetypes was
kept up to date. 26.9.0 drops the stale copy.
If you imported from it, change the import — nothing else:
# before
from groupdocs.conversion.file_types import WordProcessingFileType
# after
from groupdocs.conversion.filetypes import WordProcessingFileType
The API reference pages under /conversion/python-net/groupdocs.conversion.file_types/
are removed for the same reason; use
groupdocs.conversion.filetypes.
Renamed — PdfOptions.remove_pdf_acompliance
# before
options.remove_pdf_acompliance = True
# after
options.remove_pdf_a_compliance = True
The underlying .NET property (RemovePdfACompliance) did not change; the Python spelling
did, so that PDF/A reads as pdf_a rather than pdf + acompliance. This is the only
renamed member in the release.
Fixed
Python 3.5 – 3.10 now actually work
The wheel has always declared python_requires = ">=3.5,<3.15". Until this release it did not deliver it: 26.5.0 works only on Python 3.11 and newer.
| Python | 26.5.0 | 26.9.0 |
|---|---|---|
| 3.5 | Fails to import — 24 of 33 shipped modules do not compile | Works |
| 3.6 | Fails to import — 22 of 33 modules do not compile | Works |
| 3.7 | Fails at runtime — AttributeError: module 'typing' has no attribute 'get_origin' on the first overloaded call | Works |
| 3.8 – 3.10 | Fails at runtime whenever an enum argument is passed | Works |
| 3.11 – 3.14 | Works | Works |
Two separate defects, both fixed:
- On 3.5 and 3.6 the generated sources used syntax those versions do not have (
from __future__ import annotations, f-strings), so the package could not even be imported. - On 3.7 – 3.10 an enum argument was serialised by name rather than by value, producing
[FileType.DOCX, …]instead of[3, …]— not valid JSON, so the call was rejected before it reached the engine. Passing aFileTypeor any options enum is routine, so in practice most calls failed. From 3.11 Python returns the bare number fromstr()on anIntEnum, which is why newer versions were unaffected.
If you are on Python 3.10 or earlier, 26.9.0 is the first release you can actually use.
Indexers are callable again
Classes with a .NET indexer — every *DocumentInfo type and PossibleConversions —
exposed it as a property named item. A property cannot take an index, so there was no
way to actually use it. It is now a method plus the normal Python subscript:
info = converter.get_document_info()
value = info.get("Author") # or: info["Author"]
An API-surface diff against 26.5.0 reports this as 60 removed properties. Nothing was
lost — item was never callable.
Delegate-typed properties could not be assigned
Assigning a Python function to any property whose .NET type is a delegate raised:
GroupDocsConversionException: Object must implement IConvertible.
This affected 17 properties, including every ConversionEvents hook and, in earlier releases, ConverterSettings.on_conversion_failed, ConverterSettings.on_conversion_by_page_failed, ConverterSettings.on_compression_completed, WebLoadOptions.configure_headers, WebLoadOptions.credentials_provider, XmlLoadOptions.xsl_fo_factory, XmlLoadOptions.xslt_factory and EmailConvertOptions.attachment_content_handler. Those eight were affected in 26.5 and 26.6 as well; all of them now work.
Misleading type annotations on those properties
The same properties were annotated with the wrong type — on_page_converted was typed as taking a ConvertedPageContext when it takes a callback receiving one, and on_conversion_progress was typed int. They are now annotated Callable. This changes eight type annotations; it does not change any runtime behaviour that previously worked, because assignment previously raised.
Documentation
- The API reference now carries a Developer Guide section with task-oriented, runnable Python examples.
- Reference pages were added for
groupdocs.conversion.integration.audio,.heic,.ocrand.video, which had no documentation previously.
Requirements
- Python 3.5 – 3.14 (
python_requires = ">=3.5,<3.15") — every version in that range is exercised in CI; see Fixed if you are upgrading from 26.5 or earlier on Python 3.10 or below - Windows, Linux or macOS (Intel and Apple Silicon) — no Microsoft Office or Adobe Acrobat required
- The .NET runtime is embedded in the wheel; no separate install is needed
Wheel Distribution
| Platform | Wheel |
|---|---|
| Windows x64 | groupdocs_conversion_net-26.9.0-py3-none-win_amd64.whl |
| Linux x64 | groupdocs_conversion_net-26.9.0-py3-none-manylinux1_x86_64.whl |
| macOS Intel | groupdocs_conversion_net-26.9.0-py3-none-macosx_10_14_x86_64.whl |
| macOS Apple Silicon | groupdocs_conversion_net-26.9.0-py3-none-macosx_11_0_arm64.whl |
pip install groupdocs-conversion-net==26.9.0
Additional Resources
Feedback
Questions and issues are welcome on the GroupDocs.Conversion forum.