Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was just wondering if there is a way to display content of a pdf file inside terminal, you know just like doing 'less file.txt' but with pdf files.

share|improve this question

migrated from stackoverflow.com Oct 17 '09 at 22:13

2 Answers

The program pdftotext, which comes as a part of xpdf, can convert a PDF to text. There is also a program called lesspipe, which can be set as a preprocessor for less so that if you have pdftotext or something like it installed, you can just use less with PDF (and many other types of files).

share|improve this answer

There are tools that allow to extract text from pdf files (google for it) but IMHO there are cases where this will simply be no possible (imagine a pdf that contains only images).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.