Class representing a Cross-reference table. A section contains a set of XRefSubsection.
Creates a new XRef section.
[Source]
# File sources/parser/xreftable.rb, line 176 176: def initialize(subsections = []) 177: @subsections = subsections 178: end
Appends a new subsection.
# File sources/parser/xreftable.rb, line 198 198: def <<(subsection) 199: @subsections << subsection 200: end
Returns a XRef associated with a given object.
# File sources/parser/xreftable.rb, line 206 206: def [](no) 207: @subsections.each { |s| 208: return s[no] if s.has_object?(no) 209: } 210: nil 211: end
Processes each XRefSubsection.
# File sources/parser/xreftable.rb, line 218 218: def each(&b) 219: @subsections.each(&b) 220: end
Alias for #[]
Outputs self into PDF code.
# File sources/parser/xreftable.rb, line 225 225: def to_s 226: "xref" << EOL << @subsections.join 227: end
[Validate]