An annotation object, this will add an annotation to the current page. initially will support just link annotations.
# File lib/pdf/writer/object/annotation.rb, line 35 def to_s res = "\n#{@oid} 0 obj\n<< /Type /Annot" res << "\n/Subtype /Link" if TYPES.include?(@type) res << "\n/A #{@action.oid} 0 R\n/Border [0 0 0]\n/H /I\n/Rect [" @rect.each { |v| res << "%.4f " % v } res << "]\n>>\nendobj" end
# File lib/pdf/writer/object/annotation.rb, line 16 def initialize(parent, type, rect, label) super(parent) @type = type @rect = rect case @type when :link @action = PDF::Writer::Object::Action.new(parent, label) when :ilink @action = PDF::Writer::Object::Action.new(parent, label, type) end parent.current_page.add_annotation(self) end