Class: EideticPDF::PdfObjects::PdfLinkAnnot

Inherits:
PdfAnnot show all
Defined in:
lib/epdfo.rb

Instance Attribute Summary

Attributes inherited from IndirectObject

#gen, #seq

Instance Method Summary collapse

Methods inherited from PdfAnnot

#appearance_dictionary=, #appearance_state=, #border=, #border_style=, #color=, #flags=, #highlight=, #mod_date=, #title=

Methods inherited from PdfDictionaryObject

#body, #dictionary

Methods inherited from IndirectObject

#body, #footer, #header, #reference_object, #reference_string, #to_s

Constructor Details

#initialize(seq, gen, rect) ⇒ PdfLinkAnnot

Returns a new instance of PdfLinkAnnot.



642
643
644
# File 'lib/epdfo.rb', line 642

def initialize(seq, gen, rect)
  super(seq, gen, 'Link', rect)
end

Instance Method Details

#action=(action) ⇒ Object



657
658
659
# File 'lib/epdfo.rb', line 657

def action=(action)
  dictionary['A'] = action.is_a?(Hash) ? PdfDictionary.new(action) : action
end

#dest=(dest) ⇒ Object



646
647
648
649
650
651
652
653
654
655
# File 'lib/epdfo.rb', line 646

def dest=(dest)
  value = if dist.is_a?(String)
    PdfName.new(dest)
  elsif dist.is_a?(Array)
    PdfArray.new(dest)
  else
    dest
  end
  dictionary['Dest'] = value
end