I think that our users might appreciate a magick-prawn extension that allows Prawn::Document#to_svg (or other formats).
And also, thanks for donating!
I'd be happy to make you one, but it is literally one line of code after you generate the PDF. I think my commit message for that feature was "PDF -> GIF. I get paid for this!?"
Re:PDFs in Pure Ruby
by bradediger on Thursday January 21, 2010 @11:51PM
(#1069145)
I did a similar thing, actually, to render a successive series of Prawn documents (2-d scenes) into a Quicktime movie. Prawn -> series of pngs -> ffmpeg -> mov. It was a quick-and-dirty hack, but I was surprised by the simplicity.
Yeah, I guess it's easy enough to do on your own if you have RMagick handy. Good point.
RMagick leaks memory like a sieve. I do this in a pair of worker threads that just fire off system calls to the GraphicsMagick command. (Hat tip to HN: I learned about it here and saved 50% on conversion time versus doing it with ImageMagick.)
Incidentally, although this use is quite off-label: Prawn exposes a very nice API for drawing arbitrary geometrical objects. ImageMagick/GraphicsMagick can convert PDF files to image files in your favorite format. This means you can use prawn to draw, e.g., an org chart for about a fiftieth of the pain it would take to draw it using graphics primitives in ImageMagick or what have you.
That reminds me -- I tried to throw money at the developers and they requested I send it to Heifer International. Somebody is getting a cow because I didn't have one writing my print jobs.