From 4be440209e6bca5469cea12f151e531633e85729 Mon Sep 17 00:00:00 2001 From: joshferraro Date: Mon, 5 Sep 2005 22:25:11 +0000 Subject: [PATCH] adding Content-Disposition to header to allow for browsers to recognize it's a PDF by default, etc. --- barcodes/pdfViewer.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/barcodes/pdfViewer.pl b/barcodes/pdfViewer.pl index b80d23df3d..d6ec298a5b 100755 --- a/barcodes/pdfViewer.pl +++ b/barcodes/pdfViewer.pl @@ -28,11 +28,13 @@ use CGI; # This script take a pdf filename as a parameter and output it to the browser. my $cgi = new CGI; +my $filename = "barcodes.pdf"; my $tmpFileName = $cgi->param('tmpFileName'); +print "Content-Disposition: attachment; filename = $filename\n\n"; print $cgi->header(-type => 'application/pdf'), $cgi->start_html(-title=>"Codify to PDF"); open fh, "<$tmpFileName"; while () { print; } -print $cgi->end_html(); \ No newline at end of file +print $cgi->end_html(); -- 2.39.5