0

I have a class that create a pdf file using iText. My document has a text that needs appear in the content area of the first page, something like that "This document has 10 pages". All examples i found to do that, like this put page number when create PDF with iTextSharp show the pages number in header or footer, not in content area. Any idea how to do that?

  • Create an empty `PdfTemplate` with a size that can hold the number of pages. Add that `PdfTemplate` to the document content where you want the total page number to eventually turn up. At the end write the final page number into that template. – mkl Mar 17 '22 at 14:47
  • Thanks for the answer. – Amarildo Almeida Mar 21 '22 at 20:33

0 Answers0