Paging into a PDF


Into a PDF file build with tAdvPDFLib, how to make a paging like this :
"1/10, 2/10, ... 10/10"

From you demo, it is this paging used; however it is done "by hand" into the footer ( p.Footer := 'Page 1/1';).

I tried using these functions :
page := IntToStr(pdf.GetPageIndex + 1) + '/' + IntToStr(Pdf.GetPageCount);

But of course, it doesn't work and I obtain :
"1/1, 2/2, ... 10/10"



The TAdvPDFLib does not know how many pages are added because everyting happens dynamically, so to know how many pages you have, you will need to calculate the pages before adding them and then use this number as a indicator of how many pages there are. There is no solution built in to retrieve how many pages there are and add a page number afterwards. When a new page is added, the current page is finished and there is no drawing allowed.


Thanks for your answer

That's I suspected :frowning:

Possible to add this possibility in "feature request" ?

We'll add this on our feature request list, but it's unclear if this will be possible, as the content is always provided by the user which is dynamic and unknown at the time of creating the pages. We'll explore the possibilities.

Thanks a LOT :clap: