I found it, the problem was I was sending 2 headers the first one was
text/plain, once I deleted that header it worked fine, thanks for all
the help

 

-----Original Message-----
From: Mike Crowl [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 17, 2007 12:34 PM
To: Ben Eagle; [EMAIL PROTECTED]
Cc: [email protected]
Subject: RE: [Perl-unix-users] Streaming a PDF to the browser

 

Sounds like the browser is not recognizing the mime-type you are sending
it, probably not a pdf problem but might be a problem with this:

 

print $q->header( "application/pdf" );

 

Usually when the browser can't figure out what type it is getting it
will fall back on text-dump mode and you'll get the file dumped as text
to the screen.  Is the PDF plugin set up right?  (I hate to ask that but
it seems the browser doesn't have something to handle the mime-type it
is getting.)

 

This sounds almost like it should be an application/octet-stream because
you are not actually feeding the browser a filename.pdf, you are feeding
it a binary stream.

 

Hit google with:  pdf stream mime type

 

A lot to sift through, but hopefully some helpful breadcrumbs out there.

 

 -Mike

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ben
Eagle
Sent: Wednesday, January 17, 2007 10:01 AM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: [Perl-unix-users] Streaming a PDF to the browser

 

Using PDF::API2, I am trying to build a pdf straight to the browser
without having to save it to the server.

 

I am using:

 

print $q->header( "application/pdf" );

 

print $pdf->stringify;

$pdf->end;

 

 

but its not working all I get is garble its not opening the pdf just
spitting the encoded text to the screen

 

can anyone give me any Ideas on how to fix this???

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to