Opening PDF file in Linux console (shell)

Opening PDF file in Linux console (shell)

I was curious how to open (read) PDF files in Linux console. I searched about it long time ago and on that time I found the solution as well but I have never intended to utilize it. That’s because recently I switched to text-mode (console mode) mainly, so I have started reading PDF file in text-mode.

Opening PDF file is really simple, do not waste your time with converting PDF to HTML and open each HTML page with text-mode browser like lynx, w3m or links.

Instead just use less command to open PDF file directly. Of course it does not show like real PDF file in GUI but it is completely readable and suits my needs at perfectly.

Do not expect to see any pictures or overall graphics when opening a PDF using less.

Even if you follow the HTML way it can not show PDF file very well and it shows the same as less command.

Finally, less command cannot show PDF file properly when the file is encrypted (not password protected).

This is something which even I do not know yet how to tackle it.

Inline/featured images credits