Click here to Skip to main content
15,916,189 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
In my machine two printers are connected, I want to print an image from from my c sharp application using one of the printer without prompting the print dialog window. can i select programatically my printer for printing without setting it as default printer?
plz help..........
Posted
Updated 20-Jul-10 20:03pm
v2

1 solution

PrintDocument pd = new PrintDocument();
pd.PrinterSettings.PrinterName = "printername";

if(pd.PrinterSettings.IsValid)
pd.Print();
else
MessageBox.Show("Printer is invalid.");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900