Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get_barcode_html(value) {
// Get svg
const svg = this.barcode_area.find('svg')[0];
JsBarcode(svg, value, this.get_options(value));
$(svg).attr('data-barcode-value', value);
return this.barcode_area.html();
},
ngOnInit() {
try {
jsbarcode(this.svg.nativeElement, this.data, {
format: this.format,
width: this.width,
});
} catch (err) {
console.error(err);
}
}
}
splitColumns.forEach((c, idx) => {
if (idx) {
pdf.addPage();
}
const element = this.root.querySelector("#barCode");
JsBarcode(element, rids[idx].rid, { format: "CODE128A", displayValue: false, height: 75 });
var jpegUrl = element.toDataURL("image/jpeg");
pdf.addImage(jpegUrl, 'JPEG', 20, 10, 257.576, 57);
pdf.setFontSize(7);
pdf.setFont('Arial');
pdf.text(center(pdf, 148.56, rids[idx].rid, 7), 69, rids[idx].rid);
pdf.setFontSize(9);
pdf.setFont('Arial');
pdf.text(center(pdf, 148.56, "PREUVE DE PRESCRIPTION ÉLECTRONIQUE", 9), 87.5, "PREUVE DE PRESCRIPTION ÉLECTRONIQUE");
pdf.setFontSize(9);
pdf.setFont('Serif');
pdf.text(center(pdf, 148.56, "Veuillez présenter ce document au pharmacien pour scanner le ", 9), 105, "Veuillez présenter ce document au pharmacien pour scanner le ");
pdf.setFontSize(9);
pdf.setFont('Serif');
pdf.text(center(pdf, 148.56, "code-barres et délivrer les médicaments prescrits", 9), 116, "code-barres et délivrer les médicaments prescrits");
pdf.setFontSize(9);
oncreate() {
const { data, height, barWidth: width } = this.get();
if (!reusableCanvas) {
reusableCanvas = document.createElement('canvas');
}
generateBarcode(reusableCanvas, data, {
width: cssStrToNumber(width),
height: cssStrToNumber(height),
displayValue: false,
margin: 0,
});
this.refs.barcodeImg.setAttribute(
'src',
reusableCanvas.toDataURL('image/jpeg'),
);
},
};
generate() {
if (this.$el) {
JsBarcode(this.$el, String(this.value), this.options);
}
},
},