Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does anyone know of any software (preferably open source, Linux or PHP) that can convert both PDF and/or DOC/DOCX (and maybe other document formats too: rtf, txt, etc.) to HTML?

I've got "PDFtoHTML" software working but this not appear to also convert DOC/DOCX files.

share|improve this question

migrated from stackoverflow.com Oct 28 '11 at 19:41

This question came from our site for professional and enthusiast programmers.

3 Answers 3

You should give unoconv a spin. It should be able to convert anything that Open Office can read to anything it can write.

This works on doc/docx and a whole lot of other files. It does not seem to work on PDF's so I guess you're stuck with using 2 separate programs for the job.

share|improve this answer
    
hi jpjacobs, thanks for the tip, i hadn't heard of unoconv, will give it a shot, thanks! -tim –  tim peterson Oct 28 '11 at 14:10

I successfully put a portable version of libreoffice on my host's webserver, which I call with PHP to do a commandline conversion to .docx, etc. to pdf. on the fly. I do not have admin rights on my host's webserver. Here is my blog post of what I did:

http://geekswithblogs.net/robertphyatt/archive/2011/11/19/converting-.docx-to-pdf-or-.doc-to-pdf-or-.doc.aspx

Yay! Convert directly from .docx or .odt to .pdf using PHP with LibreOffice (OpenOffice's successor)!

share|improve this answer

Have you tried PHPDocX? It allows you to do quite a few more things with docx files.

There is a generateXHTML method.

share|improve this answer
    
it looks like PHPDocX does makes .docx files but i'm looking for software that converts .docx files to HTML. Am i confused? –  tim peterson May 8 '12 at 8:05

Your Answer

 
discard

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.