Sharing a single PrintDocument instance
In my WinForms application, data can be printed in many places. Every time the user wants to print, I create a new PrintDocument instance that is used for the current print job and then deleted. Everything works, but the print dialog always reverts to the default printer and its default settings. If a different printer is selected, the user must select it over and over again each time.
Is it a common approach to create one global PrintDocument instance and share it across all print jobs throughout the application? Thus, the last selected printer will always be used. Or are there other ways?
Thanks, Petr
+1
source to share