Simple jQuery Based Barcode Generator - Barcode

File Size: 228 KB
Views Total: 179280
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Simple jQuery Based Barcode Generator - Barcode

Barcode is a tiny and lightweight jQuery plugin that has the ability to generates 8 types of Barcode and outputs as CSS, BMP, SVG or Canvas for your work.

Barcode types supported:

  • EAN 8
  • EAN 13
  • UPC
  • standard 2 of 5 (industrial)
  • interleaved 2 of 5
  • code 11
  • code 39
  • code 93
  • code 128
  • codabar
  • MSI
  • Data Matrix

Output formats supported:

  • CSS
  • BMP (not usable in IE)
  • SVG (not usable in IE)
  • Canvas (not usable in IE)

Basic Usage:

1. Add the latest jQuery javascript library and jQuery Barcode plugin in your document.

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="jquery-barcode.js"></script>

2. Create a container for the barcode.

<div id="demo"></div>   

3. Generating a barcode.

$("#demo").barcode(
"1234567890128", // Value barcode (dependent on the type of barcode)
"ean13" // type (string)
);     

4. Types

  • codabar
  • code11 (code 11)
  • code39 (code 39)
  • code93 (code 93)
  • code128 (code 128)
  • ean8 (ean 8)
  • ean13 (ean 13)
  • std25 (standard 2 of 5 - industrial 2 of 5)
  • int25 (interleaved 2 of 5)
  • msi
  • datamatrix (ASCII + extended)

5. Default settings to customize the generated barcode.

barWidth: 1,
barHeight: 50,
moduleSize: 5,
showHRI: true,
addQuietZone: true,
marginHRI: 5,
bgColor: "#FFFFFF",
color: "#000000",
fontSize: 10,
output: "css",
posX: 0,
posY: 0

Changelog:

2022-09-08

  • Updated jQuery & PHP versions

2022-01-08

  • Updated jQuery version

2019-02-23

  • jQuery updated
  • Also provides Java and PHP versions

This awesome jQuery plugin is developed by jbdemonte. For more Advanced Usages, please check the demo page or visit the official website.