Module: Documentalist::PdfTools

Includes:
Dependencies
Defined in:
lib/backends/pdf_tools.rb

Class Method Summary collapse

Methods included from Dependencies

included

Class Method Details

.convert(origin, options) ⇒ Object



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

def self.convert(origin, options)
  if system("pdftotext #{origin} #{options[:destination]} > /dev/null 2>&1")
    options[:destination]
  else
    raise Documentalist::Error.new("PdfTools failed")
  end
end