Printing Barcoded fields on Custom Print Format

I’m trying to setup our Sales Order Custom Print to include a barcoded version of the SO-??? number.

There’s discussion on doing this from 2013: https://discuss.frappe.io/t/barcode-on-sales-invoice/1409

But it isn’t useful as it refers to downloading and using a barcode font and simply setting that font in the Custom Print Format code. As client side rendering is no longer supported this isn’t possible to use client OS barcode font.

Does the frappecloud server (hosted ERPNext option) have barcode fonts resident which I can use in my HTML on the Custom Print Format?

Thanks
Liam.

There was another discussion on this recently:

https://discuss.frappe.io/t/feature-request-barcode-generator/4497/2

Will be great if someone can integrate pyBarcode and send a pull-request.

Thanks rmehta, so there’s no server side barcode fonts we can just call in the HTML/Javascript within the custom print format? I tried a few commonly used font codes like code39 but it didn’t work - simply printed the text in the default font.

Our current Sales Order print has the number barcoded so I need to get this running before we migrate off the legacy system.

You should try the python lib. We have no experience. Do report what worked for you!

just for Quick workaround…

you could setup a custom HTML field in Print format builder and insert the following

<img src="http://www.barcodes4.me/barcode/c128a/{{ doc.name }}.png?IsTextDrawn=1?alt="barcodedecname"?style="width:200px;height:100px;"?draggable="false">

this example retrieves a Barcode image converted from the doc.name as Barcode 128a

7 Likes

Thanks spa, that’s exactly what we used - in fact I posted an updated thread here:

This one should probably be closed - @rmehta ?

6 Likes