I've been trying to work out why the backgrounds aren't working, but not
getting very far :(
I've create a simple test that create a PPT file with a single slide
with the tomcat image as a background - which then fails to show up in
PowerPoint.
That file is only 17KB.
If I then use PowerPoint to change the background image the file
balloons to 200KB, which I think is down to it resizing the image and
storing that.
I've then been dumping out as much of the structure of the file as I can
try to make sense of.
The only significant difference seems to be that PowerPoint add an
EscherTertiaryOptRecord to the background, and POI has fill.rectright
and fill.rectbottom properties.
If anyone more knowledgeable could take a look I'd be happy to make all
this available.
Jim
On 07/12/2011 19:43, Jim Talbut wrote:
Hi,
If org.apache.poi.hslf.model.TestBackground.testBackgroundPicture is
modified to write to a file, instead of a byte array:
//serialize and read again
// ByteArrayOutputStream out = new ByteArrayOutputStream();
FileOutputStream out = new FileOutputStream(
"C:\\Temp\\TestBackground.ppt" );
ppt.write(out);
out.close();
// ppt = new SlideShow(new HSLFSlideShow(new
ByteArrayInputStream(out.toByteArray())));
ppt = new SlideShow(new HSLFSlideShow(new FileInputStream(
"C:\\Temp\\TestBackground.ppt" )));
Slide[] slides = ppt.getSlides();
The resultant PPT file does not have any images in it when loaded in
PowerPoint (just disappointing red crosses and unhelpful error messages).
The test itself passes, so it looks like the test is invalid/incomplete.
Bug 46288 looks relevant, but is ancient.
Anyone any idea what's wrong?
Thanks
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]