Class | PDF::Writer::Object::Destination |
In: |
lib/pdf/writer/object/destination.rb
|
Parent: | PDF::Writer::Object |
Destination object, used to specify the location for the user to jump to; presently, only on opening.
page | [RW] | |
string | [RW] |
# File lib/pdf/writer/object/destination.rb, line 14 14: def initialize(parent, page, type, *params) 15: super(parent) 16: 17: case type 18: when "FitR" 19: raise TypeError if params.size < 4 20: @string = "/#{type} #{params[0..3].join(' ')}" 21: when "XYZ" 22: params = (params + [ "null" ] * 4).first(4) 23: @string = "/#{type} #{params[0..2].join(' ')}" 24: when "FitH", "FitV", "FitBH", "FitBV" 25: raise TypeError if params.empty? 26: @string = "/#{type} #{params[0]}" 27: when "Fit", "FitB" 28: @string = "/#{type}" 29: end 30: 31: @page = page 32: end