Skip to content
On this page

print QR code

use

  • init: init the command
  • setSize: Set the width and length of the label paper
  • setGap: Set the vertical distance between two label papers
  • setCls: Clear the data of the image buffer
  • setQRCode: This command is used to print the QR code
  • setPrint: execute print
js
import printease from 'printease'
let tspl = new printease.tspl.TsplLib()
tspl.init()
tspl.setSize(60, 40)
tspl.setGap(0, 0)
tspl.setCls()
tspl.setQRCode(10, 10, 'L', 5, 'A', 0, '123456789')
tspl.setPrint(1)
console.log(tspl.getBuffer())