groff
[Top][All Lists]
Advanced

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

Re: [Groff] gropdf driver (was: pdfroff produces two copies)


From: joerg van den hoff
Subject: Re: [Groff] gropdf driver (was: pdfroff produces two copies)
Date: Wed, 05 Aug 2009 12:30:50 +0200
User-agent: Opera Mail/10.00 (MacPPC)

just a short feedback:

1.)
thanks!

2.)
in a first test with

groff 1.19.3
perl v5.8.8
macosX

this seems to work more or less correctly.
but with a small text sample the generated pdf was about a factor of
10 larger than that resulting from `ps2pdf' (i.e. gs). furthermore `gv' complained when
displaying the pdf-file:


   **** Warning:  An error occurred while reading an XREF table.
   **** The file has been damaged.  This may have been caused
   **** by a problem while converting or transfering the file.
   **** Ghostscript will attempt to recover the data.

... which Ghostscript apparently is able to do, since the display looks OK, but
something seems to be murky in the generated pdf...

best regards,

joerg


On Tue, 04 Aug 2009 20:58:04 +0200, Werner LEMBERG <address@hidden> wrote:


[Deri, I hope it's OK with you that I cite from your private email to
 me.]

My main motivation for using pdfroff instead of plain groff -Tps is
that ghostscript (and all the document viewers based on it) produces
(IMO) ugly font output when viewing PostScript files in X, whereas
poppler produces nice output for PDF.  I guess I'll go back to
piping the output of groff into ps2pdf.

Some weeks ago Deri James sent me a first implementation of a gropdf
driver; I've uploaded it temporarily to

  http://groff.ffii.org/groff/gropdf/

Deri writes:

  [...] Its drawback is its written in perl and has a dependancy on
  perl module Compress::Zlib (to do the Flate compression).  However,
  despite this, you may consider it useful to have a 'native' PDF
  driver for groff (rather than the PS -> ghostscript route).  It is
  slower than grops but faster than grops+gs.

  The archive contains bin/gropdf (which should be installed in the
  same directory as 'grops'), /devpdf which should be installed in
  your groff font directory, two files for the /tmac directory, and an
  /examples directory.

  NOTE: Lines 13-15 of 'gropdf' must be "hand edited" to configure for
  your particular 'groff' setup.  Of course these paths would normally
  be inserted by an install script.

  The /devpdf directory includes the .pfa fonts required to supplement
  the 14 PDF type 1 base fonts up to the standard 35 fonts which
  PostScript uses.

  Gropdf supports the following run switches:-

  -p <papersize> (same as grops)
  -l (landscape mode - NOT WORKING yet!!)
-d (debug mode - uncompressed PDF and troff output included as comments)
  -F <path to 'font' directory (same as grops


  TO DO

  Fix landscape.

  Support PSPIC (and new PDFPIC).

  Support some of the more common 'x ps:' commands (particularly page
  rotation and pdf bookmarks).

  There are a few troff commands not handled yet (most notably 'Da'
  (Draw Arc) since I have not yet figured out a good way to convert to
  Bezier Curves for PDF!).

  Improve some of the algorithms used in PDF generation (unnecessary
  context switches between GFX and text modes). Possibly implement
  Type 1c font subsetting to reduce file sizes (also, current
  implementation restricted to first 256 glyphs per font).

  Fix bugs!!


  Hope you enjoy it.

Please test this!  I haven't found time yet to evaluate it.


    Werner




--




reply via email to

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