Apache POI将pptx转换为svg,image

时间:2014-10-09 14:57:08

标签: svg apache-poi powerpoint

我正在使用Apache POI PPTX to SVG conversion。除了嵌入到幻灯片中的图像之外,这适用于大多数图像。

这些在生成的svg文件中显示为空白。因此,original slide等幻灯片显示为

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-dasharray="none" shape-rendering="auto" font-family="'Dialog'" width="720" text-rendering="auto" fill-opacity="1" contentScriptType="text/ecmascript" color-interpolation="auto" color-rendering="auto" preserveAspectRatio="xMidYMid meet" font-size="12" fill="black" stroke="black" image-rendering="auto" stroke-miterlimit="10" zoomAndPan="magnify" version="1.0" stroke-linecap="square" stroke-linejoin="miter" contentStyleType="text/css" font-style="normal" height="540" stroke-width="1" stroke-dashoffset="0" font-weight="normal" stroke-opacity="1">
<!--Generated by the Batik Graphics2D SVG Generator-->
<defs id="genericDefs"/>
<g>
<g fill="white" stroke="white">
<rect x="0" width="720" height="540" y="0" stroke="none"/>
</g>
<g stroke-miterlimit="1" stroke-width="0.25" font-size="44" font-family="'Calibri'" stroke-linecap="butt" stroke-linejoin="round">
<text x="256.875" xml:space="preserve" y="81.5196" stroke="none">Introducing</text>
</g>
</g>
</svg>

基本上缺少图片。

我该如何解决?虽然如果可能的话我希望将此幻灯片转换为svg,将其转换为png或jpeg可以解决此问题吗? **

更新

以下是我的依赖

"org.apache.poi" % "poi" % "3.11-beta2",
  "org.apache.poi" % "poi-ooxml" % "3.11-beta2",
  "org.apache.poi" % "poi-scratchpad" % "3.11-beta2",
  "org.apache.xmlgraphics" % "batik-transcoder" % "1.7"

原始文件是jpg / jpeg。


我也看到了这一点 警告:无法获取charToByteConverterClass!

0 个答案:

没有答案