Code 128 Barcode Generator In JavaScript – code128.js

Category: Javascript | July 12, 2018
Views Total:7,535 views
Official Page:Go to website
Last Update:July 12, 2018


Code 128 Barcode Generator In JavaScript – code128.js


code128.js is a small JavaScript library to generate Code 128 based alphanumeric or numeric-only barcodes using JavaScript and HTML5 canvas.

How to use it:

Install the code128.js with NPM.

$ npm install code128.js --save

Import the code128.js library.

import code128 from 'code128.js'
<!-- OR -->
<script src="dist/index.js"></script>

Generate a new barcode from an input you provide.

var code = new Code128('cssscript')

Render the barcode in a specific container.


You Might Be Interested In:

One thought on “Code 128 Barcode Generator In JavaScript – code128.js

  1. George DASCALU

    If you want to make this code to be compatible with internet explorer (ie) you should change all the find methods with filter()[0]
    -example :
    ELEMENT_TABLE.find(function (o) {
    return o[1] === item;
    to : ————————————————
    ELEMENT_TABLE.filter(function (o) {
    return o[1] === item;

    and you will can generate codebar on IE


Leave a Reply