Class: Origami::HintStream

Inherits:
Stream
  • Object
show all
Defined in:
lib/origami/linearization.rb

Constant Summary

Constants inherited from Stream

Stream::TOKENS

Constants included from StandardObject

StandardObject::DEFAULT_ATTRIBUTES

Constants included from Object

Object::TOKENS

Instance Attribute Summary collapse

Attributes inherited from Stream

#dictionary

Attributes included from Object

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

Instance Method Summary collapse

Methods inherited from Stream

#[], #[]=, add_type_info, #cast_to, #data, #data=, #decode!, #each_key, #encode!, guess_type, #initialize, #method_missing, native_type, parse, #post_build, #rawdata, #rawdata=, #set_predictor, #to_obfuscated_str, #to_s, #value

Methods included from StandardObject

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

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

Constructor Details

This class inherits a constructor from Origami::Stream

Dynamic Method Handling

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

Instance Attribute Details

#embedded_files_tableObject

Returns the value of attribute embedded_files_table.



282
283
284
# File 'lib/origami/linearization.rb', line 282

def embedded_files_table
  @embedded_files_table
end

#information_dictionary_tableObject

Returns the value of attribute information_dictionary_table.



278
279
280
# File 'lib/origami/linearization.rb', line 278

def information_dictionary_table
  @information_dictionary_table
end

#interactive_forms_tableObject

Returns the value of attribute interactive_forms_table.



277
278
279
# File 'lib/origami/linearization.rb', line 277

def interactive_forms_table
  @interactive_forms_table
end

#logical_structure_tableObject

Returns the value of attribute logical_structure_table.



279
280
281
# File 'lib/origami/linearization.rb', line 279

def logical_structure_table
  @logical_structure_table
end

#named_destinations_tableObject

Returns the value of attribute named_destinations_table.



276
277
278
# File 'lib/origami/linearization.rb', line 276

def named_destinations_table
  @named_destinations_table
end

#outlines_tableObject

Returns the value of attribute outlines_table.



274
275
276
# File 'lib/origami/linearization.rb', line 274

def outlines_table
  @outlines_table
end

#page_labels_tableObject

Returns the value of attribute page_labels_table.



280
281
282
# File 'lib/origami/linearization.rb', line 280

def page_labels_table
  @page_labels_table
end

#page_offset_tableObject

Returns the value of attribute page_offset_table.



271
272
273
# File 'lib/origami/linearization.rb', line 271

def page_offset_table
  @page_offset_table
end

#renditions_tableObject

Returns the value of attribute renditions_table.



281
282
283
# File 'lib/origami/linearization.rb', line 281

def renditions_table
  @renditions_table
end

#shared_objects_tableObject

Returns the value of attribute shared_objects_table.



272
273
274
# File 'lib/origami/linearization.rb', line 272

def shared_objects_table
  @shared_objects_table
end

#threads_tableObject

Returns the value of attribute threads_table.



275
276
277
# File 'lib/origami/linearization.rb', line 275

def threads_table
  @threads_table
end

#thumbnails_tableObject

Returns the value of attribute thumbnails_table.



273
274
275
# File 'lib/origami/linearization.rb', line 273

def thumbnails_table
  @thumbnails_table
end

Instance Method Details

#pre_buildObject



296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/origami/linearization.rb', line 296

def pre_build
  if @page_offset_table.nil?
    raise InvalidHintStreamObjectError, "No page offset hint table"
  end

  if @shared_objects_table.nil?
    raise InvalidHintStreamObjectError, "No shared objects hint table"
  end

  @data = ""
  save_table(@page_offset_table)
  save_table(@shared_objects_table,         :S)
  save_table(@thumbnails_table,             :T)
  save_table(@outlines_table,               :O)
  save_table(@threads_table,                :A)
  save_table(@named_destinations_table,     :E)
  save_table(@interactive_forms_table,      :V)
  save_table(@information_dictionary_table, :I)
  save_table(@logical_structure_table,      :C)
  save_table(@page_labels_table,            :L)
  save_table(@renditions_table,             :R)
  save_table(@embedded_files_table,         :B)
  
  super
end