Akshay Pawar
Committed by David PHAM-VAN

Migrated deprecated webview to WKWebview on macos printing

1 # Changelog 1 # Changelog
2 2
3 -## 5.1.2 3 +## 5.12.0
4 4
5 - Refactor html imports 5 - Refactor html imports
  6 +- Migrated deprecated webview to WKWebview on macos printing [Akshay-Pawar]
6 7
7 ## 5.11.1 8 ## 5.11.1
8 9
@@ -230,8 +230,8 @@ public class PrintJob: NSView, NSSharingServicePickerDelegate { @@ -230,8 +230,8 @@ public class PrintJob: NSView, NSSharingServicePickerDelegate {
230 printInfo.rightMargin = size.width - margin.maxX 230 printInfo.rightMargin = size.width - margin.maxX
231 printInfo.bottomMargin = size.height - margin.maxY 231 printInfo.bottomMargin = size.height - margin.maxY
232 232
233 - let webView = WebView()  
234 - webView.mainFrame.loadHTMLString(data, baseURL: baseUrl) 233 + let webView = WKWebView(frame: viewController!.view.bounds)
  234 + webView.loadHTMLString(data, baseURL: baseUrl ?? Bundle.main.bundleURL)
235 let when = DispatchTime.now() + 1 235 let when = DispatchTime.now() + 1
236 236
237 DispatchQueue.main.asyncAfter(deadline: when) { 237 DispatchQueue.main.asyncAfter(deadline: when) {
@@ -15,7 +15,7 @@ topics: @@ -15,7 +15,7 @@ topics:
15 - print 15 - print
16 - printing 16 - printing
17 - report 17 - report
18 -version: 5.11.2 18 +version: 5.12.0
19 19
20 environment: 20 environment:
21 sdk: ">=3.0.0 <4.0.0" 21 sdk: ">=3.0.0 <4.0.0"