Class: PaperlessOCR::DevonThinkPro

Inherits:
Object
  • Object
show all
Defined in:
lib/paperless/ocr_engines/devonthinkpro.rb

Instance Method Summary collapse

Constructor Details

#initializeDevonThinkPro

Returns a new instance of DevonThinkPro.



10
11
12
13
14
# File 'lib/paperless/ocr_engines/devonthinkpro.rb', line 10

def initialize
    @engine = PaperlessOCR::DEVONTHINKPRO
    @app    = app(@engine)
    @app.activate
end

Instance Method Details

#ocr(options) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/paperless/ocr_engines/devonthinkpro.rb', line 16

def ocr(options)
  begin
    app("System Events").processes[@engine].visible.set(false)
    @app.ocr(:file => options[:file])
  rescue 
    puts "WARNING: There was an error OCRing the document with #{@engine}: #{$!}"
  end
end