Method: Prawn::Document::Annotations#link_annotation
- Defined in:
- lib/prawn/document/annotations.rb
#link_annotation(rect, options = {}) ⇒ Object
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).
46 47 48 49 |
# File 'lib/prawn/document/annotations.rb', line 46 def link_annotation(rect, ={}) = .merge(:Subtype => :Link, :Rect => rect) annotate() end |