Reading PDFs on the command line (with misc/lesspipe)

Polytropon freebsd at edvax.de
Wed Jun 29 11:40:41 UTC 2016


On Wed, 29 Jun 2016 12:29:45 +0200, Niklaas Baudet von Gersdorff wrote:
> Since I use mutt to read emails on my server, I would like to
> read PDFs on the command line. How can I do that?

I'm using the pdftotext command, part of the xpdf package.
Its output can be redirected.



> I installed misc/lesspipe and -- as far as I can judge --
> configured it properly.
> 
>   $ echo $LESSOPEN
>   |/usr/local/bin/lesspipe.sh %s
> 
> However, if I run
> 
>   $ less some.pdf
> 
> I still get an unreadable output of fancy symbols.

Probably there is no processing step included?




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list