Browse our Products
Aspose.Words for Python via .NET 26.1 Release Notes
Major Features
There are 38 improvements and fixes in this regular monthly release. The most notable are:
- Document Conversion: Implemented a new export format allowing documents to be serialized as Docling JSON.
- AI Integration: Enhanced the Aspose.Words.AI namespace by allowing direct instantiation of the GoogleAiModel class.
- Document Merging: Added an option to the AppendDocument() method to explicitly define the SectionStart behavior for the first imported section.
- PDF Rendering: Extended PdfSaveOptions.PreserveFormFields functionality to be compatible with all PDF compliance standards (including PDF/A and PDF/UA).
Full List of Issues Covering all Changes in this Release
Expand to view the full list of issues.
- Allow to create instance of GoogleAiModel class directly
- Consider providing a build for .NET10
- Add support for loading of hyperlinks and bookmarks from MsoHtml
- Support editable form fields when exporting to PDF/UA
- Support PDF AcroForms tagging
- Preserve AcroForms when saving to PDF/A
- Convert Word to JSON in Parent Child Hierarchy
- Support OpenType Font Variations
- Circled numbers are rendered inaccurately
- Revision group calculated incorrectly
- PDF to DOCX layout differences
- StackOverflowException is thrown upon inserting PICT image in .NET Standard in x86 application
- Baskerville semi-bold is used instead of Baskerville regular
- Document comparison does not show the hyperlink object change
- UpdatePageLayout hangs
- ‘Roboto Lt’ is substituted with ‘Roboto’ when ‘Roboto Light’ is available
- List numbering is wrong after converting DOCX to PDF
- NullReferenceException is thrown upon converting node to HTML
- MsoHtml lists differs from MS Word’s result
- Import of MsoHtml lists differs from MS Word’s result
- Exception is thrown while converting MsoHtml to Docx
- TOC looks incorrect after updating
- Import of MsoHtml lists differs from MS Word’s result
- Formatting changes are not detected by Aspose.Words comparison
- Bookmark is lost after extracting page
- Resulted import of MsoHtml lists differs from MS Word’s
- Import of MsoHtml lists differs from MS Word’s result
- EQ field is rendered improperly
- Exception is thrown while converting MsoHtml to Docx
- Section start is changed after appending documents
- Take ImageSaveOptions.PageLayout into account when render PDF document
- Axis labels are rendered improperly
- ExtractPages does not split pages correctly
- Different behavior on .NET Standard
- Text is rendered with junk characters
- Japanese chart title became English upon conversion to PDF
- Table rendering inconsistency when save to DOCX and PDF
- Paragraph alignment is changed after appending document
Public API and Backward Incompatible Changes
This section lists public API changes that were introduced in Aspose.Words for Python via .NET 26.1. It includes not only new and obsoleted public methods, but also a description of any changes in the behavior behind the scenes in Aspose.Words for Python via .NET which may affect existing code. Any behavior introduced that could be seen as regression and modifies the existing behavior is especially important and is documented here.
Added ability to create instance of GoogleAiModel class directly
There are breaking changes in this update.
Now, you can create Aspose.Words.AI.GoogleAiModel class directly.
The following values are removed from Aspose.Words.AI.AiModelType enumaration:
- GEMINI_15_FLASH
- GEMINI_15_FLASH_8B
- GEMINI_15_PRO
- GEMINI_FLASH_LATEST
- GEMINI_PRO_LATEST
This use case explains how to create instance of GoogleAiModel class and summarize a document:
api_key = system_helper.environment.Environment.get_environment_variable('API_KEY')
model = aw.ai.GoogleAiModel(name='gemini-flash-latest', api_key=api_key)
doc = aw.Document(file_name=MY_DIR + 'Big document.docx')
summarize_options = aw.ai.SummarizeOptions()
summarize_options.summary_length = aw.ai.SummaryLength.VERY_SHORT
summary = model.summarize(doc=doc, options=summarize_options)Added option to control first imported section type in AppendDocument() method
A new append_document_with_new_page public option has been added into Aspose.Words.ImportFormatOptions class.
This use case explains how to preserve original section type while appending documents:
dst_doc = aw.Document()
src_doc = aw.Document()
src_doc.first_section.page_setup.section_start = aw.SectionStart.CONTINUOUS
options = aw.ImportFormatOptions()
options.append_document_with_new_page = False
dst_doc.append_document(src_doc=src_doc, import_format_mode=aw.ImportFormatMode.KEEP_SOURCE_FORMATTING, import_format_options=options)
self.assertEqual(aw.SectionStart.CONTINUOUS, dst_doc.sections[1].page_setup.section_start)Added PdfSaveOptions.preserve_form_fields support for all compliances
Previously form field export was not supported for PDF/A and PDF/UA compliances and PdfSaveOptions.PreserveFormFields was ignored. Now form field is supported for all available compliances.
Implemented ability to save documents as Docling JSON format
An ability to save documents as Docling JSON format (Deep Search document) has been implemented.
A new class DoclingSaveOptions has been implemented.
A new item DOCLING has been added to the SaveFormat enum type.
A new item DOCLING has been added to the WarningSource enum type.
This use case explains how to save document as Docling JSON:
doc = aw.Document(file_name=MY_DIR + 'Rendering.docx')
save_options = aw.saving.DoclingSaveOptions()
save_options.save_format = aw.SaveFormat.DOCLING
# Set to true to render non-image shapes and include them in the output.
# Set to false (default) to exclude non-image shapes from the output.
save_options.render_non_image_shapes = True
doc.save(file_name=ARTIFACTS_DIR + 'DoclingSaveOptions.DoclingJson.json', save_options=save_options)Removed obsolete IAiModelText interface
Removed obsolete interface Aspose.Words.AI.IAiModelText.
This use case explains how to how to work with AI models in Aspose.Words without IAiModelText interface:
api_key = system_helper.environment.Environment.get_environment_variable('API_KEY')
model = aw.ai.GoogleAiModel(name='gemini-flash-latest', api_key=api_key)
doc = aw.Document(file_name=MY_DIR + 'Big document.docx')
summarize_options = aw.ai.SummarizeOptions()
summarize_options.summary_length = aw.ai.SummaryLength.VERY_SHORT
summary = model.summarize(doc=doc, options=summarize_options)