From: Kouhei Sutou Date: 2006-11-16T11:28:48+09:00 Subject: Re: Rails view as PDF... suggestions? Hi, 2006/11/16, J. B. Rainsberger : > I am about to do some research tomorrow, but if any of you has an > obvious answer, then that would help. I am looking to build PDFs from > Rails views, and I'd like some guidance on how to go about it. > I want to put placeholders, both text and images, onto a template and > end up with a PDF. I'm pretty open about how that all happens, so feel > free to make wild suggestions. The only important constraint I can think > of is that layout (meaning spacing) matters, so relying on a browser > rendering HTML is probably not an option. The template will be a kind of > background on which the placeholders will be laid out, and I imagine > it's the template that will be the tricky part. My suggestion is the following: 1. make a SVG for template with Illustrator, Inkscape and so on 2. substitute placeholders in the SVG by ERB, Amrita and so on 3. generate PDF from the substituted SVG. (See [ruby-talk:225127]) # You can't use PDF::Writer for this suggestion. Thanks, -- kou