如何使用c#计算打印输出 [英] how to count print outs using c#
本文介绍了如何使用c#计算打印输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何计算我们要发送到打印机的页面...?
how to count pages we are going send to the printer...?
推荐答案
试试这个..
try this..
public static int GetPageCount(PrintDocument printDocument)
{
int count = 0;
printDocument.PrintController = new PreviewPrintController();
printDocument.PrintPage += (sender, e) => count++;
printDocument.Print();
return count;
}
这篇关于如何使用c#计算打印输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文