Print x of y page in .Net

If I have a very large document to print, and on each page of the document you need to say "page x of y". Was it possible to pre-calculate y without printing twice, as suggested here: http://bytes.com/topic/c-sharp/answers/862133-c-printing-page-count

I try to avoid printing once by receiving them and then installing it and then printing it again.

+1
source share
1 answer

No, because there is no way to know in advance how many pages your printout will take without actually rendering the content.

You do not need to print it twice, you just need to simulate printing first.

+2
source

Source: https://habr.com/ru/post/895384/


All Articles