@@ -, +, @@ cards layout card template, layout and card batch. Use barcode and at least one other element (text or images) in the layout. => Some tips for testing: - activate guides for the layout - use a template and a batch containing more than one card; the displacement will be different for each card and depend on the barcode position relative to the bottom left of the entire page. => At least for the layout, but changing it in the template will scale the page as well. => In some cases, the barcode even seem to not print at all since it's new coordinates are out of screen. --- C4/Patroncards/Patroncard.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/C4/Patroncards/Patroncard.pm +++ a/C4/Patroncards/Patroncard.pm @@ -93,8 +93,8 @@ sub draw_barcode { my $barcode_width_scale = $self->{'barcode_width_scale'}; _draw_barcode( $self, - llx => $self->{'llx'} + $self->{'layout'}->{'barcode'}->[0]->{'llx'}, - lly => $self->{'lly'} + $self->{'layout'}->{'barcode'}->[0]->{'lly'}, + llx => $self->{'llx'} + $self->{'layout'}->{'barcode'}->[0]->{'llx'} * $self->{'unitvalue'}, + lly => $self->{'lly'} + $self->{'layout'}->{'barcode'}->[0]->{'lly'} * $self->{'unitvalue'}, width => $self->{'width'} * $barcode_width_scale, y_scale_factor => $self->{'height'} * $barcode_height_scale, barcode_type => $self->{'layout'}->{'barcode'}->[0]->{'type'}, @@ -373,8 +373,8 @@ sub _draw_barcode { # this is cut-and-paste from Label.pm because there is no } eval { PDF::Reuse::Barcode::Code39( - x => $params{'llx'} * $self->{'unitvalue'}, - y => $params{'lly'} * $self->{'unitvalue'}, + x => $params{'llx'}, + y => $params{'lly'}, value => "*$params{barcode_data}*", xSize => $x_scale_factor, ySize => $params{'y_scale_factor'}, @@ -393,8 +393,8 @@ sub _draw_barcode { # this is cut-and-paste from Label.pm because there is no $x_scale_factor = ($params{'width'} / $tot_bar_length) * 0.9; eval { PDF::Reuse::Barcode::COOP2of5( - x => $params{'llx'}* $self->{'unitvalue'}, - y => $params{'lly'}* $self->{'unitvalue'}, + x => $params{'llx'}, + y => $params{'lly'}, value => $params{barcode_data}, xSize => $x_scale_factor, ySize => $params{'y_scale_factor'}, @@ -411,8 +411,8 @@ sub _draw_barcode { # this is cut-and-paste from Label.pm because there is no $x_scale_factor = ($params{'width'} / $tot_bar_length) * 0.9; eval { PDF::Reuse::Barcode::Industrial2of5( - x => $params{'llx'}* $self->{'unitvalue'} , - y => $params{'lly'}* $self->{'unitvalue'}, + x => $params{'llx'}, + y => $params{'lly'}, value => $params{barcode_data}, xSize => $x_scale_factor, ySize => $params{'y_scale_factor'}, --