vote up 1 vote down star

hey,

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.

flag
1  
not programming related, belongs on superuser.com. try googling for "xpdf". – ax Oct 17 at 15:12
Good question (I like to know the answer) but not programming related, belongs on SU – DVK Oct 17 at 15:43

migrated from stackoverflow.com

4 Answers

vote up 3 vote down

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).

link|flag
vote up 1 vote down

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).

link|flag
vote up 0 vote down

pdftotext should work for this

link|flag
vote up -2 vote down

pdftotext does the job! many thanks!

link|flag
Don't add answers that are actually comments :-) – Will Robertson Oct 17 at 15:24
Do not post another "answer" but accept the proper answer that helped you. – Török Gábor Oct 17 at 15:25
Adam - I would suggest deleting this "answer", and accepting the answer you found helpful, to follow the guidelines of this site. Thanks! – DVK Oct 17 at 15:45

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.