> Not an NSRect, but you can get an NSSize from [[NSPrintInfo sharedPrintInfo] > paperSize]. From that, you can build an NSRect with that value for the size > and NSZeroPoint for the origin. >
Great, I'm testing that method now. I get everything built alright, but during the print operation (while the print panel is shown), the program crashes with the following message in the console: ----------------- Debugger() was called! The Debugger has exited due to signal 2 (SIGINT).The Debugger has exited due to signal 2 (SIGINT). ----------------- Now, when the print panel IS shown, the preview is blank, so I know it's not loading but I can't tell where. Here's the code I'm using.. ------------------ NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo]; NSSize pageSize = [printInfo paperSize]; NSRect frame = NSMakeRect(0.0, 0.0, pageSize.width, pageSize.height); WebView *myWebView = [[WebView alloc] initWithFrame:frame frameName:@"Test Frame" groupName:nil]; [[myWebView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://nytimes.com"]]]; NSView *printView = [[[myWebView mainFrame] frameView] documentView]; [printInfo setVerticallyCentered:NO]; [printInfo setHorizontalPagination:NSFitPagination]; NSPrintOperation *printOperation = [NSPrintOperation printOperationWithView:printView]; [printOperation runOperation]; ------------------ If I can't get this to work, I'll go to a NIB file, but I'd really like to avoid that if possible... Thanks in advance.... _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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/archive%40mail-archive.com This email sent to arch...@mail-archive.com