Class: Rpdf2txt::PdfArray

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

Instance Attribute Summary

Attributes inherited from TreeNode

#parent

Attributes inherited from PdfObject

#attributes, #decoder, #oid, #src

Instance Method Summary collapse

Methods inherited from TreeNode

#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 Method Details

#at(idx) ⇒ Object



1137
1138
1139
# File 'lib/rpdf2txt/object.rb', line 1137

def at(idx)
	@contents.at(idx)
end

#build_tree(object_catalogue, parent = nil) ⇒ Object



1133
1134
1135
1136
# File 'lib/rpdf2txt/object.rb', line 1133

def build_tree(object_catalogue, parent=nil)
	@contents=[]
	super
end

#each(&block) ⇒ Object



1140
1141
1142
# File 'lib/rpdf2txt/object.rb', line 1140

def each(&block)
	@contents.each(&block)
end

#parse_attributesObject



1143
1144
1145
1146
1147
1148
# File 'lib/rpdf2txt/object.rb', line 1143

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

#root?Boolean

Returns:

  • (Boolean)


1149
1150
1151
# File 'lib/rpdf2txt/object.rb', line 1149

def root?
	false
end