Closed istvanpp closed 5 years ago
looks like it couldn't get any better. i mean, i normally like ++a, and not a++, but who cares :).
oh. one thing. you don't need to create another reader for the pdf file. when creating a modification writer, it creates internally a parser and provider a handle for you. so you can get pages count with:
pdfInserPageNumber.getModifiedFileParser().getPagesCount()
this should save you some time.
Thank you @galkahana , I have updated my code based on your observation.
Hi, could you please provide me an example how to add page numbers in the footer of an existing PDF document?
Isn't clear for me, which method or solutions is the best and the fastest for this process?
My code is working, but I am not sure if I am using the best solution: