IacBookmark.Object Property

The Object property sets/gets reference of object to which the bookmark points. Object can be the reference to a text, image or any other PDF Creator object. When navigating to a bookmark, the page where the object is located is shown, and the object scrolled into view.

Syntax

Visual Basic .NET:

Public Property [Object]() As String

C#:

public string Object [  get,  set ]

Remarks

 

Example

System.IO.FileStream file1 = new System.IO.FileStream("Bookmark.pdf", FileMode.Open);
 
System.IO.FileStream file2 = new System.IO.FileStream("Bookmarked5.pdf", FileMode.Create);
 
IacDocument document = new IacDocument(null);
 
// open a PDF file containing a text object in it.
document.Open(file1, "");
 
// set a root bookmark to access the whole bookmark tree
Amyuni.PDFCreator.IacBookmark root = document.RootBookmark;
 
// insert a bookmark under the root
root.InsertChild(0, "bookmark1", "acText1");
MessageBox.Show("Bookmark 1 is pointing to" + root.GetChild(0).BookmarkObject);
 
// change the object that "bookmark1" is pointing to,
// from "acText1" to "acText4" on page 4
root.GetChild(0).BookmarkObject = "acText4";
MessageBox.Show("Bookmark 1 is now pointing to" + root.GetChild(0).BookmarkObject);
 
// insert another bookmark that points to our website
root.InsertChild(1, "Visit our web site", "/S /URI /URI (http://www.amyuni.com)");
 
document.Save(file2, Amyuni.PDFCreator.IacFileSaveOption.acFileSaveView);
 
root.Dispose();