Simplicty and flexibility!

How to print a barcode via HTML

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

How to print a barcode via HTML


In Principle you can use the same font in HTML.

Just need to set it on the tag.


.barcode {font-family: "Code 128" ;font-size:72px;}





Here we have done it a little more Webby but in principle you can simply write it directly on the tag.

<p style="font-family: "Code 128" ;font-size:72px;">[{code}]</p>

However as you can see from the attached sample we have included the proper Web way of doing it which also highlight the benefit of using HTML/Web to present output.

Here we use a free library to generate the Barcode and to all of you that have worked with barcodes know the vast benefit of that.

You don't have to calculate the barcode string as you can simply input the text/number you want for the barcode and the library calculate the barcode and present it. 

Below is the link to the one we used. There is plenty of them and you can use the same method for almost anythinng.

This ones support the following barcodes. 

  • 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

Written by DataEase 06/04/20 at 15:17:00 Dataease [{8}]FIVE