Version 23.12 of Aspose.Slides for Python via .NET includes exciting new features and enhancements to empower your Python development for presentations on Windows 64-bit systems.
Key Highlights
- Improved Image Quality: Get stunning image quality and enhanced functionality when converting presentations to PDF on your Windows x64 machines with this update to the Python presentations API.
- Enhanced Handout Printing: You can now export presentations in a variety of customizable handout layouts. This makes it easy to create handouts that perfectly suit your audience’s needs.
- Reduced File Size: Aspose.Slides for Python via .NET 23.12 optimizes presentation size for its users by offering the ability to delete cropped picture areas and allowing you to enjoy cleaner, more efficient presentations.
- Shape Decorations: With this update, developers can mark shapes as decorative to improve accessibility for users with assistive technologies.
Export Presentations as Handouts
Python developers can now export PowerPoint presentations as handouts effortlessly on Windows 64-bit systems using the newly introduced HandoutType
enum, which includes different supported handout types. The following Python code snippet illustrates how to render a presentation in a handout layout:
with Presentation("pres.pptx") as pres:
options = RenderingOptions()
options.slides_layout_options = HandoutLayoutingOptions()
options.slides_layout_options.handout = HandoutType.HANDOUTS_4_HORIZONTAL
options.slides_layout_options.print_slide_numbers = False
pres.slides[0].get_thumbnail(options, Size(1920, 1080)).save("pres-handout.png")
Source*
Introducing InkOptions
Aspose.Slides for Python via .NET 23.12 introduces the new InkOptions
class and the corresponding IInkOptions
interface. This gives you control over how Ink objects appear in your exported documents, allowing you to customize the look and feel of your presentations. Please refer to the following Python code to learn about its usage:
with Presentation("pres.pptx") as pres:
options = PdfOptions()
options.ink_options.hide_ink = True
pres.save("pres.pdf", SaveFormat.PDF, options)
Source*
Remove Cropped Image Areas
Using the newly added IPictureFillFormat.delete_picture_cropped_areas()
method in this release of the Python API, you can seamlessly remove the cropped areas from an image and optimize the size of your presentations on Windows x64. The following sample code demonstrates how to use this method:
with Presentation("demo.pptx") as presentation:
slide = presentation.slides[0]
# Gets the picture frame
pic_frame = slide.shapes[0]
# Deletes cropped areas of the picture frame image
cropped_image = pic_frame.picture_format.delete_picture_cropped_areas()
Source*
Set Decorative Shapes in Python
Using the newly added IPictureFillFormat.delete_picture_cropped_areas()
method in this release of the Python API, you can seamlessly remove the cropped areas from an image and optimize the size of your presentations on Windows x64. The following sample code demonstrates how to use this method:
Python developers can utilize the new Shape.is_decorative
property to set shapes as decorative objects, as highlighted in the Python code example below:
with Presentation("sample.pptx") as pres:
pres.slides[0].shapes[0].is_decorative = True
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.Slides for Python via .NET 23.12 Release Notes.