Description

Adds a Bookmark object to the Page and returns a New Bookmark object.

Syntax

Public Function AddBookmark( _
   ByVal Text As String, _
   ByVal X As Single, _
   ByVal Y As Single _
) As Bookmark

Parameters

Text
The text of the bookmark.
X
The X Coordinate of the Bookmark.
Y
The Y Coordinate of the Bookmark.

Return Type

A Bookmark object.

Example

[ASP - VBScript] 

<% 
    Dim MyDocument 
    Dim MyPage1 
    Dim MyPage2 
    Dim MyPage3 
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" ) 
    Dim MyTemplate 
    Set MyTemplate = MyDocument.SetTemplate 
    Dim MyPageNumberLabel 
    Set MyPageNumberLabel = MyTemplate.AddPageNumberingLabel( "PageNumber %%CP%% OF %%TP%%", 200, 50, 120, 30 ) 
    Set MyPage1 = MyDocument.AddPage() 
    Set MyPage2 = MyDocument.AddPage() 
    Set MyPage3 = MyDocument.AddPage() 
    Dim MyParentOutline 
    Dim MyTopBkmark 
    Set MyParentOutline = MyDocument.AddOutline( "Parent Outline" ) 
    Set MyTopBkmark = MyPage1.AddBookmark( "Top Level BookMark to Page 1", 0, 0 ) 
    MyTopBkmark.ParentOutline = MyParentOutline 
    Dim MyChildBookMark1 
    Dim MyChildBookMark2 
    Dim MyChildBookMark3 
    Set MyChildBookMark1 = MyPage1.AddBookMark( "BookMark to Page 1", 0, 0 ) 
    MyChildBookMark1.ParentOutline = MyParentOutline 
    Set MyChildBookMark2 = MyPage2.AddBookMark( "BookMark to Page 2", 0, 0 ) 
    MyChildBookMark2.ParentOutline = MyParentOutline 
    Set MyChildBookMark3 = MyPage3.AddBookMark( "BookMark to Page 3", 0, 0 ) 
    MyChildBookMark3.ParentOutline = MyParentOutline 
    MyDocument.DrawToWeb 
    Set MyTemplate = Nothing 
    Set MyPage1 = Nothing 
    Set MyPage2 = Nothing 
    Set MyPage3 = Nothing 
    Set MyDocument = Nothing 
%> 

See Also

Page Object