Class: Rpdf2txt::PdfHash

Inherits:
TreeNode show all
Defined in:
lib/rpdf2txt/object.rb

Instance Attribute Summary collapse

Attributes inherited from TreeNode

#parent

Attributes inherited from PdfObject

#attributes, #decoder, #oid, #src

Instance Method Summary collapse

Methods inherited from TreeNode

#each, #extract_oids

Methods inherited from PdfObject

#_parse_attributes, #catalogue_object, #decoded_stream, #extract_attribute_stream, #initialize, #revision_id

Constructor Details

This class inherits a constructor from Rpdf2txt::PdfObject

Instance Attribute Details

#contentsObject (readonly)

Returns the value of attribute contents.



1154
1155
1156
# File 'lib/rpdf2txt/object.rb', line 1154

def contents
  @contents
end

Instance Method Details

#build_tree(object_catalogue, parent = nil) ⇒ Object



1155
1156
1157
1158
# File 'lib/rpdf2txt/object.rb', line 1155

def build_tree(object_catalogue, parent=nil)
	@contents={}
	super
end

#parse_attributesObject



1159
1160
1161
1162
1163
1164
# File 'lib/rpdf2txt/object.rb', line 1159

def parse_attributes
	src = @src[@src.index('<<')..@src.rindex('>')]
	ast = _parse_attributes(src)
	ast.compact!
	@contents = extract_attributes(ast)
end

#root?Boolean

Returns:

  • (Boolean)


1165
1166
1167
# File 'lib/rpdf2txt/object.rb', line 1165

def root?
	false
end