Skip to main content
ariea17443097
Participant
July 23, 2018
Question

automated stamp/text

  • July 23, 2018
  • 1 reply
  • 794 views

Hi i need help on how to run a java script that puts a stamp/text on the first page of every bookmark. does anyone know how to do this?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
July 23, 2018

If the bookmarks tree only has one level you can easily traverse it from the root, executing each bookmark (using the exec method of the Bookmark object) and then adding the stamp to the current page.

If the tree has branches, though, you would need to write a recursive function to traverse the entire tree.

You add a stamp using the addAnnot method of the Document object.

ariea17443097
Participant
July 23, 2018

can you please show me how that code would look? I don't really know how to do that. Thanks

ariea17443097
Participant
July 23, 2018

(The bookmark tree only has one level)