views:

483

answers:

2

Hi,

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

I've tried openoffice3 and 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.

+3  A: 

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

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.

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).

Joachim Sauer
A: 

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 can already open pptx files, but there is a long way to go before the conversion to svg is commercial quality.

plutext