This example shows how to write 'page of pages' in the footer of a pdf document. Basically it uses a template for the total number of pages, and this template is updated in the onCloseDocument event. From what I see, the example assumes that the total number of pages is less than 10 (only one digit); if the total number of pages exceeds 9, the position of the preceding text (Page x of) is incorrect, when the text is horizontally aligned right. Is there an easy way to solve this issue?
Asked
Active
Viewed 49 times
0
-
1If you need a really good looking layout, you need the exact number of pages before starting to draw the numbers. Thus, instead of the page event solution, you should use the 2 pass solution. – mkl Jul 29 '17 at 19:05
-
I didn't know about the 2 pass solution. This comment actually answered my question. – esims Jul 29 '17 at 19:41