How to use jsbarcode - 5 common examples

To help you get started, we’ve selected a few jsbarcode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frappe / frappe / frappe / public / js / frappe / form / controls / barcode.js View on Github external
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();
	},
github bkorobeinikov / movieapp-ionic / src / shared / barcode.component.ts View on Github external
ngOnInit() {
        try {
            jsbarcode(this.svg.nativeElement, this.data, {
                format: this.format,
                width: this.width,
            });
        } catch (err) {
            console.error(err);
        }
    }
}
github taktik / icure-backend / web / icure-ht / app / src / elements / ht-pat / ht-pat-detail-ctc-detail-panel.js View on Github external
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);
github stone-payments / pos-mamba-sdk / packages / components / Barcode / Barcode.html View on Github external
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'),
      );
    },
  };
github xkeshi / vue-barcode / src / index.js View on Github external
generate() {
      if (this.$el) {
        JsBarcode(this.$el, String(this.value), this.options);
      }
    },
  },

jsbarcode

JsBarcode is a customizable barcode generator with support for multiple barcode formats.

MIT
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis

Popular jsbarcode functions