Browse our Products
Aspose.Words for Python via .NET 23.7 Release Notes
Major Features
There are 114 improvements and fixes in this regular monthly release. The most notable are:
- The possibility to save the document page or shape into EPS format has been implemented.
- The ability to retrieve the digital signature value from a digitally signed document as a byte array has been added.
- The Row and Cell classes have been extended with new public members.
- Mustache tags are now supported in the MailMerge.GetRegionsHierarchy and MailMerge.GetFieldNamesForRegion methods. .
Full List of Issues Covering all Changes in this Release
Expand to view the full list of issues.
- Making Cell.PreviousCell, Cell.NextCell, Row.PreviousRow, Row.NextRow properties public
- Consider providing a way to extract digital signature as byte array
- Text is wrapped improperly in table cell
- Right edge of shape is cut after rendering
- Table column’s width is incorrect after rendering.
- Images are rendered improperly
- Table is rendered a little narrower that leads to incorrect hyperlink wrapping
- Table width is changed after redenring
- Table layout is incorrect after rendering
- Issue a warning when loading a fixed-page HTML document
- Paragraphs are overlapped the Shape in output PDF
- A Table moves towards the right page edge in PDF
- Image in table is getting cut off in generated PDF
- Text in footer is misplaced when converting a Word document to PDF
- DOCM to PDF conversion issue with table rendering
- HTML to PDF conversion : Table rendering
- DOC to XPS conversion issue with table rendering
- DOCX to PDF conversion issue with table’s rendering
- Table’s width shrinks when images are present in cell
- Image alignment issue in DOCX to PDF conversion
- UpdateTableLayout method use in Word to PDF conversion
- Paragraph is rendered on previous page
- DOCX to HtmlFixed conversion issue with table position
- Cell’s text is wrapped to next line in output PDF
- Images are overlapped after conversion from DOC to PDF
- Pictures slightly overlap each other in PDF
- DOCX to PDF conversion issue with table content
- Table row appears on the 4th page in Word but on 5th in AW
- Date in the header of document does not render correctly in output PDF
- Support rendering to EPS
- Incorrect table width in generated PDF
- Shape (logo) position is changed after DOCX to PDF conversion
- Picture shifts towards right page margin, causing partial rendering in PDF
- Preserve Table Column widths in Landscape Section’s Header during DOCM to PDF Conversion
- UpdatePageLayout and UpdateTableLayout changed the printed document layout using .NET
- Document.UpdateTableLayout changes the layout of document footer in output PDF
- Image is cropped after DOCX to PDF conversion
- Incorrect Table after conversion to PDF
- Word to PDF transformation Table alignment issue in header
- A design bug while converting a DOCX to PDF
- The width of the cell is not correct when converting DOCX file to PDF
- The logo shifts to the center in the PDF
- Incorrect table column widths on DOCX to PDF conversion
- Header on landscape page is rendered improperly
- Header with table on landscape page is rendered improperly
- Header layout changed when converting DOCX to PDF
- Image is truncated upon rendering document
- An empty page is rendered in PDF
- Throw a better error message when reading corrupted MOBI file
- Table is rendered slightly narrower than in source document
- Text in table is wrapped incorrectly
- Image in Header getting chopped off in Save as PDF
- Image in table not centered when converting word to PDF
- Document.UpdateTableLayout changes the layout of table in output PDF
- Image inside table is cut off in PDF format
- Right table border is not visible after rendering
- Check whether customXxml part is required in AllStyles2003.docx resource
- FindReplaceOptions.ApplyFont.Color is not applied
- MailMerge.GetRegionsHierarchy and MailMerge.GetFieldNamesForRegion do not work with mustache syntax
- Memory leak issue occurs in AW.NET while converting documents inside GroupDocs.Editor
- Text is rendered as tofu
- Text is rendered as tofu 2
- Cell background is lost after conversion from DOCX to XLSX
- Font style underline does not work
- Rendering performance depredated in new version of Aspose.Words
- OLE object extracted incorrectly from DOC created in WPS
- InvalidCastException when saving HTML to MOBI
- Images don’t preserve hyperlinks when they are saved to SVG
- Colors of image are inverted after conversion of MHT to PCL
- DOCX merging issue
- Error inserting SVG+XML image
- REF field is not updated properly after first call of UpdateFields
- TOC is updated improperly by Aspose.Words
- MergeBarcode fields names are not listed in MailMerge.GetFieldNames()
- Infinite loop while reading document with DML
- HTML AltChunk loses text color after open/save document
- Small caps text is rendered improperly
- DOCX to PDF: some images inside tables are pushed back to the previous page
- DOCX to PDF: Page missing after conversion
- Widow/orphan rule not respected in a broken table cell on conversion to PDF
- Chinese text is missed after rendering document
- Incorrect bounds calculation if one of fraction parts has a different font size
- Quality of graphics degrades after merging PDF documents
- DOCX to PDF: Table overflows to the footer
- PdfSaveOptions.OptimizeOutput produces incorrect output when Shaping.HarfBuzz is used
- Image proportions are not preserved after rendering document
- NullReferenceException is thrown upon updating words count
- List is incorrectly formatted after export to HTML
- List is formatted incorrectly after export to HTML
- List is incorrect after export to HTML
- Improve HTML list export
- Aspose.Words.FileCorruptedException throwed opening HTML file
- Incorrect position of the fraction line in the formula
- Incorrect top and bottom offsets if the emedded image on top level of the math formula
- InvalidCastException is thrown when try to move DocumentBuilder to a bookmark inside OfficeMath
- DOCX to PDF: Text changes color
- Operator glyphs (+,-), if they are part of a “inline” fraction, are changed after converting to PDF
- File is mistakenly detected as PDF by Aspose.Words
- Placeholder text lost after saving
- Comparing the document with itself produces invisible revisions
- Compatibility mode changes on saving HTML to DOCX
- Make sure compatibility mode changes on saving HTML to DOCX
- Incorrect percent numbers in pie chart
- DOC to XPS conversion issue with table’s text rendering
- Font fallback does not work for Wingdings font
- Cell margins change on saving from DOC to ODT
- Wrong format when appending a document twice
- DOCX to PDF: Symbols not converted correctly
- Bullet formatting for the component content changed
- NullReferenceException is thrown upon rendering document after removing table row
- HTML is converted to the blank resulting DOCX
- Default font family is written to
<li>
element - Table row is moved to the previous page after rendering
- Aspose.Words takes more time and memory over .NET Core
Public API and Backward Incompatible Changes
This section lists public API changes that were introduced in Aspose.Words for Python via .NET 23.7. 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 get digital signature value from digitally signed document as byte array
Added ability to get a digital signature value from a digitally signed document into Aspose.Words.DigitalSignatures.DigitalSignature class:
@property
def signature_value(self) -> bytes:
'''Gets an array of bytes representing a signature value.'''
...
Use Case
This use case explains how to obtain digital signature value as byte array from a document:
import base64
from aspose.words import Document
doc = Document("docWithSign.docx")
for digitalSignature in doc.digital_signatures:
signatureValue = base64.b64encode(digitalSignature.signature_value)
print(digitalSignature)
Added new EPS image format
The document page or shape could be saved into EPS format now. A new EPS value is added into SaveFormat class.
Use Case
This use case explains how to save document as EPS image:
from aspose.words import Document, SaveFormat
from aspose.words.saving import ImageSaveOptions, PageSet
# Open some document.
doc = Document("document.docx")
# Save the second page as EPS image.
saveOptions = ImageSaveOptions(SaveFormat.EPS)
saveOptions.page_set = PageSet(1)
doc.save("image.eps", saveOptions)
Use Case
This use case explains how to save any particular shape as EPS image:
from aspose.words import Document, NodeType, SaveFormat
from aspose.words.saving import ImageSaveOptions
# Open some document.
doc = Document("document.docx")
# Save the shape as EPS image.
saveOptions = ImageSaveOptions(SaveFormat.EPS)
shape = doc.get_child(NodeType.SHAPE, 0, True).as_shape()
renderer = shape.get_shape_renderer()
renderer.save("image.eps", saveOptions)
Added new public properties Row.next_row, Row.previous_row, Cell.next_cell and Cell.previous_cell
The following public properties have been added to the Row class:
@property
def next_row(self) -> aspose.words.tables.Row:
'''Gets the next :class:`Row` node.
The method can be used when you need to have typed access to table rows. If a
:class:`aspose.words.markup.StructuredDocumentTag` node is found in a table instead of a row,
it is automatically traversed to get a row contained within.'''
...
@property
def previous_row(self) -> aspose.words.tables.Row:
'''Gets the previous :class:`Row` node.
The method can be used when you need to have typed access to table rows. If a
:class:`aspose.words.markup.StructuredDocumentTag` node is found in a table instead of a row,
it is automatically traversed to get a row contained within.'''
...
The following public properties have been added to the Cell class:
@property
def next_cell(self) -> aspose.words.tables.Cell:
'''Gets the next :class:`Cell` node.
The method can be used when you need to have typed access to cells of a :class:`Row`. If a
:class:`aspose.words.markup.StructuredDocumentTag` node is found in a row instead of a cell, it is automatically
traversed to get a cell contained within.'''
...
@property
def previous_cell(self) -> aspose.words.tables.Cell:
'''Gets the previous :class:`Cell` node.
The method can be used when you need to have typed access to cells of a :class:`Row`. If a
:class:`aspose.words.markup.StructuredDocumentTag` node is found in a row instead of a cell, it is automatically
traversed to get a cell contained within.'''
...
Use Case
This use case explains how to enumerate through all table cells:
from aspose.words import Document
doc = Document(fileName)
table = doc.first_section.body.tables[0]
# Enumerate through all cells of the table.
row = table.first_row
while row is not None:
cell = row.first_cell
while cell is not None:
print(cell.get_text())
cell = cell.next_cell
row = row.next_row
A warning is issued if loaded HTML document has fixed-page structure
Aspose.Words doesn’t support loading of fixed-page HTML document (for example, documents that are produced when saving in SaveFormat.HtmlFixed). If Aspose.Words detects that the loaded HTML document has fixed-page structure, it will issue the following warning:
WarningSource.HTML
WarningType.MINOR_FORMATTING_LOSS
"The document is fixed-page HTML. Its structure may not be loaded correctly."
Supported mustache tags in the MailMerge.GetRegionsHierarchy and MailMerge.GetFieldNamesForRegion methods
Now the MailMerge.get_regions_hierarchy method returns mustache regions and mustache fields when the MailMerge.use_non_merge_fields option is True.
Now the MailMerge.get_field_names_for_region method accepts mustache region names and returns mustache field names when the MailMerge.use_non_merge_fields option is True.
The MustacheTag class has been introduced:
class MustacheTag:
'''Represents "mustache" tag.'''
@property
def reference_run(self) -> aspose.words.Run:
'''Gets the run that contains the beginning of the tag.'''
...
@property
def reference_offset(self) -> int:
'''Gets the zero-based starting position of the tag from the start of the :attr:`MustacheTag.reference_run`.'''
...
@property
def text(self) -> str:
'''Gets the text of the tag.'''
...
...
The start_mustache_tag, end_mustache_tag and mustache_tags properties have been added to the MailMergeRegionInfo class:
class MailMergeRegionInfo:
@property
def mustache_tags(self) -> list[aspose.words.mailmerging.MustacheTag]:
'''Returns a list of child "mustache" tags.'''
...
@property
def start_mustache_tag(self) -> aspose.words.mailmerging.MustacheTag:
'''Returns a start "mustache" tag for the region.'''
...
@property
def end_mustache_tag(self) -> aspose.words.mailmerging.MustacheTag:
'''Returns an end "mustache" tag for the region.'''
...
Use Case
This use case explains how to use MustacheTag:
from aspose.words import Document
document = Document("Template.docx")
document.mail_merge.use_non_merge_fields = True
hierarchy = document.mail_merge.get_regions_hierarchy()
for mustacheTag in hierarchy.mustache_tags:
print(mustacheTag.text)
for region in hierarchy.regions:
print(region.start_mustache_tag.text)
print(region.end_mustache_tag.text)