How to Print on macOS With An NSTableView and Customize the Result
So a client of mine recently asked how he could customize his app’s printing. The app’s main window there mostly showed tabular data, so when you’re inside the NSTableView
and hit ⌘P to print, the table view will redirect its draw(_:)
output to the print dialog. That’s how you get printing for free.