Font Based Barcode Generator – Barcode Font

Category: Javascript | April 29, 2016
Author: jangel058
Views Total: 5,981
Official Page: Go to website
Last Update: April 29, 2016
License: MIT

Preview:

Font Based Barcode Generator – Barcode Font

Description:

Barcode Font is a pure JavaScript library which uses Fonts to generate Code 128 and Code 39 barcodes from any text.

How to use it:

Load the barcode-font.min.css and barcode-font.min.js into your html file. Don’t forget to upload the font folder into your web server.

<link rel="stylesheet" href="barcode-font.min.css">
<script src="barcode-font.min.js"></script>

The JavaScript to render a Code 128 barcode.

var barcode128 = barcodeFont('code128', 'TEXT YOU WANT TO ENCODE')
    .create({
      tagName: 'div',
      id: 'code128',
      className: 'codes test'
});

The JavaScript to render a Code 39 barcode.

var barcode39 = barcodeFont('code39', 'TEXT TO ENCODE', true)
    .create({
      tagName: 'span',
      id: 'code39',
      className: 'codes test'
});

You Might Be Interested In:


One thought on “Font Based Barcode Generator – Barcode Font

Leave a Reply