CompressPresentation()
Contents
[
Hide
]Compress::CompressPresentation(System::SharedPtr<Presentation>) method
Reduces the size of a presentation by applying all available compression steps: * Removes unused master slides Compress::RemoveUnusedMasterSlides.
- Removes unused layout slides Compress::RemoveUnusedLayoutSlides.
- Keeps only the glyphs actually used in embedded fonts Compress::CompressEmbeddedFonts.
- Reduces picture resolution to 150 DPI and deletes cropped areas of pictures Compress::CompressImages.
static void Aspose::Slides::LowCode::Compress::CompressPresentation(System::SharedPtr<Presentation> presentation)
Arguments
| Parameter | Type | Description |
|---|---|---|
| presentation | System::SharedPtr<Presentation> | The presentation to compress. |
Exceptions
| Exception | Description |
|---|---|
| System::ArgumentNullException | presentation 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
- Typedef SharedPtr
- Class Presentation
- Class Compress
- Namespace Aspose::Slides::LowCode
- Library Aspose.Slides