Bug 52687 - XSLFSlide.importContent fails to create valid slide with a single image in slide
Summary: XSLFSlide.importContent fails to create valid slide with a single image in slide
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.8-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-16 20:49 UTC by jwashbur65
Modified: 2012-02-21 12:19 UTC (History)
0 users



Attachments
Contains src.pptx, Merge.class and Merge.java source code (113.24 KB, application/x-zip-compressed)
2012-02-16 21:07 UTC, jwashbur65
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jwashbur65 2012-02-16 20:49:51 UTC
Have a presentation down to simplest form of 1 slide with a single image (src.pptx).  Doing merge code (see attached) creates a new presentation and
merges the slides from src.pptx (this is from cookbook example)

While the merged.pptx is created, PowerPoint pops up error message "PowerPoint found a problem with the content in merged.pptx."

Originally discussed in poi user's group (http://article.gmane.org/gmane.comp.jakarta.poi.user/18052).

Problem seen in POI 3.8 beta 5, as well as built latest from trunk, POI 3.8  


Zip attachment contains:
 - MergeFails.jar: self executing jar file
 - MergeFails_lib: necessary libraries to run MergeFails
 - src.pptx: The sample pptx slide show that has a single slide with 1 image
 - Merge.java: the source code

To run the code:
 - unzip MergeFails.zip
 - java -jar MergeFails.jar
Comment 1 jwashbur65 2012-02-16 21:07:43 UTC
Created attachment 28343 [details]
Contains src.pptx, Merge.class and Merge.java source code

to run:

java -cp .;poi-ooxml-3.8-beta5-20111217.jar;poi-3.8-beta5-20111217.jar;ooxml-schemas-1.1.jar;xmlbeans-2.3.0.jar;dom4j-1.6.1.jar Merge


Not able to include the specified jar files in the classpath as it makes the attachment too large.  The importContent fails on both the 3.8 beta 5 as well as latest from trunk, which at the time it generated poi-3.8-beta6-20120216.jar

Thanks,
Jeff
Comment 2 jwashbur65 2012-02-16 21:10:54 UTC
(In reply to comment #0)
> Have a presentation down to simplest form of 1 slide with a single image
> (src.pptx).  Doing merge code (see attached) creates a new presentation and
> merges the slides from src.pptx (this is from cookbook example)
> 
> While the merged.pptx is created, PowerPoint pops up error message "PowerPoint
> found a problem with the content in merged.pptx."
> 
> Originally discussed in poi user's group
> (http://article.gmane.org/gmane.comp.jakarta.poi.user/18052).
> 
> Problem seen in POI 3.8 beta 5, as well as built latest from trunk, POI 3.8  
> 
> 
> Zip attachment contains:
>  - MergeFails.jar: self executing jar file
>  - MergeFails_lib: necessary libraries to run MergeFails
>  - src.pptx: The sample pptx slide show that has a single slide with 1 image
>  - Merge.java: the source code
> 
> To run the code:
>  - unzip MergeFails.zip
>  - java -jar MergeFails.jar

The zip file mentioned in original post is inaccurate as it is no longer a self executing jar file since including all the jars exceeded the upload limit.  Had to change the zip file to only include the Merge.java, Merge.class and the src.pptx example slide
Comment 3 Yegor Kozlov 2012-02-21 12:19:54 UTC
Should be fixed in r1291730

The problematic image is associated with a  OOXML part that is not yet supported by POI (the part name is Custom Tag List). As result, the unsupported relationship was missing in the target file and PowerPoint choked.

Yegor