wpf System.Windows.Controls.PrintDialog preselected PrintQueue (printer) is ignored

26 Views Asked by At

I want to show the PrintDialog from System.Windows.Controls. I also want to preselect a specific printer in some cases. I tried it this way:

PrintDialog printDialog = new PrintDialog();
printDialog.PrintQueue = new PrintQueue(new PrintServer(), printerName);

and also this way:

PrintServer printServer = new PrintServer();
PrintDialog printDialog = new PrintDialog();
printDialog.PrintQueue = printServer.GetPrintQueue(printerName);

But in both cases the default printer is preselected, not the printer I defined in printerName. Anyone an idea why this can be or what I can do better?

Edit: It seems to always be the default printer set by the OS not what I define in the PrintDialog.PrintQueue...

0

There are 0 best solutions below