Loosing Borkmars while merging pdfs

Hi,

We are trying to replace a different product jar file with aspose and we are left with just one item that is bookmarks - creating and preserving them but when I am using the following code to add bookmarks to an existing pdf file. The issue is it creates a parent bookmark as bookmark 0 but only creates 2 child as child bookmark 2 and 3. Below is the image how it is creating.



com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(“C:\documents\testdata\GI_3a8b4e21-2063-40ec-8b6c-7daa2bfc2fac.pdf”);

PdfBookmarkEditor bookmarkEditor = new PdfBookmarkEditor();
bookmarkEditor.bindPdf(pdfDocument);

com.aspose.pdf.OutlineItemCollection parentOutline = new com.aspose.pdf.OutlineItemCollection(pdfDocument.getOutlines());
// Extract bookmarks
Bookmarks bookmarks = bookmarkEditor.extractBookmarks();
com.aspose.pdf.facades.Bookmarks childList = new com.aspose.pdf.facades.Bookmarks();

for(int i = 0; i < 3; i++)
{
Bookmark bookMark = new Bookmark();

bookMark.setPageNumber(i);
bookMark.setTitle("Parent Bookmark " + i);
bookMark.setLevel(1);

for (int j = 0; j < 4; j++)
{
com.aspose.pdf.facades.Bookmark bookmark2 = new com.aspose.pdf.facades.Bookmark();
bookmark2.setPageNumber(1);
bookmark2.setTitle("child bookmark " + j);
bookmark2.setLevel(2);

childList.add(bookmark2);
}

bookMark.setChildItem(childList);

bookmarkEditor.createBookmarks(bookMark);
}

bookmarkEditor.save(“C:\users\mathurrk\bookEdit.pdf”);

Thanks in advance.

Hi Rajeev,

We are sorry for the inconvenience caused. While testing the scenario with the latest version of Aspose.Pdf for Java 9.1.0, we have managed to reproduce the reported issue and logged it in our bug tracking system as PDFNEWJAVA-34265 for further investigation and resolution. We will notify you via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,

Hi,

Thanks for your response, but is there a workaround to create bookmarks for an existing pdf files.
I know the what is the bookmark text, destination page and level.

Best Regards

Hi Rajeev,


Thanks for your feedback. I am afraid you have to wait for the fix of above reported issue as creating Bookmark feature is malfunctioning at the moment.

We are sorry for the inconvenience caused.

Best Regards,

Hi,

Thanks for your response, we have priority Support for Aspose so is it possible to expedite the fix for this issue since this issue is a show stopper for us.

Best Regards

Hi Rajeev,


Thanks for your feedback. Yes if you have priority support service then you can raise this issue in related forum, respect to your paid support privileges. To treat this issue with priority, you may create a new post in Priority/Enterprise Support forum and reference this post. So we will enhance the priority of related JIRA issue in our issue tracking system accordingly.

Best Regards,

Hi,

Can you please provide any update regarding the Bookmark issue, is there any timeline that you can give us. This is an issue because of which our release is blocked and we can not use Aspose if this issue is not fixed.

Regards
Rajeev

Hi Rajeev,


Since we recently have been able to notice this issue, and until
or unless we have investigated and have figured out the actual reasons of this
problem, we might not be able to share any timelines by which this problem will
be resolved.


However your concerns have been shared with development team and they will do the needful. However as suggested earlier, if you raise this problem to Priority Support or Enterprise Support, the investigation process can be expedited, as it will increase precedence of issue in terms of investigation.