Read pdf file and send it to browser
#!/usr/local/bin/perl
my $file_name = “/apps/intranet/ns-home/Apache_Server/Public/TechCouncil/TIITC/2006/data/a0756159_1148893709_Karnataka%20Map.pdf”;
open(FILE, “< $file_name”) or die (“$!”);
while (<FILE>) {
$File .= $_;
}
close FILE;
print “Content-Type: application/pdf”, “\n”;
print “Content-Disposition: Attachment; filename=Abc.pdf”, “\n\n”;
print $File;
Posted by
at
14:27:26