Class: Wizport::Pdf::XRefTbl
- Inherits:
-
Object
- Object
- Wizport::Pdf::XRefTbl
- Defined in:
- lib/wizport/document/pdf/x_ref_tbl.rb
Instance Method Summary collapse
- #add(pos, ver = '00000', used = 'n') ⇒ Object
-
#initialize(count) ⇒ XRefTbl
constructor
A new instance of XRefTbl.
- #to_s ⇒ Object
Constructor Details
#initialize(count) ⇒ XRefTbl
Returns a new instance of XRefTbl.
9 10 11 12 |
# File 'lib/wizport/document/pdf/x_ref_tbl.rb', line 9 def initialize(count) @tbl = StringIO.new @tbl << "xref\n0 #{count}\n0000000000 65535 f \n"; end |
Instance Method Details
#add(pos, ver = '00000', used = 'n') ⇒ Object
14 15 16 |
# File 'lib/wizport/document/pdf/x_ref_tbl.rb', line 14 def add(pos, ver = '00000', used = 'n') @tbl.printf "%010d #{ver} #{used} \n", pos end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/wizport/document/pdf/x_ref_tbl.rb', line 18 def to_s @tbl.string end |