Answer the question
In order to leave comments, you need to log in
How to get page number out of total when generating PDF using iTextSharp C#?
I generate PDF and how many pages will be as a result is not known. At the moment, I can display only its serial number on each page by overriding OnEndPage (), in which I get the current page number and display it. Is it possible somehow after the formation of the document to add the total number of pages to each page?
Answer the question
In order to leave comments, you need to log in
In the iText library, from which the iTextSharp port is made, there are such examples , maybe this will push something. After the document is generated, PdfStamper is used to add headers and footers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question