How to get printer settings of default printer in C#?

Hi,

   I am working on page setup form in my application. How can i get user's default printer settings? i need to show page sizes in a combo box..

Thanks
Bekir Karadeniz
BekirKaradenizAsked:
Who is Participating?
 
ozymandiasConnect With a Mentor Commented:
// create a print dialog which will be initilaised with default printer
PrintDialog pd = new PrintDialog();
// get the printer settings and get the papersizes
// iterate throught the available paper sizes and add them to your combobox
foreach(PaperSize p in pd.PrinterSettings.PaperSizes){
      comboBox1.Items.Add(p.PaperName);
}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.