Episode 70: PDF generation in Rails
Archived screencast notes on making PDFs with Ruby on Rails and HTMLDoc.
From the archive
This page is part of the early RubyPlus screencast archive. It is kept for reference by the Collage community.
The episode shows an extremely simple way to generate a PDF in a Ruby on Rails application using HTMLDoc. The approach turns an HTML view into a document that can be downloaded or attached to an email.
What the episode covers
- Preparing an HTML template for the document
- Calling a command line tool from a Rails application
- Returning the generated file to the browser
- Keeping the view and the document in sync