0

In my new (PHP) project my requirement is to convert ppt and doc to html using php. Does anybody know how it can be done?

I search so many forums and found that we can convert ppt to html using EXEC() command from php code by calling OPENOFFICE software.

Can anybody tell me what is the command of openoffice to convert ppt to html.

Can anybody help me how it will done on windows and linux server. My local machine have windows and server is in linux.

Also if somebody help to convert doc to html?

Maks3w
  • 6,014
  • 6
  • 37
  • 42

1 Answers1

0

On Windows there will not be many problems but on linux You will have some headaches to get it working

use something like:

$sCmd = "$sLibreOfficeBin --headless --invisible --nologo --nofirststartwizard --convert-to html --outdir $sTmpFolder "old_file.ppt";
Juris Malinens
  • 1,251
  • 1
  • 9
  • 13
  • what is $sLibreOfficeBin? Is it path of openooffice installed into c: drive ? – Hemant Agrawal Sep 13 '12 at 07:19
  • @HemantAgrawal - LibreOffice is a forked version of OpenOffice. They're separate projects but basically the same. So the answer to your question is "yes, it's the location of the OOo executable program file". – SDC Sep 13 '12 at 09:00
  • I have to install LibreOffice ? we can't do it using openoffice directly ? in my local pc i already installed openoffice. – Hemant Agrawal Sep 13 '12 at 09:50
  • i have tried with openoffice command directly , but it's not working. – Hemant Agrawal Sep 14 '12 at 07:13
  • sorry but "not wokring" doesn't help me much to help You... instead of html try HTML. You should get error if You doing something wrong... – Juris Malinens Sep 14 '12 at 21:07