🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #5902

Re: can I print a mirrored page???

#5902
From: Dick Dunn
Date: Sun, 13 Dec 1992 07:59
34 lines
2199 bytes
(I wrote a followup earlier today, in which I read and wrote "renderable"
while I was thinking "physical".  The offending neurons have been harshly
disciplined, and a cancel message is chasing my original f*u* around the
net.  Thanks to pg@stortek.com for gently noting my incoherent babble.)

shaver@convex.com (Dave Shaver) writes:
>/mirror { 8.5 72 mul 0 translate -1 1 scale } def
>
>To avoid the nasty A4 v. US paper problem, you could use the initial
>clippath and assume that's the size of the renderable page.

The initial clippath is (nearly by definition) the size of the renderable
page--i.e., the clippath defines where you can put pixels and see them.

Trouble is, to reflect the page properly, you need to translate by the
*physical* page width.  The PostScript coordinate system has its origin at
a corner of the physical page, so the translation required for an accurate
reflection depends on the size of the paper, not the renderable area.  Most
printers require some unprintable area around the edges of the paper, hence
the initial clippath will be a rectangle smaller than the physical page...
you might have 8.3" renderable on an 8.5" page.

One hack that probably gets you closer is to guess that the unprintable
edges are the same; thus adding the x of the lower-left-hand corner of the
initial clippath to the x of the upper-right-hand corner should get you
very close to the physical page width.  (This is more likely if the printer
feeds short-edge.)

If you've got a Level 2 implementation, it's a lot easier:
	currentpagedevice /PageSize get 0 get
gives the width of the physical page.
-- 
Dick Dunn    rcd@raven.eklektix.com   -or-   raven!rcd    Boulder, Colorado
	...Straight, but not narrow.
Technical Details
Message-ID: <1992Dec13.075925@eklektix.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!think.com!ames!purdue!yuma!csn!raven!rcd
References: <1992Dec11.095754.19047@csd.uch.gr> <shaver.724106074@convex.convex.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!think.com!ames!purdue!yuma!csn!raven!rcd
From: rcd@raven.eklektix.com (Dick Dunn)
Subject: Re: can I print a mirrored page???
Message-ID: <1992Dec13.075925@eklektix.com>
Summary: correction
Organization: eklektix - Boulder, Colorado
References: <1992Dec11.095754.19047@csd.uch.gr> <shaver.724106074@convex.convex.com>
Date: Sun, 13 Dec 1992 07:59:25 GMT
Lines: 34