Bug 39113

Summary: Support Code 128 barcodes
Product: Koha Reporter: Pablo AB <pablo.bianchi>
Component: Label/patron card printingAssignee: Chris Nighswonger <cnighswonger>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Pablo AB 2025-02-12 18:35:33 UTC
As we know, Koha doesn't yet support Code128B. It seems the libbarcode-code128-perl dependency package is used only for OPACVirtualCardBarcode, where is an option.

I could generate PNG (sadly no SVG) barcodes by naively tweaking `svc/barcode`:

use Barcode::Code128;

my %type_mapping = (
  Code128b       => 1,
);

eval {
  if ( $type eq "Code128b") {
    my $code = new Barcode::Code128;
    $code->option("height", $height);
    $code->option("show_text", !$notext);
    $image = $code->png($barcode);
  }
};

And ./cgi-bin/koha/svc/barcode?barcode=3721M&type=Code128b, but for some reason it fails (error 500) with some barcodes.

Original post: https://www.mail-archive.com/koha-devel@lists.koha-community.org/msg14428.html