CompressPresentation()

Compress::CompressPresentation(System::SharedPtr<Presentation>) method

Reduces the size of a presentation by applying all available compression steps: * Removes unused master slides Compress::RemoveUnusedMasterSlides.

static void Aspose::Slides::LowCode::Compress::CompressPresentation(System::SharedPtr<Presentation> presentation)

Arguments

ParameterTypeDescription
presentationSystem::SharedPtr<Presentation>The presentation to compress.

Exceptions

ExceptionDescription
System::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.

auto pres = System::MakeObject<Presentation>(u"pres.pptx");
LowCode::Compress::CompressPresentation(pres);

pres->Save(u"pres-out.pptx", SaveFormat::Pptx);

See Also