[Koha-cvs] koha/barcodes label-print-pdf.pl [dev_week]

Ryan Higgins rch at liblime.com
Thu Dec 21 01:34:04 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		dev_week
Changes by:	Ryan Higgins <rych>	06/12/21 00:34:04

Modified files:
	barcodes       : label-print-pdf.pl 

Log message:
	adding cgi mimetype and attachment filename (and comment warns)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-print-pdf.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.2.2.6&r2=1.1.2.2.2.7

Patches:
Index: label-print-pdf.pl
===================================================================
RCS file: /sources/koha/koha/barcodes/label-print-pdf.pl,v
retrieving revision 1.1.2.2.2.6
retrieving revision 1.1.2.2.2.7
diff -u -b -r1.1.2.2.2.6 -r1.1.2.2.2.7
--- label-print-pdf.pl	21 Dec 2006 00:27:47 -0000	1.1.2.2.2.6
+++ label-print-pdf.pl	21 Dec 2006 00:34:04 -0000	1.1.2.2.2.7
@@ -11,8 +11,8 @@
 
 # the reason for this goofyness, it that i couldnt find a single perl package that handled both barcodes and decent text placement.
 
-use lib '/usr/local/hlt/intranet/modules';
-use C4::Context("/etc/koha-hlt.conf");
+#use lib '/usr/local/hlt/intranet/modules';
+#use C4::Context("/etc/koha-hlt.conf");
 
 use strict;
 use CGI;
@@ -32,6 +32,9 @@
 
 my $htdocs_path = C4::Context->config('intrahtdocs');
 my $cgi         = new CGI;
+
+print $cgi->header(-type=> 'application/pdf', -attachment=>'barcode.pdf');
+
 my $spine_text  = "";
 
 # get the printing settings
@@ -45,13 +48,13 @@
 my $fontsize     = $template->{'fontsize'};
 my $units        = $template->{'units'};
 
-warn "UNITS $units";
-warn "fontsize = $fontsize";
-warn Dumper $template;
+#warn "UNITS $units";
+#warn "fontsize = $fontsize";
+#warn Dumper $template;
 
 my $unitvalue = GetUnitsValue($units);
-warn $unitvalue;
-warn $units;
+#warn $unitvalue;
+#warn $units;
 
 my $tmpl_code = $template->{'tmpl_code'};
 my $tmpl_desc = $template->{'tmpl_desc'};
@@ -111,10 +114,10 @@
 
 # big row loop
 
-warn " $lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY";
-warn "$label_rows, $label_cols\n";
-warn "$label_height, $label_width\n";
-warn "$page_height, $page_width\n";
+#warn " $lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY";
+#warn "$label_rows, $label_cols\n";
+#warn "$label_height, $label_width\n";
+#warn "$page_height, $page_width\n";
 
 my ( $rowcount, $colcount, $x_pos, $y_pos, $rowtemp, $coltemp );
 
@@ -143,7 +146,7 @@
 
 foreach $item (@resultsloop) {
 
-    warn "-----------------";
+    warn "-----------------\nbar: $item->{'barcode'}";
     if ($guidebox) {
         drawbox( $x_pos, $y_pos, $label_width, $label_height );
     }





More information about the Koha-cvs mailing list