Adding bookmarks automatically can be realized with Acrobat Javascript. It is possible to use Acrobat Javascript in LiveCycle Designer. You can use the Acrobat Doc object in a LiveCycle Designer form. You must adapt your code to use the following technique of assigning a variable to the target of, for example, a click event, to access the current document:
var myDoc = event.target;
Afterwards it is quite easy to add the bookmarks. Just suppose you want to add a bookmark with the name of “Management Summary” which refers to a subform with the same name. You must place the javacript code on the layout:ready event of the subform because you need the page number. You first need a reference to the bookmark Root like in the following example:
var root = myDoc.bookmarkRoot;
Now you can add a bookmark to the root through the createChild method. This method has one required and two optional parameters:
1)Name of the bookmark
2)Expression to evaluate: in this case the page number. We must subtract 1 from the page number because acrobat starts counting from 0.
3)The 0-based index into the children array
You can add the bookmark as follows:
root.createChild(”Management Summary”, “this.pageNum=” + (xfa.layout.page(this)-1),0);
If you want to add a child to the bookmark you just created, you can do it like this:
var bm = root.children[0];
bm.createChild(”Overview”, “this.pageNum=” + (xfa.layout.page(this)-1),0);
thank you so much for your guide. It works, but there is a problem. every event triggers on every object in the form, like clicking a button, hiding or making visible a subform or any other kinds, the book marks are getting doubled!! Like with every event in the form Layout:ready events are executed again which makes adding the same bookmarks again and again!!
can you please let me know if there is some way to control the situation?
Thank you