Represents a bookmark.
For a list of all members of this type, see Bookmark members.
![]() ![]() ![]() ![]()
|
ceTe.DynamicPDF.PageElement
ceTe.DynamicPDF.PageElements.Bookmark
[Visual Basic]
Public Class Bookmark
Inherits PageElement
Implements ICoordinate [C#]
public class Bookmark : PageElement, ICoordinate This class can be used to place bookmarks on the PDF document. These bookmarks will be displayed to the right of the PDF document. See the Outlines and Bookmarks topic for more details on bookmarks.
The following example will place three bookmarks on the PDF document. Each bookmark has a different action. The first bookmark links to a URL and when clicked on will open up that URL in the current window. The second bookmark when clicked will zoom the page to fit the width of that page. The third bookmark when clicked will bring the specified X, Y destination into focus. If that destination location is already visible no action is taken.
[Visual Basic]
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create three page objects
Dim MyPage1 As Page = New Page(PageSize.Letter)
Dim MyPage2 As Page = New Page(PageSize.Letter)
Dim MyPage3 As Page = New Page(PageSize.Letter)
' Add a top level Outline
Dim MyParentOutline As Outline = MyDocument.Outlines.Add("Parent Outline")
' Add a top level bookmark
MyPage1.Elements.Add(New Bookmark("Top level bookmark to page 1", 0, 0))
' Add child bookmarks
MyPage1.Elements.Add(New Bookmark("Bookmark to page 1", 0, 0, MyParentOutline))
MyPage2.Elements.Add(New Bookmark("Bookmark to page 2", 0, 0, MyParentOutline))
MyPage3.Elements.Add(New Bookmark("Bookmark to page 3", 0, 0, MyParentOutline))
' Add the three pages to the document
MyDocument.Pages.Add(MyPage1)
MyDocument.Pages.Add(MyPage2)
MyDocument.Pages.Add(MyPage3)
' Save the PDF document
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
[C#]
using System; |
This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:
Namespace: ceTe.DynamicPDF.PageElements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)
Bookmark Members | ceTe.DynamicPDF.PageElements Namespace
© Copyright 2006, ceTe Software