I am trying to get the printer name selected by the user from the PrintDialog, however PrintDialog1.PrinterSettings.PrinterName.Equals is returning the default windows printer name and not the printer selected in the dialog, any clues?
Dim userResp As DialogResult = PrintDialog1.ShowDialog()
PrintDialog1.Document = PreparePrintDocument()
If userResp = DialogResult.OK Then
If PrintDialog1.PrinterSettings.PrinterName.Equals("Microsoft Print to PDF") Then
do something
Else
do something else
End If
In this example after pressing "Microsoft Print to PDF" in the dialog, debug states the value is "Canon xxx" which is the windows default printer.
Is there another way to get the printer selected in the dialog? Docs state that PrinterSettings.PrinterName can GET or SET the value?