🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3608

Re: Landscape page orientation

#3608
From: Gisle Aas
Date: Fri, 09 Nov 1990 07:49
42 lines
2121 bytes
In article <21532@well.sf.ca.us> jef@well.sf.ca.us (Jef Poskanzer) writes:
   In the referenced message, Gisle.Aas@nr.no wrote:
   }>   newpath clippath pathbbox newpath	% llx lly urx ury
   }>   3 -1 roll				% llx urx ury lly
   }>   sub				% llx urx height
   }>   /pageheight exch def		% llx urx
   }>   exch sub				% width
   }>   /pagewidth exch def
   }
   }To get the right pageheight/width you have to add together ury/x and
   }lly/x.  The clippath defines an area smaller than the physical page.

   You're saying I should add instead of subtracting?  That doesn't
   make sense to me.  Could you be more specific?  Provide corrected code
   perhaps?

As far as I can see the following code is correct, but it depends on
the clippath being centered on the physical page:

%!
initgraphics clippath pathbbox newpath
3 -1 roll				% llx urx ury lly
add				        % llx urx height
/pageheight exch def		        % llx urx
add			  		% width
/pagewidth exch def

An example: Our printer eats A4 sheets. The dimension of A4 is 842
times 595 points (297x210mm). When I send 'clippath pathbbox pstack'
to the printer it responds with:

 819.84
 577.68
 22.08
 17.28

As you can see 842 = 819.84 + 22.08, 
and 595 = 577.68 + 17.28                    (add a small delta if you like)
--
Gisle Aas               |  snail: Boks 114 Blindern, N-0314 Oslo, Norway
Norsk Regnesentral      |  X.400: G=Gisle;S=Aas;O=nr;P=uninett;C=no
voice: +47-2-453561     |  inet:  Gisle.Aas@nr.no
Technical Details
Message-ID: <AAS.90Nov9084937@boeygen.nr.no>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!nuug!ulrik!ulrik!aas
References: <AAS.90Nov7093033@boeygen.nr.no> <21532@well.sf.ca.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!bloom-beacon!eru!hagbard!sunic!nuug!ulrik!ulrik!aas
From: aas@boeygen.nr.no (Gisle Aas)
Newsgroups: comp.lang.postscript
Subject: Re: Landscape page orientation
Message-ID: <AAS.90Nov9084937@boeygen.nr.no>
Date: 9 Nov 90 07:49:37 GMT
References: <AAS.90Nov7093033@boeygen.nr.no> <21532@well.sf.ca.us>
Sender: news@ulrik.uio.no (USENET News System)
Reply-To: Gisle.Aas@nr.no
Organization: Norwegain Computing Centre, Oslo, Norway
Lines: 42
In-Reply-To: jef@well.sf.ca.us's message of 8 Nov 90 01:07:44 GMT