set_size method

set_size

Sets the slide size by type and scales existing content.

def set_size(self, type, scale_type):
    ...
ParameterTypeDescription
typeSlideSizeTypeThe predefined slide size to apply.
scale_typeSlideSizeScaleTypeThe content scaling mode to use.

Remarks

Assigning any value other than SlideSizeType.CUSTOM adjusts the SlideSize.size based on the selected type, while preserving SlideSize.orientation.

set_size

Sets the slide dimensions explicitly and scales existing content.

def set_size(self, width, height, scale_type):
    ...
ParameterTypeDescription
widthfloatThe new slide width, in points.
heightfloatThe new slide height, in points.
scale_typeSlideSizeScaleTypeThe content scaling mode to use.

Remarks

This resets the SlideSize.type property to SlideSizeType.CUSTOM and sets the SlideSize.orientation.

See Also