From 02ce840726f8cf2e98505528264981bbf480b719 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 27 Jan 2026 22:31:19 +0000 Subject: [PATCH] Bug 40478: Add support for COOP2of5, Industrial2of5 and EAN13 --- C4/Labels/Label.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm index f8c118c56d0..8f0df73e26e 100644 --- a/C4/Labels/Label.pm +++ b/C4/Labels/Label.pm @@ -579,6 +579,12 @@ sub barcode { my $adjusted_llx = $params{'llx'}; my $barcode_width = $tot_bar_length * $x_scale_factor; + if ( $barcode_justify eq 'C' ) { + $adjusted_llx = $params{'llx'} + ( ( $self->{'width'} - $barcode_width ) / 2 ); + } elsif ( $barcode_justify eq 'R' ) { + $adjusted_llx = $params{'llx'} + ( $self->{'width'} - $barcode_width ); + } + eval { PDF::Reuse::Barcode::COOP2of5( x => $adjusted_llx, @@ -600,6 +606,12 @@ sub barcode { my $adjusted_llx = $params{'llx'}; my $barcode_width = $tot_bar_length * $x_scale_factor; + if ( $barcode_justify eq 'C' ) { + $adjusted_llx = $params{'llx'} + ( ( $self->{'width'} - $barcode_width ) / 2 ); + } elsif ( $barcode_justify eq 'R' ) { + $adjusted_llx = $params{'llx'} + ( $self->{'width'} - $barcode_width ); + } + eval { PDF::Reuse::Barcode::Industrial2of5( x => $adjusted_llx, -- 2.39.5