Re: Confused about NSPrintInfo margins
Re: Confused about NSPrintInfo margins
- Subject: Re: Confused about NSPrintInfo margins
- From: Keary Suska <email@hidden>
- Date: Fri, 10 Jul 2009 09:34:14 -0600
On Jul 9, 2009, at 7:48 PM, Graham Cox wrote:
Thanks Joel, certainly setting the margins directly does work. What
I'm left wondering is what they are actually for - they are never
set by he Page Setup panel and never change with changes to paper
size, printer, etc.
The docs aren't specific, and it is probably worth filing bugs against
the docs. It takes some investigating, testing, and looking at sample
code to get the whole picture.
Page setup only sets five or so settings, listed in the "constants"
section of NSPrintInfo. I would never have thought that paper size or
printer would effect margins, and I am glad that they don't as it
would lead to highly undesirable behavior. Printer maybe because
different printers have different minimum margins, but unfortunately
Apple doesn't give us that for free.
Paper size should only be used for its namesake--i.e. to specify the
dimensions of the physical page and nothing else. In fact, nothing
else is effected AFAIK, and as you may be seeing.
My conclusion is that these fields are merely a convenience for
specifying arbitrary user margins, and if you want to use them you
have to a) add UI to set them and b) make use of them in your code
somewhere. By default they do nothing, are ignored and have no
effect whatsoever on printing unless your code decides not to ignore
them. Unfortunately this is all guesswork as the docs do not discuss
it anywhere I can find. At the very least I will file a bug asking
for better documentation on this.
Yes, but a) only though. Perhaps you mean something else by b) but I
can attest that in fact when you change the margins of an NSPrintInfo
that any print job using that object will indeed use the specified
margins.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden