Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Given a PowerPoint presentation in .ppt format, what is the best way to programmatically and using only open source software extract an image representation (in say .jpg or .png) of each slide in the presentation?

The application will run in a Linux server environment, so installing Microsoft Office or Keynote is not an option.

The functionality that I want to achieve programmatically is similar to:

  • Keynote's export functionality (File > Export... > Pictures > JPEG)
  • PowerPoint's Save As JPEG functionality (Save As > Other Formats > JPEG)
share|improve this question

6 Answers 6

up vote 18 down vote accepted
+100

You should probably give unoconv a try. According to the man page, "unoconv is a command line utility that can convert any file format that OpenOffice can import, to any file format that OpenOffice is capable of exporting. "

So, to convert ppt to, say, png, you do:

unoconv -f png some-slides.ppt

Should that failed, you may try JODConverter or PyODConverter from Art of Solving. For example, you can use JODConverter from command line:

java -jar lib/jodconverter-cli-2.2.0.jar document.ppt document.png
share|improve this answer

Given your requirement to run on Linux, it's probably easiest to automate OpenOffice.org.

Exporting as HTML will give you a JPEG or PNG image with configurable quality for each slide.

share|improve this answer

Years ago I used Slide Splitter for Impress for this same exact need. Worked with ppt slides as well and exporting to .jpeg.

share|improve this answer

If using a web API is an option I would try google docs API. You can upload a ppt document and then download it back in any of the supported formats including pdf and png.

share|improve this answer

You can use PDFCreator (albeit on Wine)

share|improve this answer

Apache POI is a Java library, but has a command-line utility for converting a PPTX files to PNG files.

To run it, invoke this command inside the root of the library's binary download folder:

java -cp "poi-3.10-FINAL-20140208.jar;poi-ooxml-3.10-FINAL-20140208.jar;poi-ooxml-schemas-3.10-FINAL-20140208.jar;ooxml-lib\dom4j-1.6.1.jar;ooxml-lib\stax-api-1.0.1.jar;ooxml-lib\xmlbeans-2.3.0.jar;lib\commons-codec-1.5.jar;lib\commons-logging-1.1.jar;lib\log4j-1.2.13.jar" org.apache.poi.xslf.util.PPTX2PNG presentation.pptx

It's not 100% perfect--I noticed that it doesn't like WordArt or images that have been cropped from within PowerPoint.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["        <li><a href=\"http://area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"http://careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.7.30.1736\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Stack Overflow works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </nos"], "copyright__copyright__copyright": ["r;ooxml-lib\\xmlbeans-2.3.0.jar;lib\\commons-codec-1.5.jar;lib\\commons-logging-1.1.jar;lib\\log4j-1.2.13.jar\" org.apache.poi.xslf.util.PPTX2PNG presentation.pptx\n\nIt's not 100% perfect--I noticed that it doesn't like WordArt or images that have been cropped from within PowerPoint.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}