[Gtk-sharp-list] Printer and Paper Size

Jim Orcheson jim at va3hj.ca
Mon Jul 11 07:13:16 EDT 2011

In my application I would like to save a user-selectable default printer 
and default paper size. I see two potential ways of doing this, but 
neither way provides the full functionality that I want:

1. I can enumerate all of the printers on the system, then get a list of 
all papers for that printer.
2. Use PageSetup dialog.

Method 1 suffers because it does not list custom defined paper sizes, 
just includes a "Custom" entry, and does not provide a way to manage 
custom sizes. The latter is not really a problem, but not being able to 
get custom sizes is.

Method 2 { PageSetup s = Print.RunPageSetupDialog(this, setup, printSet);  }
lists the custom sizes and allows the user to manage custom sizes, but 
there appears to be no way to retrieve the selected printer. Also, the 
orientation selection is redundant in my application.

Is there any way to get both the selected printer and the selected paper 
size without the redundant steps of enumerating the printers, then 
passing the printer in a PrintSettings object to the PageSetup dialog 
where the user could select a different printer?


More information about the Gtk-sharp-list mailing list