Reputation: 195
I'm currently working on editing my existing PowerPoint file (.pptx) using OpenXML SDK. Can I know how to remove all unused (unlinked) Slide Layouts from my PowerPoint presentation?
The reason for this is I want to reduce the PPTX file and I have 100+ unused layouts.
Thank you.
Upvotes: 2
Views: 609
Reputation: 67
It looks like with OpenXML SDK you need to parse all slides and/or slide layouts and check relationships between them. On the other hand, this can be easily done with Aspose.Slides for .NET:
using var presentation = new Presentation("input.pptx");
presentation.LayoutSlides.RemoveUnused();
presentation.Save("output.pptx", SaveFormat.Pptx);
I work as a Support Developer at Aspose.
Upvotes: 1