Method: RTesseract::Pdf.run

Defined in:
lib/rtesseract/pdf.rb

.run(source, errors, options) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/rtesseract/pdf.rb', line 7

def self.run(source, errors, options)
  options = options.merge({ tessedit_create_pdf: 1 })

  RTesseract::Command.new(source, temp_file_path, errors, options).run do |output_path|
    File.open("#{output_path}.pdf", 'r')
  end
end