Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPrintInfo will not accept paper format wider than high?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.