I want to print a PDF
file from WebView
as there is a print button in WebView and when I click it, I'll get the URL of PDF
and its content type
as application/pdf
. I searched so much and exhausted for how to print a PDF file in Objective C - cocoa
. All I saw is to print
content from a view
and it'll print all the WebView
[NSPrintOperation printOperationWithView:webView]
But I need to print the PDF I got, not the entire WebView
Please help me...
NB Swift coders: Please don't put your code here. I don't know swift
Edit 1: No iOS codes please. Its about macOS
Edit 2: From the screenshot, when I click print, I get that PDF in the PDF viewer in the WebView. I need to print it directly. Thats my scenario.