Tput setaf 3 tput setab 4 pdftotext - |less You can also color it up by using tput (also works with more) Try it out yourself:Īs you can see it works! At this point it can be piped in another application. This way the output is redirected to stdout and printed on your terminal. Converter: pdftotext, pdftohtml (both from the poppler package as said)Īll these software works out of the box, anything else not listed here may behave in a strange way.Pdftotext can be used with many pagers, editors and browsers as does pdftohtml, however the latter works best with browsers.Īs both software can get a pdf file from a URL I’ll use a PDF from the internet (George Orwell 1984, under public domain in Australia) so that you can copy and paste all these command to get the same result as I do. pdftotext converts a PDF file to a simple text file.There are 2 ways to achieve this task, both have the original pdf file converted in another format and both these tools are part of the poppler package: So how to read PDF files from the command line? With the same text editors you can also read text, actually for that specific matter there are plenty of pagers too.īut these software can’t read all file extensions out of the box, one of these extension are PDF files. I use it mostly to write, I connect my usb keyboard and I magically have all the almighty terminal power on my SmartPhone. The app is basically a mini-Linux command-line distro, full of software and things to do. On a previous post I showed a fantastic Android application called Termux
0 Comments
Leave a Reply. |