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

Mason James szrj1m at yahoo.com
Tue Aug 28 00:36:45 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		dev_week
Changes by:	Mason James <sushi>	07/08/27 22:36:45

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

Log message:
	multi-label block printing, partial commit 

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

Patches:
Index: label-printf-pdf.pl
===================================================================
RCS file: /sources/koha/koha/barcodes/Attic/label-printf-pdf.pl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- label-printf-pdf.pl	27 Aug 2007 02:23:28 -0000	1.1.2.1
+++ label-printf-pdf.pl	27 Aug 2007 22:36:44 -0000	1.1.2.2
@@ -60,7 +60,8 @@
 my $label_cols = 2 ;
 my $label_rows = 2;
 
-my $text_wrap_cols = GetTextWrapCols( $fontsize, $label_width );
+#my $text_wrap_label = GetTextWrapCols( $fontsize, $label_width );
+#my $text_wrap_spine = GetTextWrapCols( $fontsize, $spine_width );
 
 #warn $label_cols, $label_rows;
 
@@ -143,20 +144,71 @@
 
 # $barcodetype = "CODE39MOD10";
 
+my $gutter = 2;
+
 foreach $item (@resultsloop) {
+    my $barcode = $item->{'barcode'};
+ $item->{callnumber} = 'BT 380.2 W54';
+my @callnumber = split (/ /, $item->{callnumber});
+
+my @spine_fields = ($item->{ccode},
+        $callnumber[0],
+        $callnumber[1],
+        $callnumber[2],
+        $item->{copyrightdate} );
+
+
+
+
+
+my @circ_fields = ( $item->{ccode},
+ $callnumber[0],
+        $callnumber[1],
+        $callnumber[2],
+        $item->{copyrightdate} );
+
+my @circ2_fields = ( 
+'_',
+  $item->{author},
+  $item->{title});
+
+my @circ_barcode = ($item->{'barcode'} );
+
+
+my $fontsize= 3;
+
 #    warn "$x_pos, $y_pos, $label_width, $label_height";
     my $barcode = $item->{'barcode'};
 #  drawbox( $x_pos+30, $y_pos-10, $label_width, $label_height ) if $guidebox;
 #  drawbox( $x_pos+10, $y_pos, 100, 100 ) if $guidebox;
 
 
-
   drawbox( $x_pos, $y_pos, $block_width,  $block_height,  ) if $guidebox;
   drawbox( $x_pos, $y_pos+20, $spine_width,  $spine_height,  ) if $guidebox;
 
+    draw_text_block_manual2( $x_pos, $y_pos+20, $spine_width, $spine_height, $fontsize,      $gutter,    'l', @spine_fields);
+
+
   drawbox( $x_pos+30, $y_pos+50, $label_width,  $label_height,  ) if $guidebox;
-  drawbox( $x_pos+30, $y_pos , $label_width,  $label_height,  ) if $guidebox;
+    draw_text_block_manual2( $x_pos+30, $y_pos+50, $label_width, $label_height, $fontsize,      $gutter, 'r', @circ_barcode);
+
+    draw_text_block_manual2( $x_pos+30, $y_pos+50, $label_width, $label_height, $fontsize,      $gutter, , '' , @circ_fields);
+
+    draw_text_block_manual2( $x_pos+$spine_width+30, $y_pos+50, $label_width, $label_height, $fontsize,      $gutter,  'l' , @circ2_fields);
+
+
+ 
+  
+#  drawbox( $x_pos+30, $y_pos , $label_width,  $label_height,  ) if $guidebox;
+
+#  draw_text_block_manual2( $x_pos+30, $y_pos, $label_width, $label_height, $fontsize,      $gutter, 'r', @circ2_fields);
+
+
+
+
+#calc_next_block_position();
 
+last;
 }    # end for item loop
 prEnd();
 





More information about the Koha-cvs mailing list