views:

1707

answers:

3

Is anyone using Prawn / Prawnto with Jruby on rails? I installed prawn 0.5.01 and rails 2.3.2. I just installed prawn and prawnto and started playing with the PDF generation capabilities. I am concerned that the pranwto web site is no longer online - http://www.cracklabs.com/prawnto Is this rails plugin dead? Or has it moved somewhere? Based on other posts http://stackoverflow.com/questions/433136/generate-pdf-from-rails these seem like the PDF gen tools of choice for Ruby and (J)Ruby on Rails. Can someone with experience with PDF gen in RoR confirm that this is still the way to go?

(Note: I'm using Jruby on Rails, so if there is a better option or something in Java that I should be exploring further let me know... I googled Flying Saucer Project from this post, which seemed interesting... thoughts on this project?)

A: 

Looks like Prawn has been moved to GitHub. You should be able to download the source there.

http://github.com/sandal/prawn/tree/master

Also - as of 10/08/2009, the latest changes to the library appear to have been on July 19, 2009. So it seems the library is alive.

seanyboy
+2  A: 

The prawnto plugin is is up and alive on Github, albeit without much documentation.

I have built several Rails apps that put PDF generation front and center, and I can definitely attest that Prawn/Prawnto is the way to go. The DSL provided by Prawn is really elegant and pleasant to work with, and even though the library isn't as feature-packed as others, it handles most of what you will need out of the box without any pain at all.

I saw Gregory Brown (author of the Prawn library) give a talk about Ruby implementations, and he's a user of JRuby. I'd be surprised if you find any problems there, though I haven't personally used Prawn with JRuby.

The Prawn Google Group is relatively active and helpful, so you might want to check it out as well.

It also appears that the Prawn website is still available as well.

Bryan Woods
+2  A: 

We tried all of those solutions (prawn/prawnto, Prince, Ruport, and I think even PDF-writer) before running into the "Wicked PDF" Rails plugin and wkhtmltopdf.

It's been a LIFE SAVER!

The plugin and utility combination use Webkit to generate PDF documents from your views. So you can reuse all your HTML, erb, haml, css and sass to create great looking PDFs without rewriting almost anything.

The utility (wkhtmltopdf) is Open Source and is available in source packages as well as binary packages for Linux, Windows and Mac. Of course, our sorry butts have to run Solaris, so I've been trying to compile the thing for a month now...arg. :-)

btelles