I am working on a project(online printing management system). By which we use network printer for
printing files but when we gives following code for printing file.
print document does not get the file from the system.
if (printersList.Items.Count > 0)
{
pr = new PrintDocument();
pr.PrinterSettings = new PrinterSettings();
pr.PrinterSettings.PrinterName = printersList.SelectedItem.
ToString();
pr.PrinterSettings.Copies = Convert.ToInt16(txtNoOfCopies.Text);
//if (File.Exists(filename ))
//{
pr.PrinterSettings.PrintFileName = FileUpload1.FileName;
// pr.PrinterSettings.PrintFileName = filename;
pr.Print();
//}
// }
printer gets the command but print blank pages.
in highlited line printersetting does not get the file name.
plz suggest the right solution if possible.