Hi Michael, thank you for your answer. MIME headers are correct, but I still don't know how to send binary output through CGI::Application. On "classic" way it is easy: open(FILE, "<test.pdf"); @fileholder = <FILE>; close (FILE);
print "Content-Type: application/pdf\n"; print "Content-Disposition: attachment;filename=test.pdf\n\n"; print @fileholder; How to do it through CGI::Application? Petr [EMAIL PROTECTED] wrote: > Hi, > I want send to browser pdf file (it exist): [EMAIL PROTECTED] wrote: >If it already exists, it's much easier than that. Basically you just tell the >browser where to find the file and what type it is: >sub send_pdf { >my $self = shift; >$self->header_type('none'); # let's you set your own headers >$self->header_props( >-content-type => 'application/pdf', >-content-disposition' => 'inline; filename=myfile.pdf' >); > >return 'Download myfile.pdf'; >} >Or something like that. It's kind of tricky when you need to deal with caching, >SSL and IE - http://support.microsoft.com/kb/316431, but if you don't then it's >pretty easy. >-- >Michael Peters >Developer >Plus Three, LP ##### CGI::Application community mailing list ################ ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## ################################################################