Class: Prawn::Blank::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/prawn/blank/field.rb

Direct Known Subclasses

TextField

Constant Summary collapse

FF_FLAGS =

see pdf reference for documentation

{
  :readonly => 1,
  :required => 2,
  :no_export => 3,
  
  # for text fields
  :multiline => 13,
  :password => 14,
  
  # for buttons
  :no_toggle_to_off => 15
}

Instance Method Summary collapse

Constructor Details

#initialize(document, *args) ⇒ Field

Returns a new instance of Field.



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/prawn/blank/field.rb', line 17

def initialize(document,*args)
  @document=document
  options = (args.last.kind_of?(Hash) ? args.pop : {})
  Prawn.verify_options self.class.get_possible_options, options
  puts self.methods.sort.inspect
  options = default_options.merge(options)
  options.each do |k,v|
    self.send "#{k.to_s}=".to_sym,v
  end
  puts options.inspect
  #@options=options
end

Instance Method Details

#to_hObject



31
32
33
# File 'lib/prawn/blank/field.rb', line 31

def to_h
  get_dict
end