Printing : how to force paper format ?
Printing : how to force paper format ?
- Subject: Printing : how to force paper format ?
- From: Eric MORAND <email@hidden>
- Date: Thu, 27 Sep 2007 12:53:50 +0200
Hi guys,
Is there a way to force the paper format when printing a view ? I've
tried NSStringInfo setPaperName: and it doesn't work :
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)
frame
{
NSLog (@"didFinishLoadForFrame");
// ...
NSPrintInfo * printInfo = [NSPrintInfo sharedPrintInfo];
//[printInfo setPaperName:@"A5"]; // Doesn't work, let's try to set
the dictionary :
[[printInfo dictionary] setValue:@"A5" forKey:NSPrintPaperName];
NSLog (@"paperName = %@", [printInfo paperName]);
NSLog (@"localizedPaperName = %@", [printInfo localizedPaperName]);
[[[[sender mainFrame] frameView] documentView] print:self];
}
paperName is still equal to "iso-a4" and localizedPaperName to "A4".
And of course, my report is printed using A4 format.
Am I doing something wrong ?
Thanks,
Eric.
_______________________________________________
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