Document Files to HTML via PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Document Files to HTML via PHP

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post 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?
Post Reply