[comp.lang.postscript] How to print on A4 paper?

mark@pyrdc.UUCP (Mark Hahn) (05/26/89)

I am trying to get my PostScript program to understand A4 sized paper
and it won't.  I am running a LaserWriter Plus, and it is clearly
marked to accept A4 paper but the origin appears to be all off.

Specifically I am attempting to use a bounding box of
	LLx LLy  URx   URy
	  0   0  596   842  (points)
	  0   0  8.2  11.6  (inches)
When I print an outline of a box 20 points inside of these it is
shifted from the real origin up and to the left.  It is as if when the
LW finds the Upper Right corner of the paper, it is defined to be at
8.5 x and 11 y inches.  Hence my the part of my figure drawn above 11
inches is off the top page, and the part that is within .3 inches of the
left margin (8.5 - 8.2) is off the left side of the page.

Do I need to tell the LW+ that I am using A4 paper and that the corner
you find is at 8.2 x, 11.6 y inches (not 8.5 x, 11.0 y inches)?  I
found "pagetype" values for letter and note but not for A4.  Do I use
Should I readjust my origin to account for this displacement (I hope
not :-(  Should I use the setmargins stuff for this instead of re
computing my points or using an initial translate?  If I use
setmargins, how do I switch back and forth?  

To make sure we are talking about the same product the following
program:
	%!PS
	statusdict begin revision (Revision:) product (Product:) stack end
prints:
	Product:
	LaserWriter Plus
	Revision:
	2

Thank you for your help with this matter.

-- 
  ...!uunet!\                       Mark Hahn, Sr Systems Engineer
             >pyrdc!mark            Pyramid Technology Corporation
...!pyramid!/                       Vienna, Va    (703)848-2050

winters@Apple.COM (Steve Winters) (05/27/89)

In article <1531@pyrdc.UUCP> mark@pyrdc.UUCP (Mark Hahn) writes:
>I am trying to get my PostScript program to understand A4 sized paper
>and it won't.  I am running a LaserWriter Plus, and it is clearly
>marked to accept A4 paper but the origin appears to be all off.

The operator you want is "framedevice", documented in the Adobe
Red Book. It allows you to define a new page size such as a4. You will
need to include code to set up A4 paper, using framedevice, as part of
the prolog to your job. 

If you are printing from a Mac using the Apple driver, the driver does 
this for you when you select the "A4 Letter" paper size.

Steve Winters

Standard disclaimer: I do not speak for Apple. 

piet@cs.ruu.nl (Piet van Oostrum) (05/29/89)

In article <1531@pyrdc.UUCP>, mark@pyrdc (Mark Hahn) writes:
 `I am trying to get my PostScript program to understand A4 sized paper
 `and it won't.  I am running a LaserWriter Plus, and it is clearly
 `marked to accept A4 paper but the origin appears to be all off.

My LaserWriter Plus has a command "a4" to set the paperformat. Try that.
-- 
Piet van Oostrum, Dept of Computer Science, University of Utrecht
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)