gem install pdfkit sudo apt-get install wkhtmltopdf which wkhtmltopdf cp /usr/local/rvm/gems/ruby-2.0.0-p0/bin/wkhtmltopdf /usr/bin/ chmod a+x /usr/bin/wkhtmltopdf
You could test this in IRB:
require 'pdfkit' kit_obj = PDFKit.new("<html><body>Testing</body></html>", :page_size=>'Letter') pdf_obj = kit_obj.to_pdf pdf_file = kit_obj.to_file('/tmp/testing.pdf')
Recent Comments