groff
[Top][All Lists]
Advanced

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

Re: [Groff] groff and papir size


From: Stewart C. Russell
Subject: Re: [Groff] groff and papir size
Date: Mon, 26 Nov 2001 09:21:50 +0000

Werner LEMBERG wrote:
> 
> > Is it possible to make "mirrored" PostScript output?
> 
> Yes.  You have to adapt the `prologue' file for mirroring; then use
> the -P option of grops (or the GROPS_PROLOGUE environment variable) to
> load your own prologue file.

or if the user doesn't want to mess with prologues (and frankly, who
does?), here's a rerun from "The Best of Stewart" from September 2000:

Here's an awk one-liner to convert A4 groff output to reversed output,
suitable for your filmsetter:

awk '/^%%EndPageSetup/ {print "-1 1 scale\n595 neg 0 translate";}
{print;}' file.ps > file_reversed.ps

or in Perl:

perl -nwe 'print "-1 1 scale\n595 neg 0 translate\n" if
(/^%%EndPageSetup/); print $_;' file.ps > file_reversed.ps

Replace the 595 with whatever the width of your page is; this is the
width of an A4 page. I've tried it with a variety of groff output, and
it works well.

-- 
Stewart C. Russell              Senior Analyst Programmer
address@hidden  Collins Dictionaries
use Disclaimer; my $opinion;    Bishopbriggs, Scotland

reply via email to

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