Create Bookmarks in Existing PDF Document using C#

I try to create for existing pdf new bookmarks tree like this

Bookmarks bookmarks = new Bookmarks();
var rootBokmark = CreateBookmark("Root", 1);
var secondBokmark = CreateBookmark("Second", 2);
var child1Bokmark = CreateBookmark("Second", 3);
var child2Bokmark = CreateBookmark("Second", 3);
bookmarks.Add(child1Bokmark);
bookmarks.Add(child2Bokmark);
secondBokmark.ChildItems = bookmarks;
rootBokmark.ChildItems.Add(secondBokmark);
bookmarkEdit.CreateBookmarks(rootBokmark);, 

but I have issue when I open in a new object PdfBookmarkEditor.ExtractBookmarks();
I have 4 bookmarks instead of 1. And if I open that file in Chrome and Adobe my bookmarks has different reference to page number.

@Vitalii

Could you please also share the sample source PDF file along with sample output PDF document? We will test the scenario in our environment and address it accordingly.

Test.pdf (24.3 KB)

You can try it with any pdfBookmarkTest.zip (692 Bytes)

@Vitalii

We were able to replicate the similar issue in our environment while testing the scenario using Aspose.PDF for .NET 21.11. Hence, it has been logged as PDFNET-50950 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi @asad.ali any updates about fix?

@Vitalii

The ticket has recently been logged in our issue management system and we are afraid that it is pending for a review. Please note that it will be resolved on a first come first serve basis. We will let you know as soon as we have further updates regarding ticket resolution. Please spare us some time.

We are sorry for the inconvenience.

Hi team, do you have updates here

I think this has already been fixed after a year?

@Vitalii

Regretfully, the earlier logged ticket could not get resolved due to other issues and tasks in the queue that need to be resolved in order to fix this ticket. Nevertheless, your ticket has been updated with your concerns and we will consider them as well during investigation. We will let you know as soon as we make some progress towards ticket resolution.

We are sorry for the inconvenience.