Search Results for

    Show / Hide Table of Contents

    Class PdfOutline

    A editable collection of PDF navigational bookmark objects.

    Inheritance
    System.Object
    PdfOutline
    Namespace: IronPdf.Bookmarks
    Assembly: IronPdf.dll
    Syntax
    public class PdfOutline : Object

    Properties

    BookMarkList

    Gets the full list of current outline book marks.

    Declaration
    public List<PdfBookMark> BookMarkList { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<PdfBookMark>

    The PDF documents full collection of bookmarks.

    Methods

    AddBookMarkAtEnd(String, Int32, Int32)

    Adds a bookmark at the end of the document outline.

    Declaration
    public void AddBookMarkAtEnd(string Text, int PageIndex, int IndentLevel = 0)
    Parameters
    Type Name Description
    System.String Text

    The display text for the link.

    System.Int32 PageIndex

    The zero based page number to link to. E.g. Page 1 has a PageIndex of 0

    System.Int32 IndentLevel

    The indent level in the outline. An IndentLevel of zero is in the root. An IndentLevel of N will be nested inside the most recent previous bookmark of IndentLevel N-1.

    AddBookMarkAtStart(String, Int32, Int32)

    Adds a bookmark at the start of the document outline.

    Declaration
    public void AddBookMarkAtStart(string Text, int PageIndex, int IndentLevel = 0)
    Parameters
    Type Name Description
    System.String Text

    The display text for the link.

    System.Int32 PageIndex

    The zero based page number to link to. E.g. Page 1 has a PageIndex of 0

    System.Int32 IndentLevel

    The indent level in the outline. An IndentLevel of zero is in the root. An IndentLevel of N will be nested inside the most recent previous bookmark of IndentLevel N-1.

    Clean()

    Removes all existing bookmarks from the PDF

    Declaration
    public void Clean()

    InsertBookMark(Int32, String, Int32, Int32)

    Insert a bookmark at the start of the document outline.

    Declaration
    public void InsertBookMark(int Position, string Text, int PageIndex, int IndentLevel = 0)
    Parameters
    Type Name Description
    System.Int32 Position

    The position of the bookmark in the BookMark list.

    System.String Text

    The display text for the link.

    System.Int32 PageIndex

    The zero based page number to link to. E.g. Page 1 has a PageIndex of 0

    System.Int32 IndentLevel

    The indent level in the outline. An IndentLevel of zero is in the root. An IndentLevel of N will be nested inside the most recent previous bookmark of IndentLevel N-1.

    RemoveBookMark(PdfBookMark)

    Removes a single book mark from the BookMarkList

    Declaration
    public void RemoveBookMark(PdfBookMark bookmark)
    Parameters
    Type Name Description
    PdfBookMark bookmark

    The bookmark object to remove.

    RemoveBookMarkAt(Int32)

    Removes a single book mark from the BookMarkList

    Declaration
    public void RemoveBookMarkAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the bookmark to remove.

    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronPDF to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPDF free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.