public static int GetPageCount(PrintDocument printDocument) { int count = 0; printDocument.PrintController = new PreviewPrintController(); printDocument.PrintPage += (sender, e) => count++; printDocument.Print(); return count; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)