打印文档 N 页(共 N 页)
我正在使用此类手动打印和绘制文档,但不确定如何能够在文档第 1 页(共 10 页)、第 2 页(共 10 页)等上书写
有什么想法吗?
I am manually printing and drawing a document using this class but not sure how to be able to write on the document Page 1 of 10, Page 2 of 10 etc
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你必须数数。使用类属性来计数。
此外,您还必须计算总数。
请记住,每个页面都会调用 printPage 事件!
http://msdn.microsoft.com/en -us/library/system.drawing.printing.printdocument.printpage.aspx
You have to count. use a class attribute in order to count.
Moreover you have to calc the total count.
Remember the printPage event is call for each page !!
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx
据我所知,需要打印两段文字。第一个将在您计算页数时模拟打印过程。在第二次运行时,您实际上会将输出发送到打印设备,并且现在具有之前计算的页数。
As far as I can tell, it will be necessary two printing passagens. The first will simulate the printing process, while you count the pages. On the second run you actually will send the output to the print device and now having the previously counted pages.