Slick printing from Rails apps

23 views
Skip to first unread message

Jason Maas

unread,
Jan 15, 2009, 9:32:07 AM1/15/09
to state-col...@googlegroups.com
Hi all,

Fun meeting last night, thanks! Somehow I missed the discussion on
Meetup leading up to the meeting. I'll post here and see if this works
better:

Scott - yes, I have a decent Rails development environment - latest
Ubuntu with Rails v2.2.2 installed as explained in Agile Web Development
w/Rails 3rd Ed. I've got the GNOME editor gedit configured to be fairly
TextMate-ish, with a dark theme and syntax highlighting and the Snippets
plugin to fill out some basic text on me. There's also a file browser
on the left and mini terminal consoles at the bottom. And it's fairly
usable on my 1024x600 netbook screen!

Scott & Clint - I'd love to hear about PDF generation! What I'd really
like is to know how to make nice printouts from web apps and
traditionally generating a PDF is the way to go. But lately I've seen
some snazzy stuff using just HTML + CSS. For example, DonorTools.com
claims that every part of the interface is cleanly printable and
therefor a "report". It's an intriguing idea and it seems to work
pretty well too. So if it would be easier/better to do pretty printing
w/o PDFs that's fine with me too. Although one benefit PDFs have is
that they can be passed around electronically. So yeah, I guess I would
like to learn about generating PDFs. :) I've used ReportLab a bit from
Python in the past, so I have some experience in that area, just not
from Ruby and not from a web app.

OK, sorry that this got so long. I hope to see you all next month!

Jason

Scott Woods

unread,
Jan 15, 2009, 11:47:42 AM1/15/09
to state-col...@googlegroups.com

Hey Jason,

Yeah, that was a fun meeting. Clint's Shoes demo was awesome!

Glad you have everything up and running on the netbook. I was going to
suggest that if you were having any trouble at all, the easiest way to
try things out is to open up Firefox and sign up for a free account on http://herokugarden.com
. It's instant online editing and hosting for rails applications. I
have a couple friends who have used it extensively and have loved it.

It's also worth checking out the following blog post, which explains
how to set up the ThoughtBot "suspenders" template on heroku, which
gives you even more of a jump start over the default rails
installation (it includes some common useful plugins and code):

http://giantrobots.thoughtbot.com/2009/1/12/heroku-wearing-suspenders

For PDF generation, it looks like "Prawn" is the way to go. Here's the
home page:

http://prawn.majesticseacreature.com/

And the google group:

http://groups.google.com/group/prawn-ruby

Like you said, I think it's usually more elegant if you can customize
your print CSS to create a page that works well both on the screen and
in print, but sometimes there are situations where you want more fine-
grained control of layout on the printed page. That's probably where
the PDF generation really comes into its own.

Scott

Scott Woods

unread,
Jan 15, 2009, 11:52:15 AM1/15/09
to state-col...@googlegroups.com

Looks like the original http://heroku.com URL may work better than
herokugarden.com for now (they'll eventually move the free hosting
over to the latter URL).

For everyone: If they're still putting people on a waiting list when
you sign up for an account, drop me a line, and I'll send you an
invite so you can get right in.

Scott
Reply all
Reply to author
Forward
0 new messages