Object
Creates a new Trailer.
startxref |
The file offset to the XRef::Section. |
dictionary |
A hash of attributes to set in the Trailer Dictionary. |
# File lib/origami/trailer.rb, line 121 def initialize(startxref = 0, dictionary = {}) @startxref, self.dictionary = startxref, dictionary && Dictionary.new(dictionary) end
# File lib/origami/trailer.rb, line 147 def [](key) @dictionary[key] if has_dictionary? end
# File lib/origami/trailer.rb, line 151 def []=(key,val) @dictionary[key] = val end
# File lib/origami/trailer.rb, line 155 def dictionary=(dict) dict.parent = self if dict @dictionary = dict end
# File lib/origami/trailer.rb, line 160 def has_dictionary? not @dictionary.nil? end
# File lib/origami/obfuscation.rb, line 220 def to_obfuscated_str content = "" if self.has_dictionary? content << TOKENS.first << EOL << @dictionary.to_obfuscated_str << EOL end content << XREF_TOKEN << EOL << @startxref.to_s << EOL << TOKENS.last << EOL content end
Outputs self into PDF code.
# File lib/origami/trailer.rb, line 167 def to_s content = "" if self.has_dictionary? content << TOKENS.first << EOL << @dictionary.to_s << EOL end content << XREF_TOKEN << EOL << @startxref.to_s << EOL << TOKENS.last << EOL content end
Generated with the Darkfish Rdoc Generator 2.