lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Displaying a pdf live on the Fly?


From: Klaus-Peter Wegge
Subject: Re: [Lynx-dev] Displaying a pdf live on the Fly?
Date: Tue, 4 Jun 2019 15:33:29 +0200 (CEST)

Hi,
I'm reading most document formats with the help auf lynx and various
format2html tools like pdftohtml

Here is short version of my viewer script:

---
#!/bin/sh

dir=/tmp/$USER/viewer.$$
mkdir -p $dir
doc=$1

case $doc in
   *.pdf) file=`basename "$doc" .pdf`;
          echo Portable Document Format: $doc;
          html="$file"_ind.html;
          pdftohtml -nodrm -hidden -enc Latin1 "$doc" "$dir"\/"$file"
   *.vcl) file=`basename "$doc" .vcl`;
          echo Calendar: $doc;
          html="$file.txt";
          vcal "$doc" >"$dir/$html";
          show="$dir/$html";;
   *) echo eror;
          exit 0;;
esac

lynx -nolist file://localhost"$show"
rm -rf "$dir"

---
I have removed the cases for other formats.
Remark: the pdftohtml Option seem to be different on various Linuxes.

Kluaus

On Tue, 4 Jun 2019, Steffen Nurpmeso wrote:

address@hidden wrote in <address@hidden>:
| I use:
|
| pdftotext -layout %s - | utf8trans UTFtoASCII

Yes, Mr. Bell, luckily it has that -layout argument.
Whereas mupdf (now) comes with mutool, which can "convert", that
pdftotext from poppler with its -layout is the only PDF (and thus
PS) converter i know who does an acceptable job.

--steffen
|
_______________________________________________
Lynx-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lynx-dev





reply via email to

[Prev in Thread] Current Thread [Next in Thread]