javascript - Generate barcode from text and convert it to base64 -


does knows tool generate barcode image (preferably code 39) string , converts base64 string, use this:

var text = "11220"; // text convert var base64str = texttobase64barcode(text); // function convert input          // image formated in base64 string "data:image/jpeg;base64..." 

?

using jsbarcode function want.

function texttobase64barcode(text){   var canvas = document.createelement("canvas");   jsbarcode(canvas, text, {format: "code39"});   return canvas.todataurl("image/png"); } 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -