Outlines & Bookmarks

C# + VB.Net: Outlines & Bookmarks Outlines & Bookmarks
using IronPdf;

// create a new PDF or edit an existing document.
PdfDocument Pdf = PdfDocument.FromFile("existing.pdf");

// Add a bookmark
Pdf.BookMarks.AddBookMarkAtEnd("Summary",17,0)

// Add a sub-bookmark within the summary
Pdf.BookMarks.AddBookMarkAtEnd("Conclusion",17,1)

//delete an old Bookmark
Pdf.BookMarks.RemoveBookMarkAt(0);


Pdf.SaveAs("existing.pdf");
Imports IronPdf

' create a new PDF or edit an existing document.
Private Pdf As PdfDocument = PdfDocument.FromFile("existing.pdf")

' Add a bookmark
Pdf.BookMarks.AddBookMarkAtEnd("Summary",17,0) Pdf.BookMarks.AddBookMarkAtEnd("Conclusion",17,1) Pdf.BookMarks.RemoveBookMarkAt(0)
' Add a sub-bookmark within the summary
'delete an old Bookmark


Pdf.SaveAs("existing.pdf")

A PDF outline or "bookmark" adds a way to navigate to key pages of a PDF. In Adobe Acrobat reader these bookmarks (which may be nested) are shown in the application's left sidebar. IronPDF will import existing BookMarks from PDF documents and allow them to be added, removed, re-ordered and edited.