Page 1 of 1

Converting a pptx to a web friendly output

PostPosted: Thu Jun 14, 2012 6:32 am
by twistedsymphony
I have a project in front of me where I've been tasked with displaying the content of a pptx file inside an intranet browser app (no connection to the web).
so far pptx4j seems like my best option.

I don't work with java very often so what limited knowledge I have doesn't get used very often.

I've started with this example here: http://www.docx4java.org/svn/docx4j/tru ... nHtml.java

unfortunately I'm having some trouble getting it running ... it runs most of the way through but then this line:
Code: Select all
SvgExporter.svg(presentationMLPackage, (SlidePart)p)


throws this error:
Exception in thread "main" java.lang.NullPointerException
at org.docx4j.XmlUtils.transform(XmlUtils.java:767)
at org.docx4j.XmlUtils.transform(XmlUtils.java:727)
at org.pptx4j.convert.out.svginhtml.SvgExporter.svg(SvgExporter.java:172)
at org.pptx4j.convert.out.svginhtml.SvgExporter.svg(SvgExporter.java:140)
at org.pptx4j.convert.out.svginhtml.SvgExporter.svg(SvgExporter.java:125)
at org.pptx4j.convert.out.svginhtml.SvgExporter.svg(SvgExporter.java:106)
at docx_converter.RenderAsSvgInHtml.main(RenderAsSvgInHtml.java:67)


I have a feeling I'm missing something very simple but I've yet to figure out what...

Any help would be greatly appreciated, thanks.

Re: Converting a pptx to a web friendly output

PostPosted: Thu Jun 14, 2012 12:13 pm
by jason
Which version of docx4j? 2.8.0? Knowing that should be enough to fix the NPE, but a sample pptx exhibiting the issue will enable us to be sure it is fixed.

Re: Converting a pptx to a web friendly output

PostPosted: Thu Jul 27, 2017 7:58 pm
by ysf199711
You are missing the jaxb-svg11-1.0.2 pack