• Post Reply Bookmark Topic Watch Topic
  • New Topic

PDFBOX merge document not updating the page numbers correctly  RSS feed

 
Vijay Thangavelu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using PDFBox linbrary to merge multiple pdfs into one pdf and its functionality is completely working fine but I see once issue in the final generated pdf.

The final pdf page numbers [only in the text box section] are not updated as expected.

Consider if I am merging 2 pdf of 27 pages each, then the final pdf has 54 pages but the page navigation text box in the pdf shows 1 for the 28th page and 2 for the 29th page and so on.

Below is the sample code for merging 2 pdf files,



I have also attached the screenshot of the page section of the merged pdf having incorrect page number.

Please help me if we have any direct solution to fix this,

Awaiting for replies!!!

Thanks,
Vijay
pdf_pagenumber_issue.png
[Thumbnail for pdf_pagenumber_issue.png]
Merged Pdf Page number incorrect.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right: All that the merging does is append one PDF to the other. The page numbers are part of each page, which is not altered in any way.

You should be able to write code that opens the merged PDF, removes all headers and forters, and adds them anew according to your requirements.
 
Vijay Thangavelu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply...It helps me to look into different directions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!