Piyush Mohan

Piyush Mohan

  • NA
  • 96
  • 9.5k

Printing form gives me blank page from printer

Jan 15 2021 10:57 AM
Printing form gives me blank page from printer.
 
I used below codes:-
  1. PrintDocument pd = new PrintDocument();  
  2. pd.PrinterSettings.PrinterName = cmbprinter.SelectedItem.ToString();  
  3. string[] files = Directory.GetFiles(FileDir);  
  4. foreach (string file in files)  
  5. {  
  6. FileInfo file_into = new FileInfo(file);  
  7. string short_name = file_into.Name;  
  8. pd.DocumentName = short_name;  
  9. pd.Print();  
  10. }  

Answers (2)