Can I stream to disk?

Graham TerMarsch <graham-A8NDs6OoA5Z19/[email protected]> Wed, 14 Nov 2007 15:17:51 -0800
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Organization Howling Frog
Message-ID <[email protected]>
Haven't (yet) found a way to do this, so I thought I'd ping the list...

One of the apps I work with uses PDF::API2 to generate PDF files, and we've 
found one use case where I could be generating a PDF file with several 
hundred pages of images/graphs/charts.

To try to help cope with memory issues I wanted to find out if there was any 
way that I could "stream" the PDF to disk, instead of just generating the 
whole thing in memory and then spitting it out at the very end.

Ideally, I'd like it to work by opening an existing PDF file (the preamble) 
and then as I generate/add new pages to that PDF file I could ship them out 
to disk and then reclaim the memory that they used.

Suggestions?

-- 
Graham TerMarsch