Reputation: 7311
I tried to send a Printdocument
in C# to a printer that was not set as the default printer in Windows. How can it be possible?
There are two printers on the system, and I send a print command to a thermal printer that is not set as the default printer.
When I use
MyPrintdocument.Print();
it sends the print command to the default printer.
Upvotes: 4
Views: 3294
Reputation: 5355
Check MSDN. Assuming you are using the PrintDocument
class, it says you can set the printer settings via PrintDocument.PrinterSettings. And then you can probably set the printer via PrinterSettings.PrinterName.
Upvotes: 2