powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
That works fine, but when it is done, it is just a white blank page. Is there a way to do this, where I can actually print to the window? I guess what I need, is a way to maybe delete the headers so I can print HTML headers. Or something to that affect. I have it open in a new window to pass the Zip file. I even tried having the window that opened the new window, close the window, after it opened it, but I could not get that to work. But that is Javascript, therefore another story.$size = -s "$file"; open(DOWNLOAD,"<$file") or die $!; print "Content-Type:application/zip\n"; print "Content-Disposition:attachment; filename=$filename\n"; print "Content-Length:$size\n\n";binmode(DOWNLOAD);binmode(STD +OUT); while(read DOWNLOAD, my $buffer, 256){ print $buffer; } close(DOWNLOAD);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing a Zip file
by aquarium (Curate) on Jun 30, 2003 at 12:24 UTC |