poi-user mailing list archives

Filip,
What do you mean by re-read the file after every save? I modified my
prototype so that after every call to save the PowerPoint slide I create
a new handle to the SlideShow ('ppt = new SlideShow(new
FileInputStream(file))' or just call 'createPpt' with the same filename
in the prototype) and use the new handle to perform the createSlide and
save operations. This change has no effect and I still end up getting a
corrupt slideshow.
Thanks,
Joe
-----Original Message-----
From: Filip Defoort [mailto:filipdef@cirquedigital.com]
Sent: Thursday, January 21, 2010 1:18 PM
To: POI Users List
Subject: Re: 3rd PowerPoint Slide is Corrupt
On Thu, Jan 21, 2010 at 11:14 AM, Joe Dente <jdente@21technologies.com>
wrote:
> Thanks for the response.
>
> I find it very hard to believe that nobody's come across this issue
> before, so I'm sure I am just doing something wrong such as not
> releasing or closing an object or something. Here's a small java app
> that demonstrates the problem. I've tried it with POI-3.2-FINAL (the
> version I was intending to use) as well as POI-3.6 and the problem
> exists in both versions. The main will generate two ppt presentations;
> the 'twoSlides.ppt' deck is valid and the 'threeSlides.ppt' deck will
be
> corrupt when you try and open them in PowerPoint. One interesting
thing
> to note is that if you generate 3 slides and then do a single save as
> opposed to saving after creating every slide, the slide deck is not
> corrupted.
Actually, I have seen this before with the XSSF libraries - it seems
that when you save some state gets reset and you start getting errors
during all kinds of operations.
The only workaround I found was to re-read the file after save (it was
a Workbook in my case).
HTH,
- Filip
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org