I made a webView present a given HTML string, using this code:
let filePath = Bundle.main.path(forResource: "my file name", ofType: "html")
let htmlStr = try! NSString.init(contentsOfFile: filePath!, encoding: String.Encoding.utf8.rawValue)
webView.loadHTMLString(htmlStr as String, baseURL: nil)
the webView
present the HTML correctly but when I try to print it the print panel appear with blank page, I used this:
webView.printView(nil)
also I tried this:
NSPrintOperation(view: webView).run()
All appeared print panel with blank page! Any help?