nsprintoperation

WKWebKit Mac OS NSPrintOperation

情到浓时终转凉″ 提交于 2020-03-18 04:33:11
问题 WebKit 1 exposed the WebFrameView where I could call a print operation. - (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView { NSPrintOperation *printOperation = [frameView printOperationWithPrintInfo:[NSPrintInfo sharedPrintInfo]]; [printOperation runOperation]; } With WKWebKit API I can't seem to figure out how to perform a similar action or which view to grab for printing. All my efforts have come up with blank pages. 回答1: Amazingly, WKWebView still doesn't support

Is it possible to print IKImageBrowserView In Cocoa programmatically?

谁说我不能喝 提交于 2019-12-24 04:06:33
问题 I want to take print of IKImageBrowserView with (content) images. I tried the following code if (code == NSOKButton) { NSPrintInfo *printInfo; NSPrintInfo *sharedInfo; NSPrintOperation *printOp; NSMutableDictionary *printInfoDict; NSMutableDictionary *sharedDict; sharedInfo = [NSPrintInfo sharedPrintInfo]; sharedDict = [sharedInfo dictionary]; printInfoDict = [NSMutableDictionary dictionaryWithDictionary: sharedDict]; [printInfoDict setObject:NSPrintSaveJob forKey:NSPrintJobDisposition];

Cocoa osx PDFView NSPrintOperation PrintPanel not showing page preview

丶灬走出姿态 提交于 2019-12-20 02:32:15
问题 In my app for Mac I have a webview that shows some html content. I create a PDFDocument from that webview and then I want to print that document. So I create a PDFView from the document and then I call the NSPrintOperation printOperationWithView. When showing the print panel all appears correct except the page preview which appears blank, but if I press the details button the panel is refreshed and the page preview appears correctly. How can I solve this?? Need help please. Thanks in advance.

Printing multiple pages in Objective-C

限于喜欢 提交于 2019-12-07 10:24:53
问题 I have a printing function like so: - (void)sendToPrinter:(int)code { NSPrintInfo *printInfo; NSPrintInfo *sharedInfo; NSPrintOperation *printOp; NSMutableDictionary *printInfoDict; NSMutableDictionary *sharedDict; sharedInfo = [NSPrintInfo sharedPrintInfo]; sharedDict = [sharedInfo dictionary]; printInfoDict = [NSMutableDictionary dictionaryWithDictionary: sharedDict]; [printInfoDict setObject:NSPrintSpoolJob forKey:NSPrintJobDisposition]; printInfo = [[NSPrintInfo alloc] initWithDictionary:

Printing multiple pages in Objective-C

十年热恋 提交于 2019-12-05 12:02:47
I have a printing function like so: - (void)sendToPrinter:(int)code { NSPrintInfo *printInfo; NSPrintInfo *sharedInfo; NSPrintOperation *printOp; NSMutableDictionary *printInfoDict; NSMutableDictionary *sharedDict; sharedInfo = [NSPrintInfo sharedPrintInfo]; sharedDict = [sharedInfo dictionary]; printInfoDict = [NSMutableDictionary dictionaryWithDictionary: sharedDict]; [printInfoDict setObject:NSPrintSpoolJob forKey:NSPrintJobDisposition]; printInfo = [[NSPrintInfo alloc] initWithDictionary: printInfoDict]; [printInfo setHorizontalPagination: NSAutoPagination]; [printInfo

Cocoa osx PDFView NSPrintOperation PrintPanel not showing page preview

你离开我真会死。 提交于 2019-12-01 21:31:44
In my app for Mac I have a webview that shows some html content. I create a PDFDocument from that webview and then I want to print that document. So I create a PDFView from the document and then I call the NSPrintOperation printOperationWithView. When showing the print panel all appears correct except the page preview which appears blank, but if I press the details button the panel is refreshed and the page preview appears correctly. How can I solve this?? Need help please. Thanks in advance. This is an example of my problem: 1- The print panel shows with a blank page preview. Next I press