ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

How to Print Barcode Labels


I need help on how to print barcode labels.

I have designed a print format that contains just the product name and barcode

The barcode is contained in an html script that converts the barcode number to barcode symbols.

Works well and prints out the barcode as wanted.

Unfortunately the only barcode font that works for me is “Libre Barcode”, this font is not scanable by all barcode scanners.

So though it prints, it is not scanning, basically useless.

I would appreciate any idea on a way forward.



@olamide_shodunke if you think in use an printer label, print node can help you


Thanks Max

have you used it to print barcode label before?



@olamide_shodunke using Zebra printers yes!


how to use this API



I am currently trying to setup one for a while now with no luck. Please would be kind enough to share your custom script for the barcode thing itself. Several test i have done seem not to be scanning.



dear anyone has an update on this


Just throwing it out there.

I made something like this and added to the Item dashboard section. It uses the same JS library that frappe uses, lindell/JsBarcode to render EAN13 barcodes. To download the label, I used tsayen/dom-to-image. So apparently, generating images won’t work on Safari or IE.


I also added a menu item to generate valid EAN13 barcodes by hashing the item_code. I hope I’m not breaking any laws generating pseudo random EAN13 codes.



Looks good @sunhoww

Would you mind giving us a step by step on this ?

Especially on how you created the menu item to generate Valid EAN13 barcodes



This is excellent. You captured all relevant information in the print format. Thank you.


To render the label,

  • I created an HTML template along with some CSS styles in the same repo
  • Fetch barcode data from a whitelisted python method

Everything else is pretty much here


Another older barcode related thread