NSPrintInfo will not accept paper format wider than high?
NSPrintInfo will not accept paper format wider than high?
- Subject: NSPrintInfo will not accept paper format wider than high?
- From: Gerd Knops <email@hidden>
- Date: Thu, 27 Dec 2007 11:56:52 -0600
Hi all,
From a Cocoa application I need to print to a RIP that expects
NSPaperSize = NSSize: {2088, 1570.5};
NSOrientation = 0;
Note how the paper size is wider than it is high.
When I use:
NSPrintOperation *op=[NSPrintOperation printOperationWithView:self];
NSPrintInfo *printInfo=[op printInfo];
[printInfo setPaperSize:NSMakeSize(2088, 1570.5)];
[printInfo setOrientation:NSPortraitOrientation];
I end up with:
NSOrientation = 0;
NSPaperSize = NSSize: {1570.5, 2088};
Note how it swapped width and height.
OK, so NSPrintInfo documentation for "setPaperSize:" claims:
This method may change either the paper name or orientation for
consistency.
To avoid this side effect set the values in the dictionary directly.
Fine, so I try:
[[printInfo dictionary]setObject:[NSNumber
numberWithInt:NSPortraitOrientation] forKey:NSPrintOrientation];
[[printInfo dictionary]setObject:[NSValue
valueWithSize:NSMakeSize(2088, 1570.5)] forKey:NSPrintPaperSize];
But still:
NSOrientation = 0;
NSPaperSize = NSSize: {1570.5, 2088};
Presumably that is a bug, I filed a report.
But I still need that elusive
NSPaperSize = NSSize: {2088, 1570.5};
NSOrientation = 0;
Any idea what to do?
Thanks
Gerd
_______________________________________________
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