Bug 8717 - Wrong subscription notes are showing in catalogue detail view of serials...
[koha.git] / tools / pdfViewer.pl
blob8e6a98fe672aa945a536462ad89bf91415fca561
1 #!/usr/bin/perl
3 # script to show a PDF file.
4 # written 07/04
5 # by Veleda Matias - matias_veleda@hotmail.com - Physics Library UNLP Argentina and
6 # CastaƱeda Sebastian - seba3c@yahoo.com.ar - Physics Library UNLP Argentina and
8 # This file is part of Koha.
10 # Koha is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
13 # version.
15 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License along with
20 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
21 # Suite 330, Boston, MA 02111-1307 USA
25 use strict;
26 #use warnings; FIXME - Bug 2505
27 use C4::Context;
28 use CGI;
30 # This script take a pdf filename as a parameter and output it to the browser.
31 my $cgi = new CGI;
32 my $filename = "barcodes.pdf";
33 my $tmpFileName = $cgi->param('tmpFileName');
34 print "Content-Disposition: attachment; filename = $filename\n\n";
35 print $cgi->header(-type => 'application/pdf'),
36 $cgi->start_html(-title=>"Codify to PDF");
37 open FH, "<$tmpFileName";
38 while (<FH>) {
39 print;
41 close FH;
42 print $cgi->end_html();