Hi Marcus,
Greetings from Syncfusion.
Please find the code snippet for swapping the bookmark name in the PdfLoadedDocument:
//Loads the PDF document.
PdfLoadedDocument document = new PdfLoadedDocument(DataPathOutput + "Output.pdf");
//Gets all the bookmarks.
PdfBookmarkBase bookmarks = document.Bookmarks;
//Gets the first two bookmark and its Title.
PdfLoadedBookmark bookmark1 = bookmarks[0] as PdfLoadedBookmark;
string title1 = bookmark1.Title;
PdfLoadedBookmark bookmark2 = bookmarks[1] as PdfLoadedBookmark;
string title2 = bookmark2.Title;
//Swapping the title name of the first two bookmarks
bookmark1.Title = title2;
bookmark2.Title = title1;
//Saves the document
document.Save(DataPathOutput+"modified.pdf");
|
Sample for the same can be downloaded from below link:
http://www.syncfusion.com/downloads/support/forum/144028/ze/BookMarkSwap1050178903
Please let us know if you need any further assistance in this.
Thanks
Meikandan