G
G
Gif_off2014-10-27 21:59:54
C++ / C#
Gif_off, 2014-10-27 21:59:54

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

2 answer(s)
G
Gif_off, 2014-10-28
@Gif_off

Found how to do it through templates

A
Alexander Sydorenko, 2014-10-27
@San40

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 question

Ask a Question

731 491 924 answers to any question