poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <n...@torchbox.com>
Subject Re: HSLF getting text from each slide in sequence
Date Thu, 04 May 2006 11:13:04 GMT
On Sat, 29 Apr 2006, Mihali A. Felipe wrote:
> Hi. I'm new to POI and am getting a little perplexed. I'm trying to do 
> something seemingly simple - getting text from each slide in sequence 
> while keeping track of which slide the text is from. However, the slides 
> do not show up in sequence (and it seems like some slides are repeated 
> e.g. try it on 
> http://www.gersteinlab.org/lectures/ppt/A2K-at-Yale-20060422.ppt).

> Also, I don't know where/how to get the real slide number.

Alas, nor do we. Each core record (Document, Slide, Notes, MainMaster etc) 
has a unique ID. This ID is used by the PersistPtr stuff, so it can look 
up that ID to an actual record in the file. This same number is also used 
to link a Notes back to its Slide.

I'd assumed that this number might bear some relation to the slide 
ordering. It turns out that the numbering is based on the order the slides 
were added in, and when you re-order, it isn't updated.

So, until we can figure out where PowerPoint does store the slide 
ordering, we can't return the slides in that order.

If you can find another open source powerpoint reader (that isn't 
OpenOffice, since that has brain hurting code) that does get the slides in 
the right order, can you let us know? We can then take a look through 
their code, and try to figure out what record / records are used for the 
slide ordering.

> P.S. Why does getSheetNumber() keep giving me -1?

On a recent SVN checkout, it should give you one higher than the 
slide's position in the array of slides. Are you sure you have a recent 
enough copy of POI?


To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

View raw message