[EMAIL PROTECTED] wrote:
> Hi,
> I want send to browser pdf file (it exist):

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/                 ##
##                                                            ##
################################################################

Reply via email to