PdfBookmarkEditor.ExtractBookmarks

ExtractBookmarks()

Extracts bookmarks of all levels from the document.

public Bookmarks ExtractBookmarks()

Return Value

The bookmarks collection of all bookmarks that exist in the document.

Examples

PdfBookmarkEditor editor = new PdfBookmarkEditor();
editor.BindPdf("example.pdf");
Bookmarks bms = editor.ExtractBookmarks();
foreach(Bookmark bm in bms)
    Console.WriteLine(bm.Title);

See Also


ExtractBookmarks(bool)

Extracts bookmarks of all levels from the document.

public Bookmarks ExtractBookmarks(bool upperLevel)
ParameterTypeDescription
upperLevelBooleanIf true, extracts only upper level bookmarks. Else, extracts all bookmarks recursively.

Return Value

List of extracted bookmarks.

See Also


ExtractBookmarks(string)

Extracts the bookmarks with the specified title.

public Bookmarks ExtractBookmarks(string title)
ParameterTypeDescription
titleStringExtracted item title.

Return Value

Bookmark collection has items with the same title.

Examples

PdfBookmarkEditor editor = new PdfBookmarkEditor();
editor.BindPdf("example.pdf");
Bookmarks bms = editor.ExtractBookmarks("Title");
foreach(Bookmark bm in bms)
    Console.WriteLine(bm.Title);

See Also


ExtractBookmarks(Bookmark)

Extracts the children of a bookmark with a title like in specified bookamrk.

public Bookmarks ExtractBookmarks(Bookmark bookmark)
ParameterTypeDescription
bookmarkBookmarkThe specified bookamrk.

Return Value

Bookmark collection with child bookmarks.

Examples

PdfBookmarkEditor editor = new PdfBookmarkEditor();
editor.BindPdf("example.pdf");
Bookmark bookmark = new Bookmark();
bookmark.Title = "Title";
Bookmarks bms = editor.ExtractBookmarks(bookmark);
foreach(Bookmark bm in bms)
    Console.WriteLine(bm.Title);

See Also