Here is my sample code. But its printing a blank page
printDocument1.DocumentName = "C:\a.pbf";
printDialog1.Document = printDocument1;
printDialog1.AllowPrintToFile = true;
printDialog1.AllowSelection = true;
printDialog1.AllowSomePages = true;
printDialog1.PrintToFile = true;
if (printDialog1.ShowDialog() == DialogResult.OK)
printDocument1.Print();
What is wrong with that? Please help me
source
share