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 218 218: def initialize(subsections = []) 219: @subsections = subsections 220: end
Appends a new subsection.
# File sources/parser/xreftable.rb, line 240 240: def <<(subsection) 241: @subsections << subsection 242: end
Returns a XRef associated with a given object.
# File sources/parser/xreftable.rb, line 248 248: def [](no) 249: @subsections.each { |s| 250: return s[no] if s.has_object?(no) 251: } 252: nil 253: end
Processes each XRefSubsection.
# File sources/parser/xreftable.rb, line 260 260: def each(&b) 261: @subsections.each(&b) 262: end
Alias for #[]
Outputs self into PDF code.
# File sources/parser/xreftable.rb, line 267 267: def to_s 268: "xref" << EOL << @subsections.join 269: end
[Validate]