Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!snorkelwacker!apple!apple.com!casseres From: casseres@apple.com (David Casseres) Newsgroups: comp.sys.mac.programmer Subject: Page Rectangles Message-ID: <10585@goofy.Apple.COM> Date: 5 Oct 90 21:00:48 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 92 In article <6145@ethz.UUCP> czychi@ethz.UUCP (Gary Czychi) writes: > After playing around with print records and a couple of printers I wonder > which random methods define the printable area of the page, the 'page > rectangle'. The page rectangle is computed from the paper size. In some cases, other options selected by the user and by the application can affect the page size, but let's stick to the simple case where it is just computed from the paper size. The algorithm is different for each printer type because the physical constraints differ, but the general philosophy is to provide the largest possible page rectangle in every case. > This is, what I found: > > For example: ImageWriter > ------------------------ > (page rectangle - paper rectangle) > Format Paper Size top,left,bottom,right margins > inches points > > US Letter 8.5 X 11.0 36,18,4,18 > US Legal 8.5 X 14.0 36,18,4,18 > > It's very likely that mechanical restrictions define these margins. That's correct. The width of the page rect is always 8 inches, because that is the maximum printing width of the mechanism. The 8-inch rect is centered on the paper. Top and bottom margins are determined by the paper-handling characteristics of the printer. > But what > happens when I choose an A4 letter size? > > A4 Letter 8.3* X 11.7 36,10,6,11 > > Why do the margins change?? Is there a reason for it? You'll find the page rect is still 8 inches wide. Why the bottom margin changes by 2 dots, I'm not sure. > For example: LaserWriter IISC > ----------------------------- > margins > Format Paper Size t,l,b,r printable area > Inches points points > > US Letter 8.5 X 11.0 15,18,15,18 438912 > US Legal 8.5 X 14.0 54,66,54,66 432000 > Does anybody know the reason why the printable area of the bigger page is > smaller than that of the smaller page?? Why is there such a big > difference between the left/right margins and the top/bottom margins of > the legal paper? On the SC (as on the Postscript LaserWriters) the constraints are that the mechanism requires a minimum margin of about 1/4 inch all around, and the total image area is limited by the size of the printer's RAM. When I wrote the code for the SC, I was surprised to discover how much I had to increase the margins for legal-size paper, and to this day I don't understand why. But it is indeed a limitation of the hardware, and the Postscript LaserWriters have it too. > A4 Letter 8.3* X 11.7 15,58,15,59 389760 > > Again, the A4 page is bigger than the US Letter page, but the printable > area is *much smaller*. Why? If there were memory restrictions we could > have at least 438912 points (if not more**) to print with. And again, > which is the reason for the big difference in the margins? You are mistaken here about the margins for A4 with the SC. They are similar to the margins for letter-size paper, i.e. about 1/4 inch all around (sorry, I don't have the exact numbers). > The reason why I put so much effort in this 'investigation' is very > simple. For the user, it can be very annoying not being able to adjust > margins smaller than 0.8" ! When you draw into the page rectangle it > is much easier if you can assume that the margins on each side of the > paper are more or less equal. Minimum margins are determined by the printer hardware, and they are indeed essentially equal on the left and right. > --- Footnotes --- > *A4 letter width is better represented by 8.3" X 11.7" (instead of > Apple's 8.2" X 11.7"). The correct A4 paper size would be 8.27" X 11.69" > or 595 points X 842 points (exactly 210 mm X 297 mm). I'm not sure where you saw 8.2. We calculate (210/2.54)x72 to get a width of 595 dots for the paper, and this is the value we use internally. David Casseres Exclaimer: Hey!