Forum: Ruby on Rails PDF Writing without Cached File

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
The B. (Guest)
on 2006-05-25 00:56
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.
Austin Z. (Guest)
on 2006-05-25 01:04
(Received via mailing list)
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
The B. (Guest)
on 2006-05-25 02:12
> 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!
This topic is locked and can not be replied to.