1. You can use .net printing classes and give all the exact info to the properties like printer name, address etc. and then paint out of the text to the printer in the print event.
2. You can use the basic api way like you see below with a .net wrapper.
*note : The print dialog that shows up will show you printers based on your network profile and rights. If the printers don't show up you have to search for them on the form and hope u have rights to print to them.
Process process = new Process();
process.StartInfo.Verb = "Print";
process.StartInfo.FileName = <full file path of file to print>;
If it is a web form you can open it in a browser window and call the JavaScript window.print() method in that window. This way it would bring up the clients list of printers. Otherwise if the server had access to the same printer you could send the document from the server to the printer.
print on network printer
zdrae
This is window form- desktop application. Currently I execute "copy filename SharedPrinterName" through process class and it works fine.
Is there any other way it is possible
pst_grant
hazz
Well you kinda have a few options.
1. You can use .net printing classes and give all the exact info to the properties like printer name, address etc. and then paint out of the text to the printer in the print event.
2. You can use the basic api way like you see below with a .net wrapper.
*note : The print dialog that shows up will show you printers based on your network profile and rights. If the printers don't show up you have to search for them on the form and hope u have rights to print to them.
Process process = new Process();
process.StartInfo.Verb = "Print";
process.StartInfo.FileName = <full file path of file to print>;
try { process.Start(); }
catch (Exception ex)
{
}
Hardrock302
maverick_majnoo
Is this a web client or winform
If it is a web form you can open it in a browser window and call the JavaScript window.print() method in that window. This way it would bring up the clients list of printers. Otherwise if the server had access to the same printer you could send the document from the server to the printer.