We are using the following logic for bookmarks. It is taking forever to finish the following logic. The size of my PDF file is 3.5Gb and there are close to 500000 pages in this document.
public void SetBookMarks(string fileName, string bookmarkXml)
{
XDocument xDoc = XDocument.Load(bookmarkXml);
Aspose.Pdf.Facades.Bookmark all = new Aspose.Pdf.Facades.Bookmark();
all.Action = BookmarksConstants.GoTo;
all.PageNumber = 1;
all.Title = “All”;
foreach (var element in xDoc.Element(“File”).Elements(“Outline”))
{
all.ChildItems.Add(AddXmlElementBookmark(element));
}
var bookmarkEditor = new Aspose.Pdf.Facades.PdfBookmarkEditor();
Document sourceFile = new Document(fileName.Replace("_full_bookmarks.pdf", “.pdf”));
bookmarkEditor.BindPdf(sourceFile);
// Create bookmarks
bookmarkEditor.CreateBookmarks(all);
// Save updated document
bookmarkEditor.Save(fileName);
}
Thanks,
Rakesh
Would you please upload your file to Google Drive or Dropbox and share the link with us? We will test the scenario in our environment and address it accordingly.
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): PDFNET-55300
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.
If this is reported in paid support forum, it will definitely be escalated to highest priority and you will be receiving updates in the same paid support ticket.