The State of Building PDF Documents in Ruby
If you've ever generated PDFs in Ruby before, you know that it can be both tedious and difficult using the standard go-to PDF libraries out there. Let's face it, we're web developers. Coming from HTML+CSS-based layouts, writing Ruby code for that stuff is a major pain.
In Rethinking PDF Creation in Ruby, Jared takes a playful swipe at Gregory Brown's much loved Prawn PDF generation library. He expresses a preference for converting HTML and CSS documents to PDF, rather than using the more PDF-level conventions Prawn adopts. To do this, he and some colleagues built PDFKit, a Ruby HTML-to-PDF library powered by wkhtmltopdf.
Given the "Prawn is a bit meh" tone of Jared's article, though, Gregory Brown is not impressed and points out that Prawn gives you stronger and more precise under-the-hood control, useful particularly for building complex forms, tables and doing point-perfect positioning of on-page elements. Nonetheless, if a HTML driven approach feels better to you and would give "good enough" results, PDFKit is worth a try and the results look OK. I think there's room for more than one approach, depending on what you want to achieve.
In rebutting PDFKit, Greg suggests RGhost - Ruby GhostScript as another Ruby PDF generator alternative. RGhost is more similar to Prawn than PDFKit, but has some interesting features, such as being able to easily render documents into formats other than PDF (such as PostScript, PNG, TIFF, and JPEG).
Update: Some readers note that PDFKit seems rather similar to wicked_pdf, a similar library that has been around for about a year now.