Including or excluding hidden slides from a ppt output

Hello,

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?

Thanks,
Neha

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();
dest.getSlides().get_Item(0).remove();
ISlideCollection slides = src.getSlides();
for (ISlide slide : slides) {
if (slide.getHidden() == false)
{
dest.getSlides().addClone(slide);
}
}
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,