Browse our Products

Aspose.Slides for Python via .NET 26.1 Release Notes

New Features and Enhancements

KeySummaryCategoryRelated Documentation
SLIDESNET-45248Restore access to graphics path information from ShapeElementEnhancement
SLIDESNET-43421Support for sensitivity labelsFeature

Other Improvements and Changes

KeySummaryCategoryRelated Documentation
SLIDESPYNET-327Use Aspose.Slides for Net 26.1 featuresEnhancementhttps://releases.aspose.com/slides/net/release-notes/2025/aspose-slides-for-net-26-1-release-notes/
SLIDESPYNET-320Missing layout placeholders when cloning slide with AddCloneBug

Public API Changes

Added New Properties: ShapeElement.path_points and ShapeElement.path_types

The new path_points and path_types properties have been added to the ShapeElement class. These properties return the graphics path information from the ShapeElement.

Usage examples

import aspose.slides as slides

with slides.Presentation("shape.pptx") as pres:
    auto_shape = pres.slides[0].shapes[0]
    elements = auto_shape.create_shape_elements()
    for element in elements:
        print("Start element")
        types = element.path_types
        points = element.path_points

        TYPE_NAMES = {
            0: "Start point",
            1: "LineTo point",
            3: "Bezier spline point",
            128: "Close subpath point",
            129: "End point",
        }

        for p, t in zip(points, types):
            print(TYPE_NAMES.get(t, "Unknown type point"), "({0}; {1})".format(p.x, p.y))

Support for the Sensitivity labels

Added New Enumeration: SensitivityLabelAssignmentType

The new SensitivityLabelAssignmentType enumeration has been added. This enumeration represents the assignment method for the sensitivity label.

NameDescription
STANDARDUse for any sensitivity label that was not directly applied by the user.
This includes any default labels, automatically applied labels.
PRIVILEGEDUse for any sensitivity label that was directly applied by the user.
This includes any manually applied sensitivity labels as well as recommended or mandatory labeling or any feature where the user decides which sensitivity label to apply.

Added New Enumeration: SensitivityLabelContentType

The new SensitivityLabelContentType enumeration has been added. This enumeration represents the types of content marking that ought to be applied to a presentation document.

NameDescription
NONEImplies that the label is applied by default or automatically.
HEADERImplies that the label was manually applied.
Use for any sensitivity label that was directly applied by the user.
FOOTERImplies that the label was manually applied.
Use for any sensitivity label that was directly applied by the user.
WATERMARKImplies that the label was manually applied.
Use for any sensitivity label that was directly applied by the user.
ENCRYPTIONImplies that the label was manually applied.
Use for any sensitivity label that was directly applied by the user.

Added New Class: SensitivityLabel

The new SensitivityLabel class and ISensitivityLabel interface have been added. It represents the sensitivity label from Microsoft Purview Information Protection.

Added New Class: SensitivityLabelCollection

The new SensitivityLabelCollection class and ISensitivityLabelCollection interface have been added for storing the collection of sensitivity labels applied to the document.

Added New Property: Presentation.sensitivity_labels

The new sensitivity_labels property has been added to the IPresentation interface and Presentation class. It returns the collection of sensitivity labels applied to the presentation document.

Usage examples

The following code shows how to print the sensitivity labels applied to the presentation document:

import aspose.slides as slides

with slides.Presentation("SomePresentation.pptx") as pres:
    sensitivity_labels = pres.sensitivity_labels
    for sensitivity_label in sensitivity_labels:
        print("Label ID", sensitivity_label.id, "from Azure AD site", sensitivity_label.site_id)

This code demonstrates how to add the new sensitivity label to the presentation document:

import aspose.slides as slides
import uuid

with slides.Presentation("SomePresentation.pptx") as pres:
    sensitivity_labels = pres.sensitivity_labels
    label_id_string = "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
    site_id_uuid = uuid.UUID("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}")
    label = sensitivity_labels.add(label_id_string, site_id_guid, True, slides.SensitivityLabelAssignmentType.PRIVILEGED)
    label.content_mark_types.add(slides.SensitivityLabelContentType.FOOTER)

    pres.save("SensitivityLabel.pptx", slides.export.SaveFormat.PPTX)

Added New Method: DocumentProperties.get_sensitivity_labels()

The new get_sensitivity_labels method has been added to the IDocumentProperties interface and DocumentProperties class. This method gets an array of sensitivity labels from the custom document properties (Microsoft Information Protection SDK Metadata).

Usage example

The following code shows how to move the sensitivity labels information from the custom document properties to the modern SensitivityLabels collection:

import aspose.slides as slides

with slides.Presentation("SomePresentation.pptx") as pres:
    # Get sensitivity labels from the custom document properties
    mip_sensitivity_labels = pres.document_properties.get_sensitivity_labels()

    sensitivity_labels = pres.sensitivity_labels
    for sensitivity_label in mip_sensitivity_labels:
        # Add label to the collection
        # Here you can add a check for the validity of the label information (the label is available, etc)
        sensitivity_labels.add(sensitivity_label)

    pres.save("SensitivityLabel.pptx", slides.export.SaveFormat.PPTX)