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_signature, #cast_to, #data, #data=, #decode!, #each_filter, #each_key, #encode!, #encoded_data, #encoded_data=, #filters, guess_type, #initialize, #key?, parse, #post_build, #set_predictor, #to_obfuscated_str, #to_s, #value

Methods included from FieldAccessor

#method_missing, #respond_to_missing?

Methods included from StandardObject

included, #version_required

Methods included from Object

#<=>, #cast_to, #copy, #document, #export, included, #indirect?, #indirect_parent, #initialize, #logicalize, #logicalize!, #native_type, parse, #post_build, #reference, #set_document, #set_indirect, skip_until_next_obj, #solve, #to_o, #to_s, #type, typeof, #version_required, #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::FieldAccessor

Instance Attribute Details

#embedded_files_tableObject

Returns the value of attribute embedded_files_table


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

def embedded_files_table
  @embedded_files_table
end

#information_dictionary_tableObject

Returns the value of attribute information_dictionary_table


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

def information_dictionary_table
  @information_dictionary_table
end

#interactive_forms_tableObject

Returns the value of attribute interactive_forms_table


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

def interactive_forms_table
  @interactive_forms_table
end

#logical_structure_tableObject

Returns the value of attribute logical_structure_table


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

def logical_structure_table
  @logical_structure_table
end

#named_destinations_tableObject

Returns the value of attribute named_destinations_table


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

def named_destinations_table
  @named_destinations_table
end

#outlines_tableObject

Returns the value of attribute outlines_table


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

def outlines_table
  @outlines_table
end

#page_labels_tableObject

Returns the value of attribute page_labels_table


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

def page_labels_table
  @page_labels_table
end

#page_offset_tableObject

Returns the value of attribute page_offset_table


269
270
271
# File 'lib/origami/linearization.rb', line 269

def page_offset_table
  @page_offset_table
end

#renditions_tableObject

Returns the value of attribute renditions_table


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

def renditions_table
  @renditions_table
end

#shared_objects_tableObject

Returns the value of attribute shared_objects_table


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

def shared_objects_table
  @shared_objects_table
end

#threads_tableObject

Returns the value of attribute threads_table


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

def threads_table
  @threads_table
end

#thumbnails_tableObject

Returns the value of attribute thumbnails_table


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

def thumbnails_table
  @thumbnails_table
end

Instance Method Details

#pre_buildObject


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

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