@@ -3,6 +3,7 @@ import bwipjs from "bwip-js";
|
||||
|
||||
export const asyncHelpers = new AsyncHelpers();
|
||||
async function generateBarcode(str, options, emtpy, cb) {
|
||||
if (str == null) { cb(null, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+P+/HgAFhAJ/wlseKgAAAABJRU5ErkJggg=="); return; }
|
||||
let res = await generateBase64Barcode(options.toString(), str.toString());
|
||||
cb(null, res);
|
||||
}
|
||||
@@ -18,7 +19,7 @@ export async function generateBase64Barcode(type: string, content: string): Prom
|
||||
height: 10,
|
||||
width: 10,
|
||||
includetext: true,
|
||||
textxalign: 'center',
|
||||
textxalign: 'center'
|
||||
}
|
||||
if (type != "qrcode") {
|
||||
delete options.width;
|
||||
|
||||
Reference in New Issue
Block a user