[Top][All Lists]

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

Re: [Groff] "creep" and booklets

From: Bob Diertens
Subject: Re: [Groff] "creep" and booklets
Date: Fri, 4 Nov 2005 13:48:43 +0100
User-agent: Mutt/1.5.5i

On Fri, Nov 04, 2005 at 12:21:17PM -0000, Ted Harding wrote:
> On 04-Nov-05 Bob Diertens wrote:
> > On Fri, Nov 04, 2005 at 12:01:12AM -0000, Ted Harding wrote:
> >> 
> >> [ ... ]
> > 
> > You can easily do this by manipulating the PostScript file.
> > The Perl script below suffices.
> > 
> > usage:
> >    cat | psbook | creep 0.5 | psnup -2 >
> > 
> > Hope this helps,
> >     Bob
> Excellent idea! And thanks for the snappy response. This would
> take the problem out of groff which would be a good thing for
> this application (especially since the amount of creep required
> =depends on the thickness of paper you are printing to, and I'm
> much happier not to have to plant that in the groff source).
> I take it, from the look of things, that $creep_incr is in points?

Points as used by PostScript.
> I don't tangle with perl as a rule, but this provides a motive!
> (Though it looks as though it would translate well to awk, so
> that may keep me happy for a bit).
> I'll need to test this a bit on groff output (and other PS
> documents). One thing I'm wondering about is whether it would
> be wise, for general use, to encapsulate the page in
>   gsave <creep> 0 translate [rest of page] grestore
> For instance, I just tried it on a PS file (not from groff)
> and it did not work. The reason seems to be that each page
> begins like:
>   %%Page: 1 1
>   0 0 translate
>   %%BeginPageSetup
> etc., which would undo your creep!

Translates are relative and so can 0 0 translate should not give
a problem. You can test this with putting a extra creep with
argument 0 in the pipeline.
Furthermore, a translate is per page, otherwise the creep script
would not work. So there is no need for a save/restore scheme.

I don't know why this doesn't work on your PS file.


reply via email to

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