[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] Displaying a pdf live on the Fly?
From: |
Tim Chase |
Subject: |
Re: [Lynx-dev] Displaying a pdf live on the Fly? |
Date: |
Mon, 3 Jun 2019 21:58:13 -0500 |
If you have the "pdftotext" utility (part of my "poppler-utils"
package here on Debian), you might be able to either use it in your
mailcap
pdftotext "%s" - | less
or create a shell-script:
#!/bin/sh
pdftotext "$1" - | less
and then spawn that shell-script in your mailcap file:
application/pdf; my_pdf_to_text.sh "%s"
The quality of the output depends largely on how the PDF was created,
so I have some mostly-pure-text PDFs where it works great; and I have
some PDFs that are full of graphics and poorly laid-out that are next
to useless when piped through pdftotext. YMMV.
-tim
On 2019-06-03 19:44, Chime Hart wrote:
> Hi All: I am realizing it would be easier to have lynx display pdfs
> basicly like any other texts. Otherwise I must also run a pdf
> converter on the file or e-mail to RoboBraille. Anyway we tried
> modifying my dot mailcap file, like this application/pdf; less "%s"
> Well, lynx said it may be a binary, see it anyway? It was a mess.
> So can some1 please inform an easy way of doing this, or would I
> need an external? Thanks so much in advance
> Chime
>
> _______________________________________________
> Lynx-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lynx-dev
Re: [Lynx-dev] Displaying a pdf live on the Fly?,
Tim Chase <=
Re: [Lynx-dev] Displaying a pdf live on the Fly?, Mike Marchywka, 2019/06/04