Module Prawn::Document::Annotations
In: lib/prawn/document/annotations.rb

Provides very low-level support for annotations. These extensions are mainly for use by prawn-format, so be sure to check that out if all you need is basic internal or external links.

Methods

Public Instance methods

Adds a new annotation (section 8.4 in PDF spec) to the current page. options must be a Hash describing the annotation.

A convenience method for creating Link annotations. rect must be an array of four numbers, describing the bounds of the annotation. The options hash should include either :Dest (describing the target destination, usually as a string that has been recorded in the document’s Dests tree), or :A (describing an action to perform on clicking the link), or :PA (for describing a URL to link to).

A convenience method for creating Text annotations. rect must be an array of four numbers, describing the bounds of the annotation. contents should be a string, to be shown when the annotation is activated.

[Validate]