Is Prince the best way to create PDFs in Ruby on Rails?
-
03-10-2019 - |
Question
After several Google searches, it appears that the way to create PDFs in Rails from HTML and CSS (versus a new markup language) is to use Prince.
With licensing at $3800 for my non-big-commercial app, I'm wondering if this is, in fact, consensus or people have an alternative they can share the whats and hows.
Solution
You may check out prawn too. Tutorial can be found on railscasts.com.
OTHER TIPS
This may fit the bill: http://code.google.com/p/wkhtmltopdf/
I create tons of different PDF files on the fly from various data sources using Rails, including finest layout. I create need to create them for presenting products to customers.
After having tried all the tools mentioned above, Prince is the best tool for this task.
Prince's rendering quality & CSS support (better than some browsers) is its main selling point. If you're only generating documents with simple layouts, stick with Prawn.