Page margins and NSPrintInfo
Page margins and NSPrintInfo
- Subject: Page margins and NSPrintInfo
- From: Jonathan Jackel <email@hidden>
- Date: Thu, 25 Dec 2003 22:14:12 -0500
I have two questions. First, a call for help. Second, a call for
opinions.
First, I'm printing a document. I initialize a custom view and pass it
the document's NSPrintInfo instance. In theory, this allows the view
to know the size of the paper and the margins of the page so it can lay
out the text accordingly. In practice, while the paper size is
correct, the margins are always 72 points left and right, 90 points top
and bottom. This is so even if I set up a "custom" paper size with
margins twice that size. I'm getting the paper size just fine, so I
know I am not getting a generic print info. But I'm not getting the
margins. I am reading the margins with, e.g., [printInfo topMargin],
which always returns 90.
What am I not doing?
Second, why is setting margins such a production in Cocoa? You don't
even see an option for adjusting margins unless you hunt for it. You
have to intuit (perhaps after the reading the "Summary" in the settings
list box of Page Setup... (as if "setup" is a real word) ) that there
_MUST_ be a setting for margins somewhere. Then, perhaps, you choose
"Custom Paper Size," and see that, lo, there is someplace for your
margins. So you set some margins on a custom paper size (which is
probably just 8.5 x 11 -- nothing custom about that!), click OK and
print. And it does not work. Then, perhaps, you realize that merely
creating a custom paper size and clicking OK does not tell Cocoa
"That's what I want." So you revisit the Page Setup... and, finally,
select your custom paper size from the bottom of a list that includes
such oddities and "ROC 16K" and "Super B". There's no apparent way to
get rid of these oddball page sizes.
Does anyone else find this process bizarre?
If not, can someone explain the thought process that went into how the
page layout dialog is supposed to work, so that I can adjust my brain
accordingly?
Call me crazy, but I think Word handles this the right way. On the
Format menu there's an item called "Document," which actually allows
you to format the document, including the margins.
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.