Reputation: 33944
I need to convert PowerPoint 2003/2007(ppt/pptx) to HTML. But I have not found any code how to do this. So, how to Convert MS PowerPoint 2003/2007(ppt/pptx) into HTML using APACHE POI or Else? I have found Apache POI. But don't know what code can do the trick
Upvotes: 2
Views: 3380
Reputation: 580
I'm assuming this needs to be a programmatic solution.
You could do this by writing your own Servlet that looks at the files contents and reproduces them using the various classes the POI Powerpoint library has to offer.
You could change each slide to an image and then display it in an html img tag.
You could also try working with a raw xml dump. You could get this and then turn it into an html document using an xslt file. I think this would only work with newer files(.pptx) using xslf.
note: The functionality you will need is likely to be limited depending on which file you are transforming http://poi.apache.org/slideshow/index.html. The older files must use hslf whilst the newer OOXML based files can use xlsf. "There is currently no common interface".
Upvotes: 1
Reputation: 641
Apache POI can be used to read powerpoint (ppt/pptx) and extract data. You may find this article important on doing that. If you want .pptx use use org.apache.poi.xslf.XSLFSlideShow instead of HSLSFSlideShow, and then use the classes in org.apache.poi.xslf.* instead of the ones in org.apache.poi.hssf.*
Upvotes: 1
Reputation: 14520
i would say 'or else', but depends on what do you exactly need. if your ppt has very strict and known layout and you need html to be clickable, have links etc, you can try to do it. we chose different approach. we connected to running instance of power point using COM library and we just executed powerpoint commands directly. however i don't see any 'save as html' so seems like choosing this way you will have to save ppt as a picture and then create html with it. it's a big pain in the ass to develop it but once done you can have very complex presentations without any additional work
Upvotes: 1
Reputation: 9424
I think you will not find a complete example, but if you follow the tutorial to read a file and how to extract data from each slide (http://poi.apache.org/slideshow/quick-guide.html) you will be able to perform what you want.
Upvotes: 1