Eric Andreychek wrote:

On Wed, 10 Sep 2003, Steve Comrie wrote:


You should be able to use the argument of 'none' to the CGIApp header_type()
method.
-------------------
my $filename= 'the_pdf_file.pdf";
my $output = get_pdf_contents();
my $header= "Content-Type: application/octetstream\n";
    $header .= "Content-Disposition: attachment; filename=$filename\n\n";

$self->header_type('none');
return $header.$output;



Agreed, but that only surpresses the headers. You still have to read in the entire PDF at once, and then pass it around as a reference.

I think what Steve C was suggesting (correct me if I'm wrong) was for the run-mode to output the headers and the PDF file itself (which it can do in small chunks at a time, instead of all in one go like the example above does), and then set the header type to "none" and return a null string.

Then, C::A's run() method has been instructed to not output headers, and has no content body to output either -- the run-mode has already done it all!

This is the answer I've been looking for. Thanks, guys!

- Steve


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to