Aspose.Slides - Extract Header Footer from Presentation

System.out.println(sourcePres.getHeaderFooterManager().isDateTimeVisible());
System.out.println(sourcePres.getHeaderFooterManager().isFooterVisible());
System.out.println(sourcePres.getHeaderFooterManager().isSlideNumberVisible());

Apache POI SL

 //presentation-scope headers / footers
 HeadersFooters hdd = ppt.getSlideHeadersFooters();
 if(hdd.isFooterVisible()) {
     String footerText = hdd.getFooterText();
 }

 //per-slide headers / footers
 for (int i=0; i < slides.length; i++){
     HeadersFooters hdd2 = slides[i].getHeadersFooters();
     if(hdd2.isFooterVisible()) {
         String footerText = hdd2.getFooterText();
         System.out.println(footerText + footerText);
     }
     if(hdd2.isUserDateVisible()) {
        String customDate = hdd2.getDateTimeText();
        System.out.println(customDate + customDate);
     }
     if(hdd2.isSlideNumberVisible()){
         int slideNUm = slides[i].getSlideNumber();
         System.out.println(slideNUm + slideNUm);
     }

 }


Download Source Code

For More Examples, Please Visit Aspose Docs

Last edited Feb 12, 2015 at 5:12 PM by shoaibkhan, version 1