Go to file
David Cook 9da5f23f96
Bug 40473: Use better algorithm for calculating Code39 barcode length
This patch uses the PDF::Reuse::Barcode algorithm for calculating barcode
background box length relative to barcode length in order to determine
the actual barcode width and thus the X scale factor required to re-size
that barcode so that it fits on the label width (or rather the
"Barcode width" which is a percentage applied to the label width
to create a narrower usable surface for the barcode and barcode background
box).

To test:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=29
2. Add an item with barcode 123456, add an item with barcode 39999000001310399991,
    and ensure an item with barcode 39999000001310 already exists
3. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=batch
4. Create a patch that uses 3 items using 39999000001310, 2 items with 123456,
    and 2 items with 39999000001310399991
4. Go to http://localhost:8081/cgi-bin/koha/labels/label-manage.pl?label_element=layout
5. Edit the layout "Label Test"
6. Change the "Barcode width" to 1, and enable "Draw guide boxes", and click "Save"
7. Export the batch using the template "Avery 5160 | 1 x 2-5/8" and the layout "Label Test" and open as PDF
8. Note that the whole barcode fits inside the red guidebox (there should be some
overlap of white on top of the red guidebox but that is normal since we're using 100% of the
barcode label width).
9. Edit the "Label Test" layout to try "Code39 + Modulo43" and "Code39 + Modulo10" and retry batch export
10. Edit the "Label Test" and try different "Barcode width" like the usual default .8
11. Celebrate that your barcodes fit on the label!

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-26 10:36:41 -06:00
C4 Bug 40473: Use better algorithm for calculating Code39 barcode length 2025-09-26 10:36:41 -06:00
Koha Bug 40872: List opac/unapi as a Perl file 2025-09-24 09:25:05 -06:00
acqui Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
admin Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
api Bug 40684: Adjust permissions for vendors 2025-09-24 09:25:04 -06:00
authorities Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
basket Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
bin Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
bookings Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
catalogue Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cataloguing Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
circ Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
clubs Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
course_reserves Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
debian Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
docs Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
erm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
errors Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
etc Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
ill Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
installer Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-tmpl Bug 40854: Correct menu name in browser.js 2025-09-26 09:10:21 -06:00
labels Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
lib Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
misc Bug 40748: Check for HTTP URLs and skip shell when using system() 2025-09-26 09:10:20 -06:00
offline_circ Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
opac Bug 40872: (follow-up) Tidy opac/unapi 2025-09-24 09:25:06 -06:00
patron_lists Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
patroncards Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
plugins Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
pos Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
preservation Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
recalls Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reports Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
reserve Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
reviews Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
rotating_collections Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
serials Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
services Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
skel
…
suggestion Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
svc Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
t Bug 40876: Apply 'exact' to all attributes when column filtering 2025-09-25 11:07:42 -06:00
tags Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
tools Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
virtualshelves Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
xt Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
.codespell-ignore Bug 39325: (QA follow-up) Adjust some issues 2025-04-28 18:51:30 +02:00
.editorconfig
…
.git-blame-ignore-revs Bug 39096: Add 'tidy all' commits to a git blame ignore file 2025-02-17 13:10:25 +01:00
.gitignore Bug 40838: Add generated bookings CSS assets to gitignore 2025-09-19 08:42:47 -06:00
.htaccess
…
.mailmap 25.05.00: Update .mailmap (part 4) 2025-05-26 10:19:09 -03:00
.perlcriticrc
…
.perltidyrc
…
.prettierrc.js Bug 38664: Treat .vue files like other JS files 2025-02-11 14:58:25 +01:00
.proverc.dist
…
.stylelintrc.json
…
INSTALL
…
Koha.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
LICENSE Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
MANIFEST.SKIP
…
Makefile.PL Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
README
…
README.md Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
README.robots
…
about.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
app.psgi Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
build-resources.PL Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
changelanguage.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cpanfile Bug 40663: Update GD::Barcode::QRcode to v2.01 2025-09-05 15:10:34 -06:00
cypress.config.ts Bug 40346: Use KOHA_INTRANET_URL for the baseUrl 2025-07-21 14:01:23 -06:00
eslint.config.mjs Bug 38524: Enable ESLint for .ts and .vue files 2025-01-16 15:56:17 +01:00
fix-perl-path.PL Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
gulpfile.js Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
help.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
kohaversion.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mainpage.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
package.json Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests 2025-07-08 15:42:03 -06:00
rewrite-config.PL Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
rspack.config.js Bug 40173: Make http-client reusable from Cypress tests 2025-07-21 14:01:07 -06:00
tsconfig.json
…
yarn.lock Bug 40170: Update yarn.lock 2025-07-10 09:43:26 -06:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit https://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

https://koha-community.org/

Koha Logo