3 ms·
Without Prawn I probably wouldn't have been able to do the web version of my software in an acceptable amount of time. It is amazing software -- far superior t
by patio11 17y ago
Without Prawn I probably wouldn't have been able to do the web version of my software in an acceptable amount of time. It is amazing software -- far superior to every other way I have found to render PDFs, and I come from Enterprise Java where that is practically a religious calling.
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.
- sandal 17y agoI think that our users might appreciate a magick-prawn extension that allows Prawn::Document#to_svg (or other formats). And also, thanks for donating!
- patio11 17y agoI'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!?"
- sandal 17y agoYeah, I guess it's easy enough to do on your own if you have RMagick handy. Good point.
- patio11 17y agoRMagick 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.)
- sandal 17y agoAh, interesting. Yeah, I'm certainly aware of RMagick's memory issues, fortunately, haven't had a need for it.
- bradediger 17y agoI 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.