PDF Writing without Cached File


#1

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.


#2

On 5/24/06, The B. removed_email_address@domain.invalid 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


#3

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!