Parent

Methods

Files

PDF::Writer::TagIlink

A callback for creating and managing links internal to the document.

Public Class Methods

[](pdf, info) click to toggle source
# File lib/pdf/writer.rb, line 2549
def self.[](pdf, info)
  case info[:status]
  when :start, :start_line
    @links ||= {}
    @links[info[:cbid]] = {
      :x         => info[:x],
      :y         => info[:y],
      :angle     => info[:angle],
      :descender => info[:descender],
      :height    => info[:height],
      :uri       => info[:params]["dest"]
    }
  when :end, :end_line
      # The end of the link. Assume that it is the most recent opening
      # which has closed.
    start = @links[info[:cbid]]
    pdf.add_internal_link(start[:uri], start[:x],
                          start[:y] + start[:descender], info[:x],
                          start[:y] + start[:descender] +
                          start[:height])
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.