We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Including or excluding hidden slides from a ppt output


While converting a Ppt document to Pdf or Html or any other format, is there any option to specify whether we want to save hidden-slides or not.

Can we specifically include or exclude hidden slides from the output?


Hi Neha,

Thank you for posting.

I have observed your comments and like to share with you that slide.setHidden(boolean) method determines whether the specified slide is hidden during a slide show, or not. It does not specify to hide slides while converting a presentation. However, I have created a sample code as per your requirements. Please try using the code below on your side and then share your kind feedback.

Presentation src = new Presentation(“D:\HideTest.pptx”);
Presentation dest = new Presentation();
ISlideCollection slides = src.getSlides();
for (ISlide slide : slides) {
if (slide.getHidden() == false)
dest.save(“D:\HideTest_output.pdf”, SaveFormat.Pdf);

I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,