lib/h2p.rb in h2p-0.1 vs lib/h2p.rb in h2p-0.2
- old
+ new
@@ -14,10 +14,9 @@
end
def self.convert(html)
html_path = tmp_path(:html)
pdf_path = tmp_path(:pdf)
- p [html_path, pdf_path]
File.open(html_path, 'w+') { |f| f << html }
system('wkhtmltopdf', '-q', html_path, pdf_path)
IO.read(pdf_path)
ensure
FileUtils.rm(html_path) rescue nil
\ No newline at end of file