sanPerl has asked for the wisdom of the Perl Monks concerning the following question:
I am Not able to open PDF-reader and PDF document when I use this code. I would be glad if someone could provide me some hints/clues to get my job done.use strict; my $image_dir="D:\\my"; display_pdf("in.pdf"); sub display_pdf{ my $file = shift; my $full_path = "$image_dir\\$file"; my $buffer=""; print "Content-type: application/pdf\n\n"; open(FIN,"< $full_path") || print "File Not Found"; binmode FIN; $buffer = join '', <FIN>; close(FIN); print $buffer; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Opening PDF through CGI
by blazar (Canon) on May 26, 2006 at 15:10 UTC | |
by nobull (Friar) on May 26, 2006 at 16:58 UTC | |
|
Re: Opening PDF through CGI
by ForgotPasswordAgain (Vicar) on May 26, 2006 at 15:35 UTC | |
|
Re: Opening PDF through CGI
by nobull (Friar) on May 26, 2006 at 16:50 UTC |