Hacker News new | ask | show | jobs
by dredmorbius 2298 days ago
I've had remarkably good results in general (for reading) using the Poppler library's "pdftotext" utility. Since it defaults to writing output to file, I wrap that in a bash function to arrive at a less-like pager, with page breaks noted:

    pdfless ()
    {
       pdftotext -layout "$1" - |
       sed 's/\f/\n\n ----------------- ----------------- <page> ----------------- ----------------- \n\n\n/g' |
       ${PAGER:-less -S}
    }
The key is the "-layout" argument, which preserves original layout of the document. This ... may not be what you want visually, but makes backing out the original text somewhat easier.

Of course, requesting the LaTeX sources would be preferred.