Page 1 of 1

Document Files to HTML via PHP

Posted: Fri May 18, 2007 8:52 am
by anthony88guy
I'm in the process of creating a website where you can upload .doc files and also download them. The trivial part for me, is how would I go about giving the user a preview before downloading the file? Would it be possible to convert the .doc file via PHP to a readable format? I tried opening a .doc file in notepad just to see what I get... a lot of garble.

I did a quick search for a PHP Class that would do so... no luck, but I found a class that can edit a .xls file... so I guess there is hope. Even if I have to make it myself.


Any input is greatly appreciated.

//anthony

Posted: Fri May 18, 2007 8:57 am
by feyd

Posted: Mon May 21, 2007 11:02 am
by anthony88guy
thanks for your response, but I was looking for the conversion being done server side.

The ideal scenario:
  • User uploads document (.doc)
    Server creates html version
    User can view document online in html format & download in .doc or .html format

You can view documents through Google in an html format, so it is possible.

Any suggestions?