On Wed 21 Sep 2016 at 18:13:18 (+0200), to...@tuxteam.de wrote:
> On Wed, Sep 21, 2016 at 11:38:41AM +0100, Brian wrote:
> 
> [...]
> 
> > Although it is a different topic
> > 
> >  
> > http://stackoverflow.com/questions/26066535/ps2pdf-creates-a-very-big-pdf-file-from-paps-created-ps-file
> > 
> > backs up your "pretty funny" feeling. KenS is a Ghostscript developer.
> 
> Thanks for the link.
> 
> From a cursory look at the .ps I had that impression:
> 
>   "The problem is the paps file, it doesn't actually contain any text
>    at all, in a PostScript sense.
> 
>    Each character is stored as a procedure, where a path is drawn and
>    then filled. This is NOT stored in a font, just in a dictionary."
> 
> so paps basically "paints" the text. 
> 
> Yikes. I still hoped to be wrong :-(
> 
> > Maybe this new version does not fix mouse copying from a PDF generated
> > from paps' PS but it isn't in unstable anyway. (Furthermore, paps isn't
> > in testing due to a FTBFS).
> 
> Let's hope. In the meantime use a2ps (but I don't know how well that
> handles Unicode/UTF-8). Perhaps paps's author had a strong reason to
> do it that way.

Yes, Brian, thanks for the link. One reading of
http://www.tldp.org/HOWTO/Unicode-HOWTO-5.html
suggests that paps may be doing it the only way possible,
apart from the duplication of each occurrence of a glyph.
I've just installed uniprint and I can't see that it does
anything different, except produce a much larger file.

$ paps --font="Freemono 10" --left-margin=54 --top-margin=54 --paper letter \
 UNICODE-chars.txt > unicode-chars.ps
$ uniprint -out unicode-chars-uniprint.ps -in UNICODE-chars.txt \
 -font /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
uniprint: printed 17 pages.

$ ps2pdf unicode-chars.ps unicode-chars.pdf
$ ps2pdf unicode-chars-uniprint.ps unicode-chars-uniprint.pdf

    45395 UNICODE-chars.txt
  7344022 unicode-chars.ps
  3457331 unicode-chars.pdf
 27775050 unicode-chars-uniprint.ps
  7993797 unicode-chars-uniprint.pdf

The comparison is as fair as I can make it: paps opens three
font files AFAICT: FreeMono.otf, DejaVuSansMono.ttf and
DejaVuSansMono-Bold.ttf, so I gave uniprint the second one.

I gave up using a2ps at least a decade ago because it can't handle
Unicode; AFAIK there's no sign of its adopting it at all.
I'm always on the lookout for a "pa→pdf" successor to pa→ps, but
see no sign of it on the horizon.

Cheers,
David.

Reply via email to