Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to convert Powerpoint files to PNG in PHP. I can do the conversion with using COM in PHP but COM is only supported on Windows. I need to do this for both Windows and Linux.

I am wondering if someone give me hints about that conversion.

share|improve this question
@ZaphodBeeblebrox yes Powerpoint. – Ariful Islam Jan 17 '12 at 12:50

I can think of two solutions, a creative one and one that won't work (yet).

The creative one is to convert Powerpoint files to something a bit more Linux friendly, by calling OpenOffice's converters via the command line. And then convert to PNG. Creative, to say the least, and of course it requires that you can install OpenOffice on your server.

The other solution is the PHPPowerPoint library, currently in alpha. It only works with Microsoft's OpenXML format, and it's of a similar lineage as PHPExcel and PHPWord. I'm pretty sure that it doesn't utilize COM, but since it's still alpha and very recent it most probably won't do exactly what you want. But you can always build upon it.

Both approaches are highly problematic. But so is Powerpoint, so I guess you expected that when you asked.

share|improve this answer
Thanks a lot for answer. I am checking the PHPPowerPoint....+1 – Ariful Islam Jan 17 '12 at 13:08
@Arif I used it at some point, but I'm way more familiar with PHPExcel, I can't be certain it will work for you. Hope it does... – Yannis Jan 17 '12 at 13:09
it is mainly used for create PowerPoint. do you think so? May be i need to convert openXML to JPEG. – Ariful Islam Jan 17 '12 at 13:24
@Arif Well I did write in the answer that it wouldn't work (yet). Check out the code, there is a reader in there. But it's still alpha, the main reason I posted it was that you could look at the code and build upon it. AFAIK there isn't a ready made solution (yet). – Yannis Jan 17 '12 at 13:27

Your Answer


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.