------_=_NextPart_001_01C78C00.E2607E4C
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Below is code I presently use to download to clients and the generated
html. One client objects to the generated html - the
"Content-Disposition" ... Does any one have another method to download
AND display the pdf with perl.
sub Display_PDF {
my ($pdf, $pdf_size) =3D @[EMAIL PROTECTED]
$|=3D0;
print $q->header(-type=3D>'application/pdf',
-attachment=3D>'Requested_Re****t.pdf',
-Content_length=3D>$pdf_size,
-expires=3D>'+1d',
-status=3D>'200 OK');
open RE****T, $pdf;
while (read RE****T, my $buff, 5000) {
print $buff
}
}
Generates:
Status: 200 OK
Expires: Wed, 02 May 2007 14:53:53 GMT
Date: Tue, 01 May 2007 14:53:53 GMT
Content-Disposition: attachment; filename=3D"Requested_Re****t.pdf"
content-length: 92455
Content-Type: application/pdf
John W Moon
------_=_NextPart_001_01C78C00.E2607E4C--


|