[comp.sys.mac.programmer] Printing Problems

isle@eleazar.dartmouth.edu (Ken Hancock) (08/23/89)

Ok...here's the problem.

I want to center something in a printed page.  For an example, say
a line of text.

I have rPage from the print record.  I can find out how wide the
page is by taking rPage.right - rPage.left.  I can find out how
long my string is.  So, I MoveTo the coordinates and draw my string.

Except this doesn't work because printing to an ImageWriter gives me
a rPage twice the normal size since it prints a144dpi.  The
LaserWriter IISC gives me a page 4 times the normal size.  Both seem
to want coordinates reflecting their page size, but also want things
printed at normal size.... If I want 12 point text, in either case
I still DrawString with a size of 12 point.

Well, I though I could reduce these back down to 72 dpi by dividing
by iVRes and iHres.  Wrong again.  The ImageWriter will return 144
for both iVRes and iHRes, but the LW IISC will return 72.

There must be a simple way, because every application does it.
What am I doing wrong?

Thanks in advance --

Ken


Ken Hancock  '90                     | E-mail: (BITNET/UUCP/INTERNET)
Computer Resource Center Consultant  |    isle@eleazar.dartmouth.edu
-------------------------------------+--------------------------------------
DISCLAIMER?  I don't get paid enough to worry about disclaimers.