View Source

h2. Annotation Creation

The Annotation Creation example shows how the [Search API|Search Example|Search API Example] can be used to generate link annotations for search results. Each search result's text bounds are uses as the bounding box for a new link annotation. A link annotation can point to any external URL or link to other destinations in the same document.

There are two various of the annotation creation example; on that generates the annotations before the document is displayed and the other after the document is displayed. This main reason for this is to show how Annotation component are created if the document is already opened.

The source code for this example can be found at:
* [NewAnnotationPrePageLoad.java|http://anonsvn.icesoft.org/repo/icepdf/trunk/icepdf/examples/annotation/creation/src/main/java/org/icepdf/os/examples/annotation/creation/NewAnnotationPrePageLoad.java]
* [NewAnnotationPostPageLoad.java|http://anonsvn.icesoft.org/repo/icepdf/trunk/icepdf/examples/annotation/creation/src/main/java/org/icepdf/os/examples/annotation/creation/NewAnnotationPostPageLoad.java]

Information on downloading all the example can be found [here | http://www.icesoft.org/wiki/display/PDF/Building+From+Source]

A primer on using Maven or Gradle build commands can be found [here (Maven)| http://www.icesoft.org/wiki/display/PDF/Maven+Build] and [here (Gradle)| http://www.icesoft.org/wiki/display/PDF/Gradle+Build]