Convert doc to txt via commandline

Viewed 21290

We're searching a programm that allows us to convert a doc or docx document to a txt file. We're working with linux and we want to start a website that converts user uploaded doc files. We don't wanna use open office/libre office cause we have bad experience with that. Pandoc can't handle doc files :/

Anyone have a idea?

4 Answers

For doc files you may use antiword, it's available on Homebrew and Ubuntu.

You can also use pandoc:

Keep the layout (newline as in the visualization of the document):

pandoc -s mydocument.docx  -o ouput.txt

Newline only when the original text has a newline command:

pandoc --wrap=none -s mydocument.docx  -o ouput.txt
Related