Turning HTML Results Page into PDF and Downloading in CGI file
问题 I am working in PERL and I have an html results page that displays perfectly. I want to add a button that makes this html page a pdf that downloads onto your machine. Below is the code that generates the html page. fileFH is generated in the CGI code. sub searchResults { my $data = shift; my $file = "$OUTFILES/$data.html"; open(my $fileFH, '<', $file) or return "Can not find file\n"; print $cgi->header(); while (<$fileFH>) { print qq($_); } close($fileFH); } 回答1: If you are open to an