1.2.1 • Published 3 months ago

jspdf-product-label v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

jsPDF Product Label

It shall get used for a DYMO 36x89mm label printer.

Here there is a demo how that print is looking like.

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.

Install

  1. npm i jspdf-product-label -S

Usage

Should look like this:

import { printPDF } from "jspdf-product-label";

document.querySelector(".js-print-pdf").addEventListener("click", function() {
    /**
    * @type {PrintData} check PrintData interface in src/print/index.d.ts
    */
    const printData = {
        "logo": logoLandscapeString,
        "productName": "Big Shovel",
        "productColour": "midgrey",
        "bulletPoints": [
            "1. Point one",
             "2. Point two",
            "3. Point three",
            "4. Point four",
            "5. Point five"
        ],
        "productCode": "DX.123-456-$4",
        "qrCode": qrCodeString,
        "productId": "12345"
    }
    
    printPDF([
        printData
    ]);
});
1.2.0

3 months ago

1.1.3

3 months ago

1.2.1

3 months ago

1.1.1

3 months ago

1.0.2

3 months ago

1.1.0

3 months ago

1.0.1

3 months ago

1.0.8

3 months ago

1.0.7

3 months ago

1.0.6

3 months ago

1.0.5

3 months ago

1.0.4

3 months ago

1.1.2

3 months ago

1.0.3

3 months ago

1.0.0

3 months ago

0.3.5

3 months ago

0.3.4

3 months ago

0.3.3

3 months ago

0.3.2

3 months ago

0.3.1

3 months ago

0.3.0

3 months ago

0.2.0

3 months ago