Bug 23510

Summary: Allow QR codes to be used in label/patroncard creator
Product: Koha Reporter: Theodoros Theodoropoulos <theod>
Component: Label/patron card printingAssignee: Chris Nighswonger <cnighswonger>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, mtj, theod
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: proposed patch to add QRcode functionality
proposed patch to add QRcode functionality to Label and PatronCard creator
proposed patch to add QRcode functionality to Label and PatronCard creator

Description Theodoros Theodoropoulos 2019-08-27 11:18:42 UTC
Currently, only CODE39, CODE39MOD, CODE39MOD10, COOP2OF5, INDUSTRIAL2OF5 and EAN13           barcode types are allowed in Label creator.
It would be nice to have 2D barcode support as well, as more information is crammed in less space and the result square-sized barcode can easily be put UNDER (or OVER) a biblio spine label!

As an added bonus, the PDF::Reuse::Barcode module (https://metacpan.org/pod/PDF::Reuse::Barcode) used in Label creation, already supports generation of QRcodes, so the whole enhancement should be 'fairly' easy to implement!
Comment 1 Theodoros Theodoropoulos 2019-08-27 13:13:34 UTC
Created attachment 92482 [details] [review]
proposed patch to add QRcode functionality

I have briefly tested this patch with Koha 17.11 and it works as expected.
This was a quick'n'dirty approach to prove that this enhancement is possible and not too difficult to implement. Additional checks and/or documentation may be needed.

Notes: I have chosen to use
- QRCode version 1 and modulesize=1 (small square) because I personally needed to add the result code in a small area
- also decided to hide the text version of the barcode (to save space)
Comment 2 Theodoros Theodoropoulos 2019-08-28 11:34:57 UTC
Created attachment 92488 [details] [review]
proposed patch to add QRcode functionality to Label and PatronCard creator

The patch is still 'proof-of-concept quality' and needs some calculations for xsize and ysize but at least seems to display valid QRcodes in both Labels and Patron cards.
Comment 3 Theodoros Theodoropoulos 2019-08-28 12:06:49 UTC
Created attachment 92490 [details] [review]
proposed patch to add QRcode functionality to Label and PatronCard creator
Comment 4 Katrin Fischer 2020-03-29 17:14:46 UTC
Hi Theodorus, is your patch ready for testing? If so, please switch to 'needs sign-off' to alert testers!