The AppKit release notes for Leopard say:
In many applications it is not appropriate to present page setup panels to the user, or even include a Page Setup... item in the File menu, but there has been no other easy way to let the user specify page setup parameters to be used when printing. (New UI advice: if your application doesn't persistently store page setup parameters on a per-document basis, or have some mechanism to associate them with whatever other kind of large-scale objects your application may deal with, it probably shouldn't have a page setup panel at all.)
I have fairly simple printing needs and would like to eliminate the “Page Setup...” command from my application.
My previous recipe for printing text was to create an offscreen text view of an appropriate size for the current paper size and orientation, then start a print operation for that view.
However, if allow the user to change the paper size and orientation in the print panel, I need to react to that change and reconfigure my printing text view.
What is the correct way to handle this situation?
My current hacked up sample app does this by subclassing NSTextView and reconfiguring for the new page parameters in -[MyTextView knowsPageRange:]
.