Attention Linux developers! Aspose.Words for Python via .NET 24.4.0 delivers a comprehensive set of new features and enhancements designed to elevate your Python document processing applications.
Effortless WEBP Integration
Streamline your workflows with the ability to save Word documents as high-quality WEBP images. The addition of the SaveFormat.WebP
enum member in the Python Word document API makes incorporating WEBP images a breeze.
Advanced Chart Customization
The optimized Chart API in Aspose.Words for Python via .NET 24.4.0 grants you more control over the look and feel of your charts. Unleash your creativity and craft stunning, customized charts directly within your Python apps on Linux. Please check the Python code sample below for more:
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_chart(chart_type=aw.drawing.charts.ChartType.COLUMN, width=432, height=252)
chart = shape.chart
series = chart.series
series.clear()
categories = ["Category 1", "Category 2"]
series.add(series_name="Series 1", categories=categories, values=[1, 2])
series.add(series_name="Series 2", categories=categories, values=[3, 4])
chart.format.fill.solid(drawing.Color.dark_slate_gray)
chart.axis_x.tick_labels.position = aw.drawing.charts.AxisTickLabelPosition.NONE
chart.axis_y.tick_labels.position = aw.drawing.charts.AxisTickLabelPosition.NONE
chart.title.format.fill.solid(drawing.Color.light_goldenrod_yellow)
chart.axis_x.title.show = True
chart.axis_x.title.format.fill.solid(drawing.Color.light_goldenrod_yellow)
chart.legend.format.fill.solid(drawing.Color.light_goldenrod_yellow)
doc.save("Charts.ChartFormat.docx")
Source*
Insert Digital Signatures in Word Documents
Boost document security and integrity with the ability to effortlessly add digital signatures with comments and timestamps. This update introduces new features that simplify specifying signing options while saving documents. The provided Python code example demonstrates this functionality in action:
import aspose.words as aw
from datetime import datetime
doc = aw.Document("Document.docx")
certificate_holder = aw.digitalsignatures.CertificateHolder.create("morzal.pfx", "aw")
save_options = aw.saving.OoxmlSaveOptions()
sign_options = aw.digitalsignatures.SignOptions()
sign_options.comments = "Some comments"
sign_options.sign_time = datetime.now()
save_options.digital_signature_details = aw.saving.DigitalSignatureDetails(certificate_holder, sign_options)
doc.save("OoxmlSaveOptions.DigitalSignature.docx", save_options)
Source*
Font Embedding Made Simple
Effortlessly embed fonts declared within @font-face rules when loading HTML documents on Linux. This update ensures consistent font rendering in the resulting Word document, eliminating rendering issues as illustrated by the provided Python code example.
import aspose.words as aw
load_options = aw.loading.HtmlLoadOptions()
load_options.support_font_face_rules = True
doc = aw.Document("Html with FontFace.html", load_options)
self.assertEqual("Squarish Sans CT Regular", doc.font_infos[0].name)
Source*
Visually Captivating Shapes
Python developers can bring their documents to life with the power to apply glow and reflection effects to drawing objects. Version 24.4.0 empowers you to create dynamic and visually striking shapes within your Python applications. Explore the manipulation of glow effects through this Python code example:
import aspose.words as aw
import aspose.pydrawing
doc = aw.Document("Various shapes.docx")
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
shape.glow.color = aspose.pydrawing.Color.salmon
shape.glow.radius = 30
shape.glow.transparency = 0.15
doc.save("Shape.Glow.docx")
doc = aw.Document("Shape.Glow.docx")
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
self.assertEqual(aspose.pydrawing.Color.from_argb(217, 250, 128, 114).to_argb(), shape.glow.color.to_argb())
self.assertEqual(30, shape.glow.radius)
self.assertAlmostEqual(0.15, shape.glow.transparency, delta=0.01)
shape.glow.remove()
self.assertEqual(aspose.pydrawing.Color.black.to_argb(), shape.glow.color.to_argb())
self.assertEqual(0, shape.glow.radius)
self.assertEqual(0, shape.glow.transparency)
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.Words for Python via .NET 24.4.0 Release Notes.