KTL can now create QR Codes easily

Hi to all,

I have just released a new feature in the KTL: QR Code Generation.
Documentation can be found here: _bcg keyword

Whenever you need to generate a QR Code, just add the following keyword to a Details view:

_bcg=150

_bcg stands for “Barcode Generator”. The optional parameter is the size in pixels. Default is 200 if omitted.

It will find the first field in the view and create the QR Code above the text.
Currently, only QR Codes are supported but more types can be added if requested.

Also, if you need a QR Code in another scenario (grids, etc), let me know.

Enjoy,
Normand

3 Likes

Hi Normand,

this is very useful, thank you.

I use QR codes for lengthy URLs i do not want to display.

Would it be possible to add an optional parameter to suppress the display of the text and only show the QR code?

1 Like

Hi Wolfgang!

Thanks for the feedback and your improvement suggestion.

Of course, hiding the URL (or any QR code text actually) would be very easy to do.

How about an option “h” after the size parameter, like this:

_bcg=175,h
to set size and hide text

_bcg=,h
to use default size and hide text

Any other suggestions is welcome,
Normand

Hi Wolfgang,

I’ve completed your request, and beyond.

Go see the KTL documentation update about the _bcg keyword here:

Barcode Generator - Keywords · cortexrd/Knack-Toolkit-Library Wiki (github.com)

You can now select any field in the details view and there’s an option to hide the text.

Let me know if you like it.

KTL version is now at 0.13.9

Don’t forget to update your loader to point to my new AWS S3 server!!!
KTL files are now migrated to a new AWS server for more reliability and availability. · cortexrd/Knack-Toolkit-Library · Discussion #22 (github.com)

Enjoy,
Normand

1 Like

Hi team,

Can anyone explain where this code goes. I have added the loader and added the _bcg=175,myfield,h to the view , I have tried without parameters as well. Other Keywords work but not this.

Hi Peter2,

Indeed, you found a bug. Sorry about that.
I will fix it quickly and let you know when it’s ready.

Norm

This is great! I’m going to implement this shortly. As for other codes: UPC-A and Code 128 would be fantastic to add.

2 Likes

@Peter2,

The bug has been fixed in KTL v0.19.5.

Enjoy,
Norm

Matthew,

I have found this library: GitHub - lindell/JsBarcode: Barcode generation library written in JavaScript that works in both the browser and on Node.js

Have a look at what it can do, and let me know if there are any barcode formats that are missing, before I tackle the update.

Norm

1 Like

For my uses that list looks good. We use Code 128 and UPC-A all the time. QR codes are also helpful, of course.