Very nice. I have to mention that PDFKit is also used to generate pdf files from html strings as follows:
html = "< h1>pla pla pla< /h1>"
kit = PDFKit.new(html, :page_size => 'Letter')
pdf = kit.to_pdf
file = kit.to_file("path/to/pdf/with/pdf_name.pdf")
Note: this might throw an error of missing wkhtmltopdf even when you unstall wkhtmltopdf, and I found out that you still need to install ghostscript to you computer (mine is Mac 10.7.4).
Very nice. I have to mention that PDFKit is also used to generate pdf files from html strings as follows:
html = "< h1>pla pla pla< /h1>"
kit = PDFKit.new(html, :page_size => 'Letter')
pdf = kit.to_pdf
file = kit.to_file("path/to/pdf/with/pdf_name.pdf")
Note: this might throw an error of missing wkhtmltopdf even when you unstall wkhtmltopdf, and I found out that you still need to install ghostscript to you computer (mine is Mac 10.7.4).