Newsgroups: comp.lang.postscript Path: utzoo!sq!lee From: lee@sq.sq.com (Liam R. E. Quin) Subject: Re: Landscape page orientation Message-ID: <1990Nov11.024615.24659@sq.sq.com> Organization: SoftQuad Inc. References: <1674@chinacat.Unicom.COM> <1990Nov5.194437.12060@sq.sq.com> <1680@chinacat.Unicom.COM> Date: Sun, 11 Nov 90 02:46:15 GMT Lines: 40 woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) writes: > lee@sq.sq.com (Liam R. E. Quin) writes: >> woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) claims that >> > The generic way to do landscape is >> > 612 0 translate 90 rotate. >> >> This is not in the least generic! >> [since it wires in the size of the page] >is there a standard way to determine what the width of the page and the >height of the page is? I would assume that the current clip path >would do it. This was debated a lot on the UK PostScript list a few years ago... I seem to recall that the best answer involved initgraphics and clippath; I don't think you can do it portably in an EPS file, though. I suggested >> /PaperWidth 72 8.5 mul cvi def % width of a page in PostScript points >> PaperWidth 0 translate 90 rotate >> because, although, as Woody points out: >it *still* assumes 8.5 inch paper. granted, you can alter it manualy, it is now clear where the number comes from; Imagine that you have never _heard_ of this strange paper that is 8" by 11.5" (or whatever), and you come across the magic "612"... well, it isn't a multiple of the paper size, what could it be? The comment at least gives the person mantaining the code a _bit_ of a chance! Incidentally, the LaserWriter design is such that PostScript cannot distinguish between "no paper tray" and "US letter paper" when you do these operations, which means that if you're filling the paper tray at the wrong time, everything comes out shifted by half and inch or so! Lee -- Liam R. E. Quin, lee@sq.com, SoftQuad Inc., Toronto, +1 (416) 963-8337