Class: Origami::Annotation::Text

Inherits:
Origami::Annotation show all
Includes:
Markup
Defined in:
lib/origami/annotations.rb

Overview

Text annotation

Defined Under Namespace

Modules: TextName

Constant Summary

Constants included from StandardObject

StandardObject::DEFAULT_ATTRIBUTES

Constants inherited from Dictionary

Dictionary::TOKENS

Constants included from Object

Object::TOKENS

Instance Attribute Summary

Attributes inherited from Dictionary

#names_cache, #strings_cache, #xref_cache

Attributes included from Object

#file_offset, #generation, #no, #objstm_offset, #parent

Instance Method Summary collapse

Methods included from Markup

included

Methods inherited from Origami::Annotation

#set_down_appearance, #set_normal_appearance, #set_rollover_appearance

Methods included from StandardObject

#do_type_check, #has_field?, included, #pdf_version_required, #set_default_value, #set_default_values

Methods inherited from Dictionary

#[], #[]=, add_type_info, #cast_to, #copy, #delete, guess_type, #has_key?, hint_type, #initialize, #map!, #merge, #method_missing, native_type, parse, #to_obfuscated_str, #to_s

Methods included from Object

#<=>, #cast_to, #copy, #export, #indirect_parent, #initialize, #is_indirect?, #logicalize, #logicalize!, #native_type, native_type, parse, #pdf, #pdf_version_required, #post_build, #reference, #resolve_all_references, #set_indirect, #set_pdf, #size, skip_until_next_obj, #solve, #to_o, #to_s, #type, typeof, #xrefs

Methods inherited from Hash

#to_o

Constructor Details

This class inherits a constructor from Origami::Dictionary

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Origami::Dictionary

Instance Method Details

#pre_buildObject



301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/origami/annotations.rb', line 301

def pre_build
   
  model = self.StateModel
  state = self.State
  
  case model
  when "Marked"
    state = "Unmarked" if state.nil?
  when "Review"
    state = "None" if state.nil?
  end

  super
end