artist has asked for the wisdom of the Perl Monks concerning the following question:
How I can send appropriate header so that it can open PDF with Adobe Acrobat? If user associate the extension .pl with Acrobat, it works fine. I like to get Perl side solution to avoid this route.
Thanks. Update: (after 10 Minutes) Here is my origianl code:
sub display_pdf { my $file = shift; print "Content-Type: application/pdf\n\n"; open(IN, "$file") || die "cannot open $file"; binmode(IN); while(<IN>){ print; } close(IN); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mac and PDF
by ikegami (Patriarch) on Nov 24, 2004 at 16:43 UTC | |
|
Re: Mac and PDF
by stvn (Monsignor) on Nov 24, 2004 at 18:15 UTC | |
|
Re: Mac and PDF
by traveler (Parson) on Nov 24, 2004 at 23:27 UTC |