How do I add annotations to graphs in PDF documents?
Estimated Reading Time: 1 MinutesIf you would like to make it possible for a user to display additional information about a graph by clicking on that graph of scrolling over it, use the Additional Actions dictionary. This dictionary describes what should happen when an action occurs in the range of a particular annotation. For example, the Additional Action might define that, when a user moves a mouse pointer over the top of an annotation on a PDF page, the annotation changes color to show that it can be selected with a click of the mouse button.
See Section 12.5.2, “Annotation Dictionaries,” in the ISO 32000 Reference, 1.7, page 382, and section 12.6.2, “Action Dictionaries,” on page 414. Find this document on the web store of the International Standards Organization (ISO).
To display additional information, you most likely want to either include a Hide Action that appears only when pointed to, or a JavaScript Action that creates and displays information only when activated.
See Section 12.6.4.10, “Hide Actions,” in the ISO 32000 Reference, page 426, and section 12.6.4.16, “JavaScript Actions,” on page 430.
Adobe PDF Library can’t create these as high-level constructs. You will need to read about the dictionaries and objects required, and create them at the COS level. They can then be added to pages created with the Library or to pages read in from an existing document.