• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Printing : how to force paper format ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: creating a cocoa nsapp event polling callback
  • Next by Date: NSView receives twice and more "mouseEntered" when window show&hide
  • Previous by thread: Re: creating a cocoa nsapp event polling callback
  • Next by thread: NSView receives twice and more "mouseEntered" when window show&hide
  • Index(es):
    • Date
    • Thread