Aspose.Slides for Python via .NET 23.12 delivers a powerful suite of new features and enhancements for Python developers working on Mac systems, perfectly optimized for your M1 chip.
Key Highlights
- Craft Effortless Handouts: Create handouts with the PowerPoint processing API seamlessly and integrate the ability to render presentations in various customizable layouts directly into your Python apps running on macOS ARM64.
- PDF Powerhouse: Developers can easily export presentations to PDF format with exceptional image quality and optimized functionality.
- Manage Ink Objects with Precision: The new
InkOptions
class gives you greater control over how ink objects appear in your exported documents, enabling you to achieve the desired outlook for your presentations on macOS M1. - Augment Your Presentations: Reduce file size and create efficient presentations by automatically removing unnecessary cropped picture areas, ensuring your presentations run smoothly on M1 devices.
Render Presentations as Handouts
Python developers can now export PowerPoint presentations as handouts effortlessly on macOS ARM64 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*
Gain Control Over The Ink Objects
This update of the Python API 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*
Learn to Remove Cropped Areas in Images
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 macOS ARM64 machines. 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*
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.