Module: SpreeInvoice::WKHTMLToPDF

Defined in:
lib/spree_invoice/wkhtmltopdf.rb

Class Method Summary collapse

Class Method Details

.bin_pathObject

Raises:

  • (LoadError)


4
5
6
7
8
# File 'lib/spree_invoice/wkhtmltopdf.rb', line 4

def self.bin_path
  bin_path = `which wkhtmltopdf`
  raise LoadError, "WKHTMLtoPDF not found. Please install it first (http://code.google.com/p/wkhtmltopdf/)" if bin_path.empty?
  bin_path.gsub(/\n/, '')
end