Hi.
I am trying to convert pptx file in svg format. But I can get only text and boxes of pptx file not whole content in svg file.
So my svg file looks formerly black & white.
Here is my code:
File pptx = new File("pptxfile_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();
}
and from SvgExporter.svg(source,rl) I get string svg(e.g. String svg = intermediate.toString("UTF-8");) to write svg file.
I don't know where I do mistake.
Please help me.