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.

PDF to TEXT open source command line tool ? It must be Command line utility & should be open source, free to use.

share|improve this question

migrated from stackoverflow.com Jun 8 '11 at 20:46

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

4 Answers 4

up vote 7 down vote accepted

Personally, I use PDFMiner for Python (>= 2.6). It's simple enough, and it has always seemed to work consistently.

share|improve this answer

You may try to use pdftotext, which is an open source command-line utility for converting PDF files to plain text files.

Here is the usage example:

ls *.pdf | xargs -L1 -I% pdftotext % %.txt

Alternatively:

ls *.pdf | xargs -n1 pdftotext
find . -name '*.pdf' -print0 | xargs -0 -n1 pdftotext

Read more:

share|improve this answer

I use pdftotext in poppler-utils on Ubuntu. It works great. The -layout option is especially helpful with tables.

share|improve this answer
    
curl http://www.example.com/foo.pdf | pdftotext - - | less rocks, and poppler is very frequently installed on Linux machines. PDFMiner is pure Python, which can be useful, e.g on Windows platforms or without root access), but then "PDFMiner is about 20 times slower than other C/C++-based counterparts such as XPdf." (from their homepage) –  Lloeki Nov 28 '12 at 13:13

Pdftotext, which is a part of Xpdf package, is what you are looking for.

share|improve this answer

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.