[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] Displaying a pdf live on the Fly?
From: |
Steffen Nurpmeso |
Subject: |
Re: [Lynx-dev] Displaying a pdf live on the Fly? |
Date: |
Tue, 04 Jun 2019 16:29:05 +0200 |
User-agent: |
s-nail v14.9.13-65-ge5378403 |
Klaus-Peter Wegge wrote in <address@hidden
c.uni-paderborn.de>:
|On Tue, 4 Jun 2019, Steffen Nurpmeso wrote:
|> address@hidden wrote in <address@hidden
|> t>:
|>| 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.
...
|Hi,
|I'm reading most document formats with the help auf lynx and various
|format2html tools like pdftohtml
I possibly should have pointed out that i had direct conversation
with Mr. Bell on another ML in the past, and to me he is known as
someone who hits the mark. (He reported bugs of the software
i maintain. Thanks again, Mr. Bell.)
|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
lynx is a "swiss army knife" program, just like the shell.
I personally prefer plain text, if i can. Luckily i have all my
senses in acceptable shape, that is to say, and do not need
a Braille reader, nor do i know how bad that ends up when
converting PS or PDF to plain text or HTML. All i can imagine is
that converting via ghostscript's text output cannot be it.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)