Barcode Utilities Extension

Main features:

  • Check if the given EAN (8/10/13) barcode is valid
  • Generates the check digit for EAN (8/10/13) barcodes

Blocks:

blocks

BarcodeUtilities1.isEanValid(String barcode)

Returns true if the given barcode’s check digit is valid, in this example the return value will be “true”


Case 1: blocks (1)

Case 2: blocks (2)

BarcodeUtilities1.generateEanCheckDigit(String barcode, boolean returnFullBarcode)

Generates the check digit for EAN (8/10/13) barcodes.
Case 1: If returnFullBarcode is set to true, the entire barcode and check digit will be returned in a single string. In this case, return value will be “8026921000013
Case 2: If returnFullBarcode is set to false, only the check digit will be returned. In this case, return value will be “3”


UPDATE 2020-02-08T23:00:00Z
Correction to methods names as suggested by @Taifun here:


As suggested by @Diego here:

New block added:

blocks

GenerateBarcodeImage(String text, int type, int dpi, image input)

Parameters:

  • text: the string (or number sequence) to be encoded
  • types:
  1. Code128
  2. Code39
  3. EAN-8
  4. EAN-13
  5. QR-Code
  • dpi: the “quality” of the generated image
  • input: image component where the barcode has to be shown

thanks to https://barcode.tec-it.com api


Direct download (Updated 2020-02-08T23:00:00Z): com.appybuilder.futuredevtechita.BarcodeUtilities.aix (8,3 KB)

15 Likes

Good work! :smile:

3 Likes

thank you for your contribution

please remember the naming conventions, which are UpperCamelCase for property, method and event names (i.e. the first letter should be a capital letter) and lowerCamelCase for parameter names
Unbenannt

Taifun

2 Likes

Would be really useful if you could generate the Image as well :slightly_smiling_face:

7 Likes

Request response code: 200 :white_check_mark:
You can find the updated extension in the first post!

3 Likes

Hi Miki,
about you, will it be possible to generate a QR code with information from form fields and print it after generating a visual *jpg QR with a bluetooth printer?

Thanks

Hi Anton, in the latest version i added the Text/Barcode to image feature.
Then you can use this extension Extension for ESC/POS bluetooth thermal printers + Quick Sort + Object Manager - #ThunkableClassicExtensions - Community or look for something else to print it.

Thank you Miki, maybe I ask something else if I reach my purposes :slight_smile: