Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

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 Jun 8 '11 at 20:46

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

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

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

share|improve this answer
curl | 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

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


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

Read more:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .