Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pdf export in rails

I need to export an HTML page with some charts in to a PDF, what are some good gems to do this?

like image 972
ryudice Avatar asked Feb 22 '11 23:02

ryudice


2 Answers

PDFKit http://railscasts.com/episodes/220-pdfkit and Prawn http://railscasts.com/episodes/153-pdfs-with-prawn.

My choice is PDFKit.

In deal with charts it can be a problem. Recommend to use graphic charts in this case. But maybe canvas is supported.

like image 67
fl00r Avatar answered Sep 21 '22 17:09

fl00r


I use wicked_pdf to export the ouputted HTML of pages from Ruby on Rails as PDF. It works very well, and supports a ton of options.

I'm leaving this as a breadcrumb for anyone who comes across this question later...

like image 30
ebeland Avatar answered Sep 23 '22 17:09

ebeland