Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a command line tool that will extract plain text from MS office files(all formats), pdf and other file formats.

I looked at libre office command line but was not able to find the filters for all formats

share|improve this question
I got pdftotext and for .doc I have got unoconv but for docx,pptx,xls,xlsx I have not found any. – coder Sep 12 '13 at 4:51
For .doc, there's also antiword. The pdftotext that coder mentioned is part of poppler. – soulsource Sep 12 '13 at 5:10

For office files you can use:

libreoffice --headless --convert-to output_file_extension[:output_filter_name] [--outdir out‐put_dir] file

More about:

For pdf files, I see that you have found pdftotext.

share|improve this answer

Your Answer


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.