I'm having some trouble transforming a .pptx file to html. Here is the code
- Code: Select all
File pptx = new File("some_path");
try {
PresentationMLPackage source = PresentationMLPackage.load(pptx);
Iterator partIterator = source.getParts().getParts().entrySet().iterator();
while (partIterator.hasNext()) {
Map.Entry pairs = (Map.Entry) partIterator.next();
Part p = (Part) pairs.getValue();
if (p instanceof SlidePart) {
ResolvedLayout rl = ((SlidePart) p).getResolvedLayout();
System.out.println(XmlUtils.marshaltoString(rl.getShapeTree(), false, true, Context.jcPML,
"http://schemas.openxmlformats.org/presentationml/2006/main", "spTree", GroupShape.class));
SvgExporter.svg(source, rl);
}
}
} catch (Docx4JException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
When I run the code, "SvgExporter.svg(source, rl);" line gives an exception:
- Code: Select all
2010-05-03 13:30:03,545 ERROR [org.docx4j.utils.ResourceUtils] - <Couldn't get resource: org/pptx4j/convert/out/svginhtml/pptx2svginhtml.xslt>
I'm using the "docx4j-nightly-20100422.jar" which I downloaded from http://dev.plutext.org/docx4j/ .
Anyone have any idea what the problem is? And better yet, how can I get HTML out of the .pptx file?
Thanks in advance!