groff
[Top][All Lists]
Advanced

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

Re: [Groff] conversion to DOC format


From: Ted Harding
Subject: Re: [Groff] conversion to DOC format
Date: Tue, 10 Aug 2004 15:02:50 +0100 (BST)

On 04-Aug-04 Roger Leigh wrote:
> M Bianchi <address@hidden> writes:
>>> From: Dean Allen Provins <address@hidden>
>>> Subject: [Groff] conversion to DOC format
>>>     :
>>> Many firms or government agencies require cover letters and
>>> resumes in Microsoft Word (i.e. .DOC) format.  Alas groff
>>> doesn't generate this
>>> ...
>>
>> What I do is to create a PostScript (*.ps) formatted output
>> and then use ps2pdf(1) to create a Portable Document Format
>> (PDF) file.
> 
> I also do this.  However, I noticed that it often messes up
> the character spacing, particularly where ligatures or special
> characters are concerned.  As an example, turn groff_char(7)
> into ps, and then to pdf; you'll see the resultant PDF has many
> alignment problems :-(
> 
> This is the case with groff 1.18.1 and ps2pdf/gs 7.07.1 (Debian).

I've had other troubles with ps2pdf in the past, and this is yet
another! I repeated the above:

  groff -Tps -man groff_char.7 > groff_char.7.ps

and then

  ps2pdf groff_char.7.ps

which gave groff_char.7.pdf

In the latter, the columns of input names for several of the
characters were indeed misaligned, and the misalignments were
not present in the PS file. (groff 1.18.1, ps2pdf for gs 7.05,
Red Hat 9).

So I'd suggest that people adopt the solution, to avoid using
ps2pdf, which I already worked out to avoid the other problems
with ps2pdf (I forget now what these were!).

Namely, make sure you have /usr/bin/epstopdf installed (a perl
script). Copy this to /usr/bin/pstopdf and then change the line

       "-sOutputFile=$OutputFilename - -c quit";

to

       "-sPAPERSIZE=a4 -sOutputFile=$OutputFilename - -c quit";

(line 185 in my version, and use another papersize if you prefer).

Then, given a PS file, pstopdf PSfile.ps will produce PSfile.pdf
and, in particular, the alignment problems described by Roger
Leigh will be seen not to occur.

I now use this 'pstopdf' for all conversions from PS to PDF.
For groff output, you will get a message about

  ==> Warning: BoundingBox not found!

Ignore this -- the result will be fine. You can of course also use
'epstopdf' to convert EPS files with a proper BoundingBox, but these
will come out the size of the BB.

Best wishes to all,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 10-Aug-04                                       Time: 15:02:50
------------------------------ XFMail ------------------------------



reply via email to

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