I''m researching generating PDF files via RoR. I see there are packages available to do this. One such package is the PDF-Writer. The examples I saw for this package save the PDF to a file. Is there a way I can output the PDF on-the-fly to the browser rather than having a temporary PDF file? I just can''t have these files laying around since they contain sensitive information. I thought about just generating the PDF file and naming it the session ID or something that''s not easily guessable, but I''d rather just generate it in memory and dump it to the browser if possible. -- Posted via http://www.ruby-forum.com/.
On 5/24/06, The Barge <thebarge@gmail.com> wrote:> I''m researching generating PDF files via RoR. I see there are packages > available to do this. One such package is the PDF-Writer. The examples > I saw for this package save the PDF to a file. Is there a way I can > output the PDF on-the-fly to the browser rather than having a temporary > PDF file? > > I just can''t have these files laying around since they contain sensitive > information. I thought about just generating the PDF file and naming it > the session ID or something that''s not easily guessable, but I''d rather > just generate it in memory and dump it to the browser if possible.I suggest you read my article at Ruby Code & Style, "Creating Printable Documents with Ruby" (http://www.artima.com/rubycs/articles/pdf_writer.html). It addresses this. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca
> I suggest you read my article at Ruby Code & Style, "Creating > Printable Documents with Ruby" > (http://www.artima.com/rubycs/articles/pdf_writer.html). It addresses > this.Thanks, I''ll definitely give this a read tomorrow morning when I get to work! -- Posted via http://www.ruby-forum.com/.