poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45590] Header/footer extraction must work for .ppt files saved from PPT 2007
Date Tue, 12 Aug 2008 17:41:46 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45590


Dmitry Goldenberg <dgoldenberg@attivio.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #5 from Dmitry Goldenberg <dgoldenberg@attivio.com>  2008-08-12 10:41:45
PST ---
I just got the latest POI sources and my testing code still returns all nulls
for all the headers and footers. I used the document you can find attached to
this issue, marked as "The presentation as ppt, with header and footer data."

Thanks. Below is my tester code:


package com.attivio.test;

import java.io.FileInputStream;

import org.apache.poi.hslf.model.HeadersFooters;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.usermodel.SlideShow;

public class HslfHeaderFooterExtractor {
  public static void main(String[] args) throws Exception {
    FileInputStream fis = new FileInputStream(args[0]);
    SlideShow ppt = new SlideShow();
    fis.close();
    Slide[] slides = ppt.getSlides();

    // presentation-scope headers / footers
    HeadersFooters hdd = ppt.getSlideHeadersFooters();
    String headerText = hdd.getHeaderText();
    String footerText = hdd.getFooterText();

    System.out.println(">> Global header: " + headerText);
    System.out.println(">> Global footer: " + footerText);

    HeadersFooters notesHdd = ppt.getNotesHeadersFooters();
    headerText = notesHdd.getHeaderText();
    footerText = notesHdd.getFooterText();
    String dateTimeText = notesHdd.getDateTimeText();

    System.out.println(">> Notes header: " + headerText);
    System.out.println(">> Notes footer: " + footerText);
    System.out.println(">> Notes date time text: " + dateTimeText);

    // per-slide headers / footers
    for (int i = 0; i < slides.length; i++) {

      System.out.println(">> SLIDE #" + (i + 1));

      HeadersFooters hdd2 = slides[i].getHeadersFooters();
      headerText = hdd2.getHeaderText();
      footerText = hdd2.getFooterText();
      dateTimeText = hdd2.getDateTimeText();
      int slideNum = slides[i].getSlideNumber();

      System.out.println(">> HEADER: " + headerText);
      System.out.println(">> FOOTER: " + footerText);
      System.out.println(">> DATE TIME: " + dateTimeText);
      System.out.println(">> SLIDE NUM: " + slideNum);

    }

  }
}


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message