We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Deleting pages caused bookmarks to delete

I’m using PdfBookmarkEditor to create bookmarks. Subsequently, I am using PdfFileEditor to Delete certain pages. However, this causes my bookmarks to be deleted.

I need assistance with this.


Thanks for using our products.

I tried to replicate your issue using sourc code available in the following documentation links:

Create Bookmarks of All Pages (Facades)

Delete PDF Pages Using File Paths (Facades)

I was unable to produce the problem at my end. Can you please share some details regarding sample source code and template documents you are using or create a sample application to show the issue. This will help us to figure out the issue and reply back to you soon.

We apologize for your inconvenience.

Thanks & Regards,

I have attached the PDF. I issue these lines of code and the bookmarks are gone:

Dim page(0) As Integer
Dim pdfEditor As Facades.PdfFileEditor = New Facades.PdfFileEditor()

page(0) = 16
Dim rc As Boolean = pdfEditor.Delete(the_working_folder & WORKING_FILE, page, the_working_folder & “new.pdf”)


Thanks for sharing the sample source code and template document. I tested the scenario with your sample source code using Aspose.Pdf for .NET v6.8 and unable to find any issue in bookmarks of resultant document. The resultant document is attaced for your reference. Kindly try to use the latest version of Aspose.Pdf for .NET v6.8 and check if it fits your need.

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

6.8 seems to have fixed it. Thanks!