jspdf-barcode
Advanced tools
Comparing version 0.1.7 to 0.1.8
{ | ||
"name": "jspdf-barcode", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "barcode generator plugin for jspdf", | ||
@@ -5,0 +5,0 @@ "main": "dist/jspdf-barcode.js", |
@@ -16,6 +16,8 @@ # Demo | ||
## Use | ||
## Ussage | ||
### ES6 | ||
``` | ||
import { jsPDF } from "jspdf"; | ||
import jsPDF from "jspdf"; // please use default import | ||
import "jspdf-barcode"; | ||
@@ -34,2 +36,19 @@ | ||
### CJS | ||
``` | ||
const { jsPDF } = require("jspdf") | ||
require("jspdf-barcode") | ||
const doc = new jsPDF() | ||
doc.barcode("barcodeValue", { | ||
fontSize: 23, | ||
textColor: "#000000", | ||
x: 5.4, | ||
y: 25.5, | ||
textOptions: { align: "center" } // optional text options | ||
}) | ||
doc.setFont("Courier"); // reset font to your font | ||
``` | ||
## Support | ||
@@ -36,0 +55,0 @@ Currently only support Code 128 Barcode |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
62364
61
0