Can I convert a Word Doc file into HTML using PHP

jf1288

Limp Gawd
Joined
Jun 18, 2004
Messages
383
Is there a library or built in functions that would let me have a user upload a .doc file and then convert it into HTML?

Thanks for any tips,
Jordan
 
There certainly are no built-in functions. I don't know of any libraries; tried searching?
 
Try wv. It won't be perfect because of the doc format's closed nature, but should work well enough.
 
this may or may not help, but I use Dreamweaver to convert Word to HTML. I literally get hundreds of pages of Words docs per month that i have to convert and with DW it's just a matter of cutting from word and pasting into dreamweaver. The conversion produces clean markup, and though it's not 100% foolproof, it usually gets me 90% there.
 
maw said:
this may or may not help, but I use Dreamweaver to convert Word to HTML. I literally get hundreds of pages of Words docs per month that i have to convert and with DW it's just a matter of cutting from word and pasting into dreamweaver. The conversion produces clean markup, and though it's not 100% foolproof, it usually gets me 90% there.

Again, this isn't what i need. I could easily save the Word Doc as HTML, or copy it into dreamweaver, but I need a method that a web app. can do it on the fly.

Thanks anyways. I'm checking out WV now.
 
jf1288 said:
Again, this isn't what i need. I could easily save the Word Doc as HTML, or copy it into dreamweaver, but I need a method that a web app. can do it on the fly.

Thanks anyways. I'm checking out WV now.

sorry, i'm like a complete dumbass.. i totally overlooked the part where you said "user upload" :eek:
 
Ok, I have less than no idea on how to use this. It seems as though I need to compile it myself, but I wouldn't know how to do this. I'm not even sure if WV is meant for a webserver. It mentions Imagemagic, but then seemslike it's designed for programs to use it for their own conversion, rather than in a webserver environment.

As I getting the wrong impression of it?
 
jf1288 said:
Ok, I have less than no idea on how to use this. It seems as though I need to compile it myself, but I wouldn't know how to do this. I'm not even sure if WV is meant for a webserver. It mentions Imagemagic, but then seemslike it's designed for programs to use it for their own conversion, rather than in a webserver environment.

As I getting the wrong impression of it?

You may compile it yourself, or grab a binary. If you're running Linux/Unix, it will probably be available in your package management system. If you're running Windows, grab a binary from GNUWin32.

Grab the setup program, and you shouldn't have to worry about dependencies.

To get the HTML for a word file, run wvHTML on the word file and send the output to the user.
 
Back
Top