Post

Replies

Boosts

Views

Activity

Reply to How to print WKWebView in Sequoia?
I had all sorts of problems with printing from WKWebView and wasted days with AI's. The winning combination for me was: static func print(_ webView: WKWebView, jobTitle: String = "Web Content") { let printInfo = NSPrintInfo.shared.copy() as! NSPrintInfo printInfo.jobDisposition = .spool printInfo.orientation = .portrait printInfo.topMargin = 36 printInfo.bottomMargin = 36 printInfo.leftMargin = 36 printInfo.rightMargin = 36 printInfo.isHorizontallyCentered = true printInfo.isVerticallyCentered = false printInfo.horizontalPagination = .fit printInfo.verticalPagination = .automatic printInfo.setUpPrintOperationDefaultValues() let op = webView.printOperation(with: printInfo) op.view?.frame = webView.bounds guard let window = webView.window else { return } op.showsPrintPanel = true op.showsProgressPanel = true op.jobTitle = jobTitle op.runModal(for: window, delegate: nil, didRun: nil, contextInfo: nil) }
Topic: Safari & Web SubTopic: General Tags:
Jan ’26
Reply to How to print WKWebView in Sequoia?
I had all sorts of problems with printing from WKWebView and wasted days with AI's. The winning combination for me was: static func print(_ webView: WKWebView, jobTitle: String = "Web Content") { let printInfo = NSPrintInfo.shared.copy() as! NSPrintInfo printInfo.jobDisposition = .spool printInfo.orientation = .portrait printInfo.topMargin = 36 printInfo.bottomMargin = 36 printInfo.leftMargin = 36 printInfo.rightMargin = 36 printInfo.isHorizontallyCentered = true printInfo.isVerticallyCentered = false printInfo.horizontalPagination = .fit printInfo.verticalPagination = .automatic printInfo.setUpPrintOperationDefaultValues() let op = webView.printOperation(with: printInfo) op.view?.frame = webView.bounds guard let window = webView.window else { return } op.showsPrintPanel = true op.showsProgressPanel = true op.jobTitle = jobTitle op.runModal(for: window, delegate: nil, didRun: nil, contextInfo: nil) }
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to What do Xcode Project Versioning settings do?
I completely agree. I played with the build configuration files yesterday and that's absolutely the way to go. Again, I really appreciate your responses - I'd blown so much time stuck on this and you instantly got me past it.
Replies
Boosts
Views
Activity
Jun ’22
Reply to How can I revoke INFocusStatusCenter.default.requestAuthorization on macOS?
I was randomly searching these forums and happened to see someone mention tccutil, which does exactly what I need. The man page has great example usage. Problem solved.
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to TotalSpace3, Apple please wake-up!
Even if Apple don't provide the solution, how about providing API's for Spaces that we've been asking for over the past decade?!
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Mar ’22