Poi PPT PPTX 处理 [生产环境使用]
poi 在 PPT 转成图片的时候,PPT 会有很多复杂的东西,导致解析困难
如以下复杂结构:
1,文本框套文本框套文本框,嵌套文字
2,文本框嵌套图片
等等。。。。
求助各位大佬,如何解析复杂的结构,让我可以将一页 PPT 转成图片
poi 在 PPT 转成图片的时候,PPT 会有很多复杂的东西,导致解析困难
如以下复杂结构:
1,文本框套文本框套文本框,嵌套文字
2,文本框嵌套图片
等等。。。。
求助各位大佬,如何解析复杂的结构,让我可以将一页 PPT 转成图片
发链接要手机号验证。。。。
HSLF provides a way to export slides into images. You can capture slides into java.awt.Graphics2D object (or any other) and serialize it into a PNG or JPEG format. Please note, although HSLF attempts to render slides as close to PowerPoint as possible, the output may look differently from PowerPoint due to the following reasons:
– Java2D renders fonts differently vs PowerPoint. There are always some differences in the way the font glyphs are painted
– HSLF uses java.awt.font.LineBreakMeasurer to break text into lines. PowerPoint may do it in a different way.
– If a font from the presentation is not available, then the JDK default font will be used.
Current Limitations:
– Some types of shapes are not yet supported (WordArt, complex auto-shapes)
– Only Bitmap images (PNG, JPEG, DIB) can be rendered in Java
或许是真的不能支持这些复杂的妖魔鬼怪 PPT 吧。
#8 尝试了一下 LibreOffice_6.4.6_Win_x64 命令行,Windows 下 会出现字是横着的,但是变成了竖着的。尴尬