As the title suggests, the pdffileeditor.setMergeDuplicateOutlines(true); discards some bookmarks and only keep the first bookmark. I have attached the files to merge and you can try it using below code:
public static void main(String[] args) throws Exception {
String in1 = "bookmark3.pdf";
String in2 = "testA.pdf";
String out = "bookmark3_out.pdf";
PdfFileEditor editor = new PdfFileEditor();
editor.setMergeDuplicateOutlines(true);
editor.concatenate(in1, in2, out);
}
bookmark3.pdf (253.1 KB)
testA.pdf (927 Bytes)
@stonechen28
Hi
I tested your code on latest version
bookmark3_out.pdf (247.3 KB)
it seems that the issue has already been fixed
Could you specify version you’ve encountered this issue on, please?
I am using 25.4.
Could you confirm that you do have the issue when running the code using 25.4? And that is fixed in the latest version?
@stonechen28
Could you attach result file you’ve received, please?
@stonechen28
I’ve checked your file bookmark3_out (1).pdf
screenshot_acrobat.png (39.1 KB)
At least in Adobe Acrobat the bookmarks seem identical to the source document bookmark3.pdf and they all active.
It seems either I don’t understand the issue or the bookmarks are correct.
Could you confirm that in your case document has different behavior?
good.png (20.2 KB)
bad.png (21.6 KB)
I attached the screenshot. The “bad.png” shows that it is missing a bookmark, while the “good.png” shows the correct result if I don’t use the setMergeDuplicateOutlines(true). @ilyazhuykov
@stonechen28
Thank you for explanation
I tested on 25.4 and 26.3
The issue with bookmark is absent in 26.3 so it confirms that at least in this case the issue was fixed
bookmark3_out_26.3.pdf (247.3 KB)
bookmark3_out_25.4.pdf (247.1 KB)
1 Like
I tried 26.3 with my license and it throws below message:
The subscription included in this license allows free upgrades until 01 Dec 2025, but this version of the product was released on 25 Mar 2026
But then I tried it with the evaluation license on 26.3 and there is no bookmark at all after merge. I am using the " aspose-pdf-26.3.jar". Let me know if I am using the wrong one. I am not sure if it is because the evaluation license doesn’t provide that feature, or anything else is wrong. I tried with aspose-pdf-25.11.jar, the latest one that I can try with my license, and still no bookmarks at all after merge.
I then tried 25.5, the issue with the bookmark that only the first bookmark remains in that version.
I am using jdk17 or jdk21 to compile but the results are the same.
To consider renewing the license, we at least need to confirm on our end whether or not it fixed the issue. Is there any way I can do? Or could you help me point out if I did anything wrong? @ilyazhuykov Thanks!
@stonechen28
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFJAVA-45945
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Ok, let’s create task for development team to investigate why such issue may occur. I’ll try to write them and ask to look it ASAP and will keep you updated on results.
1 Like
We renewed the license. and I used https://releases.aspose.com/java/repo/com/aspose/aspose-pdf/26.3/aspose-pdf-26.3.jar
to run the same code. No matter I use the setMergeDuplicateOutlines or not, still no bookmarks at all in the resulted bookmark3_out.pdf.
bookmark3_out.pdf (246.5 KB)
image.png (23.1 KB)
@stonechen28
I wrote the developer directly and asked to check the issue as soon as possible
I think it’s reasonable to expect it to be resolved in nearest future
1 Like