PdfBookmarkEditor

PdfBookmarkEditor

Overview

PdfBookmarkEditor is a class in Aspose.PDF FOSS for .NET. Inherits from: IDisposable.

Facade for bookmark (outline) manipulation: create, extract, delete bookmarks.

This class provides 29 methods for working with PdfBookmarkEditor objects in .NET programs. Available methods include: BindPdf, Close, CreateBookmarkOfPage, CreateBookmarks, DeleteBookmarks, Dispose, ExportBookmarksToHtml, ExportBookmarksToXML, ExtractBookmarks, ExtractBookmarksToHTML, ImportBookmarksWithXML, ModifyBookmarks, and 2 additional methods. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.

Methods

SignatureDescription
PdfBookmarkEditor()Create an unbound PdfBookmarkEditor.
PdfBookmarkEditor(document: Document)Create a PdfBookmarkEditor bound to a Document.
BindPdf(path: string)Bind PDF from a file path.
BindPdf(data: byte[])Bind PDF from a byte array.
BindPdf(stream: Stream)Bind PDF from a Stream (reads the stream fully into memory).
BindPdf(document: Document)Bind PDF from an existing Document.
CreateBookmarkOfPage(bookmarkName: string, pageNumber: int)Create a bookmark pointing to the specified page (1-based).
CreateBookmarkOfPage(bookmarkName: string[], pageNumber: int[])Create bookmarks for the specified pages (1-based page numbers).
CreateBookmarks()Create bookmarks for every page (default).
CreateBookmarks(color: System.Drawing.Color, boldFlag: bool, italicFlag: bool)Create per-page bookmarks with explicit colour / bold / italic styling.
CreateBookmarks(bookmark: Bookmark)Create bookmarks from a Bookmark tree (recursive add of children).
DeleteBookmarks()Delete every bookmark in the bound document.
DeleteBookmarks(title: string)Delete every top-level bookmark whose Title matches title, persisting the change to the saved document.
Save(stream: Stream)Save the document to a stream.
Save()Save the document to a byte array.
Save(path: string)Save the document to a file path.
ExtractBookmarks()Extract the document’s outline tree as a flat Bookmarks collection, walking children depth-first.
ExtractBookmarks(upperLevel: bool)Extract the document’s outline tree.
ExtractBookmarks(title: string)Find bookmarks (and their descendants) whose Title equals title.
ExtractBookmarks(bookmark: Bookmark)Extract the descendant bookmarks of bookmark.
ExportBookmarksToXML(stream: Stream)Export the outline tree to stream as XML.
ExportBookmarksToXML(xmlFile: string)Export the outline tree to xmlFile.
ImportBookmarksWithXML(stream: Stream)Read bookmarks from XML produced by Stream) and add them to the bound document.
ImportBookmarksWithXML(xmlFile: string)Read bookmarks from an XML file and add them to the bound document.
ExportBookmarksToHtml(inPdfFile: string, outHtmlFile: string)Export bookmarks to a standalone HTML file.
ExtractBookmarksToHTML(pdfFile: string, cssFile: string)Extract bookmarks to an HTML page with the given CSS.
ModifyBookmarks(sTitle: string, dTitle: string)Rename every bookmark whose title equals sTitle to dTitle, throughout the outline tree.
Dispose()Calls Dispose on this PdfBookmarkEditor instance.
Close()Release the bound document, mirroring Dispose.

See Also