Browse our Products
Aspose.Words for Python via .NET 24.7 Release Notes
Major Features
There are 104 improvements and fixes in this regular monthly release. The most notable are:
- Accessible PDF Export: Export documents to PDF/UA-2 format, ensuring accessibility for users with disabilities.
- Enhanced XLSX Export: The exporter can now automatically detect the datetime format for seamless data export.
- ActiveX Control Management: You can now modify properties of ActiveX type objects, providing greater control over their behavior.
- Granular Markdown Export: The LinkExportMode property within MarkdownSaveOptions allows you to control how links are exported in Markdown format.
- ActiveX Radio Button Interaction: Set the value of radio button ActiveX controls, enabling dynamic interactions.
- ActiveX Checkbox Toggling: Easily set the checked state (checked or unchecked) of ActiveX checkboxes.
- Chart Data Label Customization: Control the orientation and rotation of data labels within charts for enhanced presentation.
- VBA Project Protection Check: A new public property VbaProject.IsProtected allows you to verify if a VBA project is protected.
- Custom Number Style Format for List Levels: The public property ListLevel.CustomNumberStyleFormat now includes a setter, enabling you to define custom number styling for list levels.
Full List of Issues Covering all Changes in this Release
Expand to view the full list of issues.
- Provide ability to set a given ActiveX checkbox to checked or unchecked
- Implement export to PDF/UA-2
- Add feature to change the text direction of Datalabel
- Provide the ability to control LinkExportMode in MarkdownSaveOptions
- Support for ActiveX TextBox - Change the properties of ActiveX type objects
- Provide API in Aspose.Words to convert PDF directly to Fixed Page formats
- Consider providing VbaProject.IsProtected property
- Chart Datalabel font control
- Support font for East Asian text in output XLSX documents
- DOCX to PDF conversion issue with line rendering and labels position
- Support the 3D camera settings for DML group when rendering
- Implement page enumeraton in PageSet class
- Update footnote logic to handle advanced cases related to floaters
- Provide ability to modify value of radio button ActiveX control
- Incorrect footnote position in presence of a wrapped shape in the footer causes layout differences
- DOCX to PDF text overlap issue
- Horizontal Axis labels are rendered improperly
- Labels on charts not aligned properly
- Conversion management to XLSX via XlsxSaveOptions
- SVG has black background after rendering
- Image’s size isn’t preserved after HTM to HTML conversion
- Part of content is moved to next page
- Table width is incorrect upon rendering
- Content shifted from third page to second
- Page breaks are not recognized correctly
- Table is moved to previous page after conversion from PDF to Word
- GIF is converted to PNG after updating fields
- DOCX to XLSX conversion issue with date format
- Part of content is moved to previous page
- Aspose.Words can’t open specific documents
- Consider exposing setter for
ListLevel.CustomNumberStyleFormat
property - Font size and position of REF field is changed after updating fields
- Words count is calculated improperly in Linux
- Invalid numbering culture in DOCX to PDF conversion
- Aspose.Words hangs when saving DOC to JPEG
- Image quality degrades after exporting to fixed formats
- Style name is changed after DOCX to HTML to DOCX conversion
- MHTML to PDF export - The body text is cut off from left and right sides
- Comparing documents, comments are not taken into consideration
- Incorrect caclculation of formula width in the cell
- Content is pushed to the next page in layout
- Comparison deletes unchanged word
- HTML format have detected improperly
- Aspose.Words hangs upon calling AcceptAllRevisions
- Transparency in metafile is lost after rendering
- Part of content is moved to next page
- Shape is lost after open/save WordML document
- Bottom of a textbox is clipped upon rendering
- Barcode looks improperly when printed to converted to image
- DOCX to PDF conversion issue with content position and page count
- FileCorruptedException is thrown upon loading MHTML document
- DOCX to JPG: Output corrupted in ARM environment
- Part of content is moved to previous page
- A line is on a different page on conversion to PDF
- DOCX to PDF: Incorrect text alignment
- Exception is thrown when converting DOCX to AZW3
- RemoveBlankPages does not remove all blank pages
- NullReferenceException is thrown upon calling RemoveBlankPages method
- Track revisions works not the same as in MS Word when use Replace function
- Find/replace paces replacement before the matched text instead of after as MS Word does
- RTF to DOCX: Font Selection Issue
- FileCorruptedException is thrown upon loading ODT document
- Incorrect characters conversion of docx-to-pdf conversion
- Parameter “position” of rPr is not taken into account when rendering math text
- Table should not be balanced
- FileCorruptedException is thrown upon loading FlatOPC document
- ArgumentException is thrown upon comparing document
- Document.Compare: “Cannot insert a node of this type at this location.” exception
- Output barcode size is different from the original one in MS Word
- FileCorruptedException is thrown upon loading DOC document
- System.NullReferenceException is thrown when call UpdatePageLayout in 24.6
- Added substitutes for font do not work properly
- Language tag is not exported to PDF logical structure
- Table is moved to previous page upon rendering document
- Content is lost after loading HTML
- MathML is read improperly from HTML
- Incorrect result on Document.Save if callback exists
- Chinese text is distributed improperly in justified paragraph
- RTF to PDF: Logo in header section is not retaind
- Missed glyphs are rendered if PdfSaveOptions.PreserveFormFields is enabled
- Redundant symbol is rendered in PDF when PreserveFormFields is enabled
- Shape is rendered upside down
- TextShapingFactory overrides SaveOptions.FontEmbeddingMode setting
- StackOverflowException is thrown upon converting DOC to JPEG
- APS simplification produces the incorrectly transformed canvases in some cases
- Table does not fit into page after inserting to another document
- Incorrect alignment of the text element in inline formulas
- Combo chart displays wrong when export as PDF
- Cambodian Font Rendering Issue in DOCX to PDF Conversion
- Part of text disappears after rendering document created by WPS
- Text is wrapped improperly upon rendering
- InvalidOperationException is thrown upon execution mail merge with regions if region is both IF field code and it’s result
- Can’t get list label value for paragraph in revision
- figcaption position is incorrect after converting HTML to Word
- Table corrupted after adding Content Control
- SVG has issues when importing a HTML
- DOCX to HTML: Numbered heading created as ol instead of h2
- NullReferenceException is thrown upon rendering document
- NullReferenceException occurs upon rendering document
- Doc to PDF conversion fails with “Object reference not set to an instance of an object”
- DOCX to PDF NullReferenceException is thrown upon rendering document
- NullReferenceException is thrown upon rendering document
- Font rendering issue with Arabic text
- Simplified Arabic’ does not render correctly in PDF
Public API and Backward Incompatible Changes
This section lists public API changes that were introduced in Aspose.Words for Python via .NET 24.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 automatically determine datetime format when exporting to XLSX
Implemented the ability to automatically determine the datetime format when exporting to XLSX. The new public property XlsxSaveOptions.date_time_parsing_mode can be used to enable the automatic determining.
This use case explains how to use DateTimeParsingMode:
doc = aw.Document(file_name=MY_DIR + 'Xlsx DateTime.docx')
save_options = aw.saving.XlsxSaveOptions()
# Specify using datetime format autodetection.
save_options.date_time_parsing_mode = aw.saving.XlsxDateTimeParsingMode.AUTO
doc.save(file_name=ARTIFACTS_DIR + 'XlsxSaveOptions.DateTimeParsingMode.xlsx', save_options=save_options)
Added ability to change the properties of ActiveX type objects
Implemented new public properties in Aspose.Words.Drawing.Ole.Forms2OleControl class: fore_color, back_color, height, width.
This use case explains how to change properties of ActiveX controls:
doc = aw.Document(file_name=MY_DIR + 'ActiveX controls.docx')
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
ole_control = shape.ole_format.ole_control.as_forms2_ole_control()
ole_control.fore_color = aspose.pydrawing.Color.from_argb(23, 225, 53)
ole_control.back_color = aspose.pydrawing.Color.from_argb(51, 151, 244)
ole_control.height = 100.54
ole_control.width = 201.06
Added ability to control LinkExportMode in MarkdownSaveOptions
Implemented new public property link_export_mode in Aspose.Words.Saving.MarkdownSaveOptions class.
This use case explains how to change links export mode while saving to Markdown:
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
builder.insert_shape(aw.drawing.ShapeType.BALLOON, 100, 100)
# Image will be written as reference:
# ![ref1]
#
# [ref1]: aw_ref.001.png
save_options = aw.saving.MarkdownSaveOptions()
save_options.link_export_mode = aw.saving.MarkdownLinkExportMode.REFERENCE
doc.save(ARTIFACTS_DIR + "MarkdownSaveOptions.LinkExportMode.Reference.md", save_options)
# Image will be written as inline:
# ![](aw_inline.001.png)
save_options.link_export_mode = aw.saving.MarkdownLinkExportMode.INLINE
doc.save(ARTIFACTS_DIR + "MarkdownSaveOptions.LinkExportMode.Inline.md", save_options)
Added ability to modify value of radio button ActiveX control
Implemented new public class Aspose.Words.Drawing.Ole.OptionButtonControl, with the following public property selected.
This use case explains how to change value of radio button ActiveX control:
doc = aw.Document(file_name=MY_DIR + 'Radio buttons.docx')
shape1 = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
option_button1 = shape1.ole_format.ole_control.as_option_button_control()
# Deselect selected first item.
option_button1.selected = False
shape2 = doc.get_child(aw.NodeType.SHAPE, 1, True).as_shape()
option_button2 = shape2.ole_format.ole_control.as_option_button_control()
# Select second option button.
option_button2.selected = True
doc.save(file_name=ARTIFACTS_DIR + 'Shape.SelectRadioControl.docx')
Added ability to set a given ActiveX checkbox to checked or unchecked
Implemented new public class Aspose.Words.Drawing.Ole.CheckBoxControl, with the following public property checked.
This use case explains how to change state of the CheckBox ActiveX control:
doc = aw.Document(file_name=MY_DIR + 'ActiveX controls.docx')
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
check_box_control = shape.ole_format.ole_control.as_check_box_control()
check_box_control.checked = True
Added ability to set orientation and rotation of chart data labels
The new properties orientation and rotation have been added to the ChartDataLabel and ChartDataLabelCollection classes.
This use case explains how to set data label orientation and rotation:
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_chart(chart_type=aw.drawing.charts.ChartType.COLUMN, width=432, height=252)
series = shape.chart.series[0]
data_labels = series.data_labels
# Show data labels.
series.has_data_labels = True
data_labels.show_value = True
data_labels.show_category_name = True
# Define data label shape.
data_labels.format.shape_type = aw.drawing.charts.ChartShapeType.UP_ARROW
data_labels.format.stroke.fill.solid(aspose.pydrawing.Color.dark_blue)
# Set data label orientation and rotation for the entire series.
data_labels.orientation = aw.drawing.ShapeTextOrientation.VERTICAL_FAR_EAST
data_labels.rotation = -45
# Change orientation and rotation of the first data label.
data_labels[0].orientation = aw.drawing.ShapeTextOrientation.HORIZONTAL
data_labels[0].rotation = 45
doc.save(file_name=ARTIFACTS_DIR + 'Charts.LabelOrientationRotation.docx')
Added export to PDF/UA-2
Added support for export to PDF/UA-2 format. New values added to PdfCompliance enum. Also PdfCompliance.PDF20 and PdfCompliance.PDF_A4 export is switched from PDF 1 logical structure to PDF 2 logical structure. Now PDF 1 logical structure is used for PdfCompliance.PDF17, PdfCompliance.PDF_A1B, PdfCompliance.PDF_A1A, PdfCompliance.PDF_A2U, PdfCompliance.PDF_A2A, PdfCompliance.PDF_UA1 and PDF 2 logical structure is used for PdfCompliance.PDF20, PdfCompliance.PDF_A4, PdfCompliance.PDF_A4_UA_2, PdfCompliance.PDF_UA2.
Added public property VbaProject.is_protected
A public property getter is_protected has been added to the Aspose.Words.Vba.VbaProject class:
This use case explains how to know if VbaProject is password protected or not:
doc = aw.Document(file_name=MY_DIR + 'Vba protected.docm')
self.assertTrue(doc.vba_project.is_protected)
Added setter for public ListLevel.CustomNumberStyleFormat property
A public property setter CustomNumberStyleFormat has been added to the ListLevel class.
This use case explains how to set customer number style format:
doc = aw.Document(file_name=MY_DIR + 'List with leading zero.docx')
doc.update_list_labels()
paras = doc.first_section.body.paragraphs
self.assertEqual('001.', paras[0].list_label.label_string)
self.assertEqual('0001.', paras[1].list_label.label_string)
self.assertEqual('0002.', paras[2].list_label.label_string)
paras[1].list_format.list_level.custom_number_style_format = '001, 002, 003, ...'
doc.update_list_labels()
self.assertEqual('001.', paras[0].list_label.label_string)
self.assertEqual('001.', paras[1].list_label.label_string)
self.assertEqual('002.', paras[2].list_label.label_string)