aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes convert pptx file to images using apache poi 3.8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "convert pptx file to images using apache poi 3.8" Watch "convert pptx file to images using apache poi 3.8" New topic
Author

convert pptx file to images using apache poi 3.8

Dilanka Muthukumarana
Greenhorn

Joined: Mar 28, 2009
Posts: 9
Hi All,

I am trying to convert pptx file to images (Slide by Slide). but I am getting below exception. I have put all the jar files downloaded with poi package. but still giving this error. Kindly advice on this matter.

####<Sep 18, 2013 7:12:08 PM SGT> <Notice> <Stdout> <localhost.localdomain> <WC_Spaces1> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <11d1def534ea1be0:7cd1496a:1413090cc5d:-8000-000000000[size=12]
000a948> <1379502728572> <BEA-000000> <<Sep 18, 2013 7:12:08 PM SGT> <Error> <oracle.webcenter.webcenterapp.internal.view.webapp> <BEA-000000> <
javax.el.ELException: java.lang.NoClassDefFoundError: org/openxmlformats/schemas/drawingml/x2006/main/CTEffectStyleList
at com.sun.el.parser.AstValue.invoke(AstValue.java:191)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
at oracle.adf.view.rich.component.rich.RichPopup.broadcast(RichPopup.java:692)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
......

Caused By: java.lang.NoClassDefFoundError: org/openxmlformats/schemas/drawingml/x2006/main/CTEffectStyleList
at org.openxmlformats.schemas.drawingml.x2006.main.impl.CTStyleMatrixImpl.getEffectStyleLst(Unknown Source)
at org.apache.poi.xslf.usermodel.XSLFSimpleShape.getShadow(XSLFSimpleShape.java:523)
at org.apache.poi.xslf.usermodel.RenderableShape.render(RenderableShape.java:517)
at org.apache.poi.xslf.usermodel.XSLFSimpleShape.draw(XSLFSimpleShape.java:534)
at org.apache.poi.xslf.usermodel.XSLFSheet.draw(XSLFSheet.java:500)
....

below is the location that getting exception in my code: (Kindly note this is sample code, I copied relevant part only)

FileInputStream is = new FileInputStream(file); // debug point coming to this line
xmlSlideShow = new SlideShow(new FileInputStream(file));
BufferedImage buffImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); // debug point coming to this line

for (int i = 0; i < slideLength; i++) {

xmlSlideShow.getSlides()[i].draw(graphics); // exception occurs on this line.

}


please advice any other way using poi 3.8 version.[/size]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42929
    
  68
For starters, you should switch to POI 3.9. POI is a very stable library, you can generally switch to the latest version without problems.

When you say "I have put all the jar files downloaded with poi package", does that include one called poi-ooxml-schemas-3.9.jar or something similar? That's the one that contains the missing class.
Dilanka Muthukumarana
Greenhorn

Joined: Mar 28, 2009
Posts: 9
yes.. I used poi-ooxml-schemas-3.8.jar .but its not working. I will try with 3.9 version. Thanks for the quick reply..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42929
    
  68
That sounds odd. What is the exact command you entered on the command line, or -if you use the CLASSPATH variable- what is its value? Or if you use Ant, post the relevant lines of the build file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: convert pptx file to images using apache poi 3.8