Class: PDFBeads::PDFBuilder::Dict

Inherits:
Hash
  • Object
show all
Defined in:
lib/pdfbeads/pdfdoc.rb

Overview

PDFBeads – convert scanned images to a single PDF file Version 1.0

Unlike other PDF creation tools, this utility attempts to implement the approach typically used for DjVu books. Its key feature is separating scanned text (typically black, but indexed images with a small number of colors are also accepted) from halftone images placed into a background layer.

Copyright © 2010 Alexey Kryukov ([email protected]). All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Instance Method Summary collapse

Constructor Details

#initialize(pairs = {}) ⇒ Dict

Returns a new instance of Dict.



35
36
37
38
# File 'lib/pdfbeads/pdfdoc.rb', line 35

def initialize(pairs = {})
  update( pairs )
  super
end

Instance Method Details

#to_sObject



40
41
42
43
44
45
# File 'lib/pdfbeads/pdfdoc.rb', line 40

def to_s()
  s = "<<\n"
  each_pair{ |key, value| s << "/#{key} #{value}\n" }
  s << ">>\n"
  s
end