This is a template jsPDF in an ES module setup. It shall get used for a DYMO 36x89mm label printer.
Here there is a demo.
It does not work as an ES module in node.js, because JsPDF has an issue. So it is primarily for bundling into JS for the browser.
npm install
If you want the usable node package, you can install it via npm:
npm i jspdf-product-label -S
it is here https://www.npmjs.com/package/jspdf-product-label
Creates a bundle JS file which provides the global method printPDF()
.
For demonstration a docs GitHub page is build.
npm run build
npm run dev
npm run serve
npm test
Is done via GitHub action.
- raise version in
dist/package.json
A copy of the src dir is taken as artifact for the node package in the dist dir.
- Print components or template partials are placed in
src/print/partials
- Tools like
scaleDown
are placed insrc/print/utils