Skip to content

PDF Hyperlink (Text and Rectangle)

shairontoledo edited this page Sep 13, 2010 · 2 revisions

Creates a http hyperlink. It uses as base the class RGhost::TextIn.

A like using the current row

 doc.text_link "Click here",:url => "http://mysite", :tag => :link, :color => :blue

Absolute Position


 doc.text_link "Click here", :x=> 2, :y=> 4, :url => "http://mysite"

Example

Defining a clickable rectangle with that simple code


  doc.rectangle_link :url=> "http://www.hashcode.eti.br",
                   :width => 10, :height => 5,
                   :x  => 5,:y => 22,
                   :color => :blue