A PowerPoint presentation can store much more than its slides display. Unused masters and layouts, complete embedded fonts, and hidden parts of cropped pictures all take space.
Let’s clean up a sample presentation step by step, then do the same work with Compress.CompressPresentation, introduced in Aspose.Slides for .NET 26.11.
Meet the sample presentation
Our three-slide nature retreat demo starts at 10.81 MB. It was prepared with:
- Three masters, although only one is used.
- 32 layouts, although only one is used.
- The complete Noto Sans font, including many characters absent from the slides.
- Three 1536 × 1024 PNG pictures, each cropped to show its central 768 × 512 pixels.
The full pictures remain inside the original PPTX. Their visible areas are displayed at 96 DPI, already below the helper’s 150 DPI limit.
Download the original presentation to follow along. The sample uses original generated landscape illustrations and an openly licensed font.
Compress the presentation step by step
Use Aspose.Slides for .NET 26.11 or later and load your licence before running the examples. The downloadable C# project uses the cross-platform .NET package and reads the licence path from ASPOSE_TOTAL_LICENSE.
Each operation handles a different source of unnecessary data:
- Remove unused layouts. Delete layouts that no presentation slide references. Do this first so their masters can become unused too.
- Remove unused masters. Delete masters that are no longer needed.
- Subset embedded fonts. Keep the font data needed for the characters used in the presentation. The retained text stays editable.
- Compress pictures. Apply the 150 DPI limit and permanently discard cropped picture areas. Here, the visible picture pixels need no downsampling.
using Aspose.Slides;
using Aspose.Slides.Export;
using Aspose.Slides.LowCode;
using var presentation = new Presentation("compression-demo-original.pptx");
// 1. Remove layouts that no slide uses.
Compress.RemoveUnusedLayoutSlides(presentation);
// 2. Remove masters that are now unused.
Compress.RemoveUnusedMasterSlides(presentation);
// 3. Keep the characters used from embedded fonts.
Compress.CompressEmbeddedFonts(presentation);
// 4. Compress pictures and remove cropped areas.
Compress.CompressImages(presentation, PicturesCompression.Dpi150);
presentation.Save("compressed-step-by-step.pptx", SaveFormat.Pptx);
CompressImages also works on its own when you want image-only compression. Choose another PicturesCompression value for a different target resolution. Both examples here target 26.11; the image helper was introduced alongside the combined method. See the compression guide for its picture types and limitations.
Do the same work with one call
When these defaults fit your task, CompressPresentation replaces the four individual calls. Start from the original presentation again:
using Aspose.Slides;
using Aspose.Slides.Export;
using Aspose.Slides.LowCode;
using var presentation = new Presentation("compression-demo-original.pptx");
Compress.CompressPresentation(presentation);
presentation.Save("compression-demo-compressed.pptx", SaveFormat.Pptx);
You still load the presentation and save the result explicitly. The new method combines the cleanup operations and fixes the picture target at 150 DPI.
Compare the results
These are the saved file sizes from the supplied sample. The individual steps are cumulative; the last row starts again from the original file. MB means 1,000,000 bytes.
| Saved presentation | Bytes | MB |
|---|---|---|
| Original presentation | 10,814,200 | 10.81 |
| After removing unused layouts | 10,766,023 | 10.77 |
| After removing unused masters | 10,757,849 | 10.76 |
| After subsetting fonts | 10,591,851 | 10.59 |
| After compressing pictures | 3,709,460 | 3.71 |
| With CompressPresentation | 3,709,460 | 3.71 |
The combined method reduced the presentation by 65.7%, to 3.71 MB. Both workflows produced the same slide appearance.

For this sample, the retained PNG pixels were identical, and the three 1280 × 720 slide renders matched pixel for pixel. The embedded font became smaller while retaining the characters used by the slides. This is a result for this prepared sample, not a guarantee for every presentation or rendering resolution.
Keep a separate output file. Cropped picture areas are permanently removed, and the deleted layouts, masters and unused font characters may be useful for later editing. Pictures above 150 DPI can lose detail through downsampling. Savings depend on the presentation’s content.
Download and try it
Open the two presentations side by side, or run the examples on a copy of your own file. The detailed guide explains the individual controls and supported picture content.
