Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!birdland!rberlin From: rberlin@birdland@Eng.Sun.COM (Rich Berlin) Newsgroups: comp.lang.postscript Subject: Re: How do I determine a printer's imaging area? Message-ID: <7723@exodus.Eng.Sun.COM> Date: 9 Feb 91 04:03:02 GMT References: <1991Feb8.174934.5816@eagle.lerc.nasa.gov> Sender: news@exodus.Eng.Sun.COM Reply-To: rberlin@Eng.Sun.COM Distribution: na Organization: Sun Microsystems Lines: 40 In article <1991Feb8.174934.5816@eagle.lerc.nasa.gov>, fsset@bach.lerc.nasa.gov (Scott E. Townsend) writes: |> |> I have a question, somewhat similar to one which I've seen recently in this |> group. I want to know the imaging area of whatever printer my code gets |> executed on. The reason is that I have a viewgraph package running on a |> Silicon Graphics Iris in which I want the ability to save drawings in |> Postscript format. Through some trial and error I have code which takes |> a full Iris screen and prints it on a 'full' 8.5"x11" page on Apple & Sparc |> printers. Attempting this on a QMS color printer caused problems due to |> the QMS printer's smaller imaging area. |> |> So, given an Iris imaging space of (say) 1280x1024, how can I portably |> determine the correct transform to fill an arbitrary printer's page. |> (or at least a large class of printers) ? |> |> Any suggestions (including pointers to the correct manual) would be |> appreciated. I'm just beginning to learn Postscript, so please be patient |> and basic with your explanations. Thanks. |> |> Scott |> |> -- |> ------------------------------------------------------------------------ |> Scott Townsend | Phone: 216-433-8101 |> NASA Lewis Research Center | Mail Stop: 5-11 |> Cleveland, Ohio 44135 | Email: fsset@bach.lerc.nasa.gov |> ------------------------------------------------------------------------ Getting the printer's imageable area is fairly simple. gsave initclip clippath pathbbox grestore should leave four numbers (llx lly urx ury) on the stack which describe the imageable area in current user units. If you know the bounding box of your image, you can use these numbers to determine the largest scale that will work on your printer. Hope that helps. -- Rich