Browse our Products
Aspose.Words for Python via .NET 25.8 Release Notes
Major Features
There are 67 improvements and fixes in this regular monthly release. The most notable are:
- Markdown Export: Added more control over how non-compatible tables are rendered when exporting to HTML.
- Find and Replace: Added a new option to ignore Office Math objects during search and replace operations.
- Markdown Import: Introduced a new option to specify the character for soft line breaks.
- Page Extraction: Added new options to provide greater control over the page extraction process.
Full List of Issues Covering all Changes in this Release
Expand to view the full list of issues.
- Consider providing an ability to replace in OfficeMath
- Consider adding an ability to preserve NUMPAGES fields after using ExtractPages method
- Missing glyphs on conversion to PDF
- Justify Medium paragraph alignment is not preserved in PDF
- Docx to fixed file format conversion issue with arabic text
- Add public property providing the number of pages remaining in the current print job
- Provide an API to track document printing progress|Enhancement
- Invisible watermark
- Compare result does not match MS Word output
- Object reference error upon DOCX to PDF conversion
- Chinese text is distributed improperly after rendering
- InvalidOperationException when processing DOCX with XML-mapped StructuredDocumentTags
- DOCX merging issue
- FileCorruptedException is thrown upon loading RTF document
- OpenAiModel.Translate() throws an exception with custom URL
- Table.AutoFit() not working as expected
- FirstLineIndent return -28.35 instead of 0 in DOTM style
- Soft line break is improperly read from markdown document
- Tab character in SDT is rendered as missed character when PreserveFormFields is enabled
- LINQ Reporting Engine - An issue with building nested tables
- LINQ Reporting Engine - An issue with building a pivot table upon a single cell
- HTML to XLSX conversion error
- FileLoadException is thrown upon loading PDF
- DOCX merging issue
- InvalidOperationException upon saving document after appending text to tables in a Building Block
- DOC to PDF: Extra image appears
- Data in nested regions are merged improperly
- SimHei font replaced with SimSun and became Regular instead of Bold upon DOCX to PDF
- Incorrect scaling of a vertical numeric axis
- X-axis label text moves to the next line when converting DOCX to PDF
- NullReferenceException upon MailMerge with the html text
- System.NullReferenceException when processing a document containing shapes
- PAC to report accessibility compliance errors with link annotation
- Less items are dispalyed in chart legend
- Arabic text does not render correctly in output PDF
- Infinite loop on UpdatePageLayout
- NullReferenceException on UpdatePageLayout()
- Missed Subtype for header/footer in the PDF/UA-1
- Shapes texture and gradient fill is corrupted after work of ApsCanvasTransformApplier
- 3D bar chart is overlapped by axis title and legend
- Justify Low Paragraph Alignment is not Retained during Arabic Word to PDF Conversion
- Paragraph’s alignment is lost after conversion from Docx to PDF
- Noto JP fonts embedded in MS Word document are not handled by MS Word properly
- ArgumentOutOfRangeException is thrown upon autofitting table
- Merging images does not work as expected with Merger.Merge overload that returns Document instance
- Arabic text rendering issue with output PDF
- DOCX to PDF: Loading and filling the document with XML does not render Japanese letters correctly
- Issue with symbol rendering after formatting change with tracked changes
- RevisionTextEffect.Hidden effect is not applied to list items
- Page orientation changed from landscape to portrait upon DOCX to PDF convertion
- Multiple link tags instead of single link in PDF/UA
- Obfuscated exception is thrown while loading password protected PDF.
- Justification of Arabic text is incorrect
- XML to MD: HTML Tables tags with Markdown Content
- Docx to Pdf conversion issue with text justification
- DOCX to EPUB: System.IndexOutOfRangeException
- Table is imported from MHTML with wrong background color
- Add support for the “mso-list-name” CSS property
- Import of MsoHtml lists differs from MS Word’s result
- Borders are imported improperly from HTML
- Image lost when converting Doc to Doc
- A bug in usage of exception cache in WebRequestHelper.OpenStreamFromUri()
- List numbers are duplicated when converting HTML to DOCX
- Image is lost after importing HTML
- Strange PageCount behavior
- Legend is rendered improperly
- DOCX to EPUB: Image containing math formula renders incorrectly
Public API and Backward Incompatible Changes
This section lists public API changes that were introduced in Aspose.Words for Python via .NET 25.8. 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 new public enumeration MarkdownExportAsHtml.NON_COMPATIBLE_TABLES
A new public flag NON_COMPATIBLE_TABLES has been added into Aspose.Words.Saving.MarkdownExportAsHtml enumeration:
This use case describes how to export only those tables as HTML that cannot be accurately represented using plain Markdown:
output_path = ARTIFACTS_DIR + 'MarkdownSaveOptions.NonCompatibleTables.md'
doc = aw.Document(file_name=MY_DIR + 'Non compatible table.docx')
# With the "NonCompatibleTables" option, you can export tables that have a complex structure with merged cells
# or nested tables to raw HTML and leave simple tables in Markdown format.
save_options = aw.saving.MarkdownSaveOptions()
save_options.export_as_html = aw.saving.MarkdownExportAsHtml.NON_COMPATIBLE_TABLES
doc.save(file_name=output_path, save_options=save_options)
Added new public option FindReplaceOptions.ignore_office_math
A new public option ignore_office_math has been added into Aspose.Words.Replacing.FindReplaceOptions class:
This use case explains how to replace text in OfficeMath:
doc = aw.Document(file_name=MY_DIR + 'Office math.docx')
self.assertEqual('i+b-c≥iM+bM-cM', doc.first_section.body.first_paragraph.get_text().strip())
options = aw.replacing.FindReplaceOptions()
options.ignore_office_math = is_ignore_office_math
doc.range.replace(pattern='b', replacement='x', options=options)
if is_ignore_office_math:
self.assertEqual('i+b-c≥iM+bM-cM', doc.first_section.body.first_paragraph.get_text().strip())
else:
self.assertEqual('i+x-c≥iM+xM-cM', doc.first_section.body.first_paragraph.get_text().strip())
New public MarkdownLoadOptions.soft_line_break_character option has been introduced
A new public option soft_line_break_character has been added into Aspose.Words.Loading.MarkdownLoadOptions class:
This use case explains how to change the default soft line break character SPACE
to some another character \v
:
with io.BytesIO(system_helper.text.Encoding.get_bytes('line1\nline2', system_helper.text.Encoding.utf_8())) as stream:
load_options = aw.loading.MarkdownLoadOptions()
load_options.soft_line_break_character = aw.ControlChar.LINE_BREAK_CHAR
doc = aw.Document(stream=stream, load_options=load_options)
self.assertEqual('line1\x0bline2', doc.get_text().strip())
New public PageExtractOptions has been introduced
A new public options class PageExtractOptions has been introduced.
This use case explains how to change the code behavior when extracting pages:
doc = aw.Document(file_name=MY_DIR + 'Page fields.docx')
# Default behavior:
# The extracted page numbering is the same as in the original document, as if we had selected "Print 2 pages" in MS Word.
# The start page will be set to 2 and the field indicating the number of pages will be removed
# and replaced with a constant value equal to the number of pages.
extracted_doc1 = doc.extract_pages(index=1, count=1)
extracted_doc1.save(file_name=ARTIFACTS_DIR + 'Document.ExtractPagesWithOptions.Default.docx')
# Altered behavior:
# The extracted page numbering is reset and a new one begins,
# as if we had copied the contents of the second page and pasted it into a new document.
# The start page will be set to 1 and the field indicating the number of pages will be left unchanged
# and will show the current number of pages.
extract_options = aw.PageExtractOptions()
extract_options.update_page_starting_number = False
extract_options.unlink_pages_number_fields = False
extracted_doc2 = doc.extract_pages(index=1, count=1, options=extract_options)
extracted_doc2.save(file_name=ARTIFACTS_DIR + 'Document.ExtractPagesWithOptions.Options.docx')