Printing page x of y in .Net
If I have a very large document to print and on each page of the document it needs to say "page x of y" Is there a way I could precalculate y without having to printing t开发者_开发问答wice as offered as a solution here: http://bytes.com/topic/c-sharp/answers/862133-c-printing-page-count
I'm trying to avoid printing once, getting they y and then setting it, then printing again.
No, because there's no way to know ahead of time how many pages your printout is going to take, without actually rendering the content.
You don't have to print it twice, you just have to simulate printing the first time.
精彩评论