How to change paper size or other printer settings programmatically.
I would like to have a feature where I can design a report for letter-sized paper, but at run time, if the user has set their default printer to legal, or A4 or some other paper size (or changed other settings, like duplex), I would like my program to automatically prepare the report (for viewing on screen and/or printing to a printer) using their current settings. I don't want the user to have to open dialogs to do this each time then print.
How can I do that?