任何用于ppt到jpg转换的java库?

时间:2022-10-29 21:19:43

Do you know any java library for ppt to jpg conversion?

你知道ppt到jpg转换的任何java库吗?

I've tried openoffice3 and POI (http://poi.apache.org/slideshow/quick-guide.html).

我尝试过openoffice3和POI(http://poi.apache.org/slideshow/quick-guide.html)。

OpenOffice takes quite long to load (full startup), even though I want to convert the slides only. POI-HSLF only generates images for simple slides (created by myself). all the test slides getting from internet failed to generate image, and the images it generated are very ugly/primitive.

加载OpenOffice需要很长时间(完全启动),即使我只想转换幻灯片。 POI-HSLF仅为简单幻灯片生成图像(由我自己创建)。从互联网上获取的所有测试幻灯片都无法生成图像,并且它生成的图像非常难看/原始。

2 个解决方案

#1


3  

You will need something full-fledged like OpenOffice.org, because as you noticed, those slides can become very complex.

您将需要像OpenOffice.org这样的完整版本,因为正如您所注意到的那样,这些幻灯片可能变得非常复杂。

POI mostly implements the file format of the office formats. A whole big chunk is still missing from your task: layout and composition. While the simplest slides are easy to layout, anything that goes above the default settings (or needs an high-fidelity reproduction of how it looks in the original) will be very hard to implement.

POI主要实现办公格式的文件格式。你的任务中仍然缺少一大块:布局和构图。虽然最简单的幻灯片易于布局,但任何超出默认设置(或需要高保真再现其原始外观)的内容都将非常难以实现。

The only good news I can offer is that you can run OpenOffice.org in server mode so that you have to pay the startup cost only once (especially in a server environment that is a big gain).

我能提供的唯一好消息是您可以在服务器模式下运行OpenOffice.org,这样您只需支付一次启动成本(特别是在服务器环境中获得巨大收益)。

#2


0  

I'm aiming for docx4j to be able to convert pptx slides to svg. Then you could use another tool to go from svg to jpg.

我的目标是docx4j能够将pptx幻灯片转换为svg。然后你可以使用另一个工具从svg转到jpg。

docx4j can already open pptx files, but there is a long way to go before the conversion to svg is commercial quality.

docx4j已经可以打开pptx文件,但是在转换为svg之前还有很长的路要走。

#1


3  

You will need something full-fledged like OpenOffice.org, because as you noticed, those slides can become very complex.

您将需要像OpenOffice.org这样的完整版本,因为正如您所注意到的那样,这些幻灯片可能变得非常复杂。

POI mostly implements the file format of the office formats. A whole big chunk is still missing from your task: layout and composition. While the simplest slides are easy to layout, anything that goes above the default settings (or needs an high-fidelity reproduction of how it looks in the original) will be very hard to implement.

POI主要实现办公格式的文件格式。你的任务中仍然缺少一大块:布局和构图。虽然最简单的幻灯片易于布局,但任何超出默认设置(或需要高保真再现其原始外观)的内容都将非常难以实现。

The only good news I can offer is that you can run OpenOffice.org in server mode so that you have to pay the startup cost only once (especially in a server environment that is a big gain).

我能提供的唯一好消息是您可以在服务器模式下运行OpenOffice.org,这样您只需支付一次启动成本(特别是在服务器环境中获得巨大收益)。

#2


0  

I'm aiming for docx4j to be able to convert pptx slides to svg. Then you could use another tool to go from svg to jpg.

我的目标是docx4j能够将pptx幻灯片转换为svg。然后你可以使用另一个工具从svg转到jpg。

docx4j can already open pptx files, but there is a long way to go before the conversion to svg is commercial quality.

docx4j已经可以打开pptx文件,但是在转换为svg之前还有很长的路要走。