Reading PDFs on the command line (with misc/lesspipe)
Niklaas Baudet von Gersdorff
stdin at niklaas.eu
Thu Jun 30 08:58:31 UTC 2016
Polytropon [2016-06-29 14:03 +0200] :
[...]
> > > http://www.manualpages.de/FreeBSD/FreeBSD-ports-9.0-RELEASE/man1/pdftotext.1.html
> > > http://unix.stackexchange.com/questions/41362/view-pdf-file-in-terminal
> > >
> > > I wonder how it is handled assumed "some.pdf" is just a scanned picture
> > > of text converted to pdf ;).
> >
> > /usr/local/libexec/xpdf/pdfimages is installed by default by package
> > xpdf.
Thanks for the second link. That made me realise that
misc/lesspipe uses xpdf's pdftotext to view the PDF. I thought
that I wouldn't need xpdf's utils if I had lesspipe installed.
> And then use ImageMagick to convert it to ASCII art. :-)
Haha. Great idea. However, I simply want to get a glimpse of what
is written in the PDF before I start downloading it with scp.
Bertram Scharpf [2016-06-29 14:16 +0200] :
> I do the following (from the shell, not yet from mutt):
>
> - Forward X to the desktop machine:
>
> xto() {
> local h l d
> h=${1:-desktop}
> l=`hostname -f`
> d=":0"
> ssh $h "
> export DISPLAY=$d
> xhost $l 1>&2
> xauth extract - $d
> " | xauth -f ~/.Xauthority merge -
> export DISPLAY=$h$d
> }
>
> - Run xpdf.
>
> Of course, this requires xpdf and a lot of X client stuff to
> be installed on the (anything but X) server.
This looks very interesting. Thanks for sharing!
Niklaas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20160630/beaa4afb/attachment.sig>
More information about the freebsd-questions
mailing list