VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
Vintasoft.Imaging.Pdf.Tree Namespace / PdfBookmark Class / Title Property
Syntax Example Requirements SeeAlso
In This Topic
    Title Property (PdfBookmark)
    In This Topic
    Gets or sets the text to be displayed on the screen for this bookmark.
    Syntax
    'Declaration
    
    Public Property Title As System.String
    
    
    public System.String Title { get; set; }
    
    
    public: __property System.String get_Title();
    public: __property void set_Title(
    System.String value
    );
    public:
    property System.String Title { System.String get(); void set(System.String value); }
    Example

    Here is an example that shows how to change text of PDF bookmark:

    
    ''' <summary>
    ''' Changes title of the first bookmark of PDF document.
    ''' </summary>
    ''' <param name="pdfFilename">The filename of PDF document.</param>
    Public Shared Sub ChangeFirstBookmarkTitle(pdfFilename As String)
        ' open PDF document
        Using document As New Vintasoft.Imaging.Pdf.PdfDocument(pdfFilename)
            ' get the first bookmark of PDF document
            Dim bookmark As Vintasoft.Imaging.Pdf.Tree.PdfBookmark = document.Bookmarks(0)
            ' change title of bookmark
            bookmark.Title = "First bookmark"
    
            ' save changes to a file
            document.SaveChanges()
        End Using
    End Sub
    
    
    
    /// <summary>
    /// Changes title of the first bookmark of PDF document.
    /// </summary>
    /// <param name="pdfFilename">The filename of PDF document.</param>
    public static void ChangeFirstBookmarkTitle(string pdfFilename)
    {
        // open PDF document
        using (Vintasoft.Imaging.Pdf.PdfDocument document = 
            new Vintasoft.Imaging.Pdf.PdfDocument(pdfFilename))
        {
            // get the first bookmark of PDF document
            Vintasoft.Imaging.Pdf.Tree.PdfBookmark bookmark = document.Bookmarks[0];
            // change title of bookmark
            bookmark.Title = "First bookmark";
    
            // save changes to a file
            document.SaveChanges();
        }
    }
    
    

    Requirements

    Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also