What I am doing is to generate a pdf booklet from database. I need go generate a content table with page numbers. E.g there are two chapters with page number like:
=============================
Content table
Chapter 1 —– 3
Chapter 2 —– 17
=============================
The text “Chapter 1 —– ” is normal paragraph. But the page number “3” has to be produced using PdfTemplate because it can only be known later. But the pdfTemplate is absolutely positioned. How can I know where to position the PdfTemplate? Am I right on this ? How could I figure this out or should I use other methods?
I’ve extracted a bit of code to get you on your way.. This code allows you to place text anywhere on a page using an x and y. You may actually want to use iTextSharp’s built in paragraph and margin support, but this will be useful, just needs converting to C#
Look this next bit with each element you want to add..