Class: EideticPDF::PdfObjects::PdfAnnot

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

Instance Attribute Summary

Attributes inherited from IndirectObject

#gen, #seq

Instance Method Summary collapse

Methods inherited from PdfDictionaryObject

#body, #dictionary

Methods inherited from IndirectObject

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

Constructor Details

#initialize(seq, gen, sub_type, rect) ⇒ PdfAnnot

Returns a new instance of PdfAnnot.



576
577
578
579
580
581
# File 'lib/epdfo.rb', line 576

def initialize(seq, gen, sub_type, rect)
  super(seq, gen)
  dictionary['Type'] = PdfName.new('Annot')
  dictionary['Subtype'] = PdfName.new(sub_type)
  dictionary['Rect'] = rect
end

Instance Method Details

#appearance_dictionary=(appearance) ⇒ Object



611
612
613
# File 'lib/epdfo.rb', line 611

def appearance_dictionary=(appearance)
  dictionary['AP'] = PdfDictionary.new(appearance)
end

#appearance_state=(state) ⇒ Object



615
616
617
# File 'lib/epdfo.rb', line 615

def appearance_state=(state)
  dictionary['AS'] = PdfName.new(state)
end

#border=(border) ⇒ Object



583
584
585
# File 'lib/epdfo.rb', line 583

def border=(border)
  dictionary['Border'] = PdfInteger.ary(border)
end

#border_style=(border_style) ⇒ Object



607
608
609
# File 'lib/epdfo.rb', line 607

def border_style=(border_style)
  dictionary['BS'] = PdfDictionary.new(border_style)
end

#color=(color) ⇒ Object



587
588
589
# File 'lib/epdfo.rb', line 587

def color=(color)
  dictionary['C'] = PdfReal.ary(color)
end

#flags=(flags) ⇒ Object



599
600
601
# File 'lib/epdfo.rb', line 599

def flags=(flags)
  dictionary['F'] = PdfInteger.new(flags)
end

#highlight=(highlight) ⇒ Object



603
604
605
# File 'lib/epdfo.rb', line 603

def highlight=(highlight)
  dictionary['H'] = PdfName.new(highlights[highlight] || highlight)
end

#mod_date=(mod_date) ⇒ Object



595
596
597
# File 'lib/epdfo.rb', line 595

def mod_date=(mod_date)
  dictionary['M'] = PdfString.new(mod_date.strftime("%Y%m%d%H%M%S"))
end

#title=(title) ⇒ Object



591
592
593
# File 'lib/epdfo.rb', line 591

def title=(title)
  dictionary['T'] = PdfString.new(title)
end