koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Mason James
Subject: [Koha-cvs] koha/barcodes label-print-pdf.pl [dev_week]
Date: Thu, 05 Jul 2007 21:23:23 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Mason James <sushi>     07/07/05 21:23:23

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

Log message:
        added back, alt-ing labels

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.10&r2=1.1.2.2.2.11

Patches:
Index: label-print-pdf.pl
===================================================================
RCS file: /sources/koha/koha/barcodes/label-print-pdf.pl,v
retrieving revision 1.1.2.2.2.10
retrieving revision 1.1.2.2.2.11
diff -u -b -r1.1.2.2.2.10 -r1.1.2.2.2.11
--- label-print-pdf.pl  5 Jul 2007 15:19:43 -0000       1.1.2.2.2.10
+++ label-print-pdf.pl  5 Jul 2007 21:23:23 -0000       1.1.2.2.2.11
@@ -27,9 +27,6 @@
 
 $DB::single = 1;
 
-### $template
-### $conf_data
-# @resultsloop
 
 my $barcodetype  = $conf_data->{'barcodetype'};
 my $printingtype = $conf_data->{'printingtype'};
@@ -38,8 +35,7 @@
 my $fontsize     = $template->{'fontsize'};
 my $units        = $template->{'units'};
 
-my $printingtype = 'BAR';
-my $guidebox     = 1;
+### $printingtype;
 
 =c
 ################### defaults for testing
@@ -152,29 +148,27 @@
 #    main foreach loop
 #
 
-    $printingtype = 'BARBIB';
+$printingtype = 'ALT';
 foreach $item (@resultsloop) {
         warn "$x_pos, $y_pos, $label_width, $label_height";
     my $barcode = $item->{'barcode'};
 
-    if ($guidebox) {
-        drawbox( $x_pos, $y_pos, $label_width, $label_height );
-    }
-
-
     if ( $printingtype eq 'BAR' ) {
+        drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
         DrawBarcode( $x_pos, $y_pos, $label_height, $label_width, $barcode,
             $barcodetype );
         CalcNextLabelPos();
     }
-    elsif ( $printingtype =~ m/BARBIB/ ) {
-# reposoitioning barcode up the top of label
-        my $barcode_height = $label_height/2;
-        my $text_height = $label_height/2;
-        my $barcode_y = $y_pos +  ($label_height/2);
+    elsif ( $printingtype eq 'BARBIB' ) {
+        drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
 
-        DrawBarcode( $x_pos, $barcode_y , $barcode_height, $label_width, 
$barcode,
-            $barcodetype );
+        # reposoitioning barcode up the top of label
+        my $barcode_height = $label_height / 2;
+        my $text_height    = $label_height / 2;
+        my $barcode_y      = $y_pos + ( $label_height / 2 );
+
+        DrawBarcode( $x_pos, $barcode_y, $barcode_height, $label_width,
+            $barcode, $barcodetype );
         DrawSpineText( $y_pos, $text_height, $fontsize, $x_pos,
             $left_text_margin, $text_wrap_cols, \$item, \$conf_data );
 
@@ -182,7 +176,8 @@
 
     } # correct
     elsif ( $printingtype eq  'BIBBAR' ) {
-        my $barcode_height = $label_height/2;
+        drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
+        my $barcode_height = $label_height / 2;
         DrawBarcode( $x_pos, $y_pos, $barcode_height, $label_width, $barcode,
             $barcodetype );
         DrawSpineText( $y_pos, $label_height, $fontsize, $x_pos,
@@ -191,6 +186,22 @@
         CalcNextLabelPos();
     }
 
+    elsif ( $printingtype eq 'ALT' ) {
+        drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
+        DrawBarcode( $x_pos, $y_pos, $label_height, $label_width, $barcode,
+            $barcodetype );
+        CalcNextLabelPos();
+        drawbox( $x_pos, $y_pos, $label_width, $label_height ) if $guidebox;
+        DrawSpineText( $y_pos, $label_height, $fontsize, $x_pos,
+            $left_text_margin, $text_wrap_cols, \$item, \$conf_data );
+
+        CalcNextLabelPos();
+    }
+
+
+
+
+
 
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]