CompressPresentation

Compress.CompressPresentation method

Reduces the size of a presentation by applying all available compression steps:

public static void CompressPresentation(Presentation presentation)
ParameterTypeDescription
presentationPresentationThe presentation to compress.

Exceptions

exceptioncondition
ArgumentNullExceptionpresentation is null.

Remarks

To customize compression, for example to use a different picture resolution or to skip a step, call the methods listed above individually instead of this one. Cropped areas of pictures are removed permanently and cannot be restored in PowerPoint.

Examples

using (Presentation pres = new Presentation("pres.pptx"))
{
    Aspose.Slides.LowCode.Compress.CompressPresentation(pres);
    
    pres.Save("pres-out.pptx", SaveFormat.Pptx);
}

See Also