Printing form gives me blank page from printer.
I used below codes:-
- PrintDocument pd = new PrintDocument();
- pd.PrinterSettings.PrinterName = cmbprinter.SelectedItem.ToString();
- string[] files = Directory.GetFiles(FileDir);
- foreach (string file in files)
- {
- FileInfo file_into = new FileInfo(file);
- string short_name = file_into.Name;
- pd.DocumentName = short_name;
- pd.Print();
- }

Kiran MohantyRank #821 · 2.8K reputationPosted Jan 16, 2021, 5:16 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Jan 15, 2021, 6:35 AM EST