cocoa osx print pdf document
问题 In my cocoa application I obtain a pdf document from my webview. I need to print that pdf. I read that there is NSPrintOperation printOperationWithView method, but this method prints a view of the document. Is there anyway for printing directly from a file url? How can I achieve this correctly? This is my code: NSString *fileName = [NSString stringWithFormat:@"%@/mypdf.pdf", documentsDirectory]; NSData *pdfFinal = [[[[webView mainFrame] frameView] documentView] dataWithPDFInsideRect:[[