1

Im creating a div with my data and with the help of domttoimage getting image element and trying to send result to encoder!

domtoimage.toSvg(container, { width: 400, height: 240 }).then((dataUrl) => {
     let img = new Image(); 
     img.src = dataUrl;
      const result =  this.printerEncoder
         .initialize()
         .image(img, 400, 240, 'atkinson', 128) 
         .encode();

Then ive got an error 'undefined is not a function at CanvasDither.threshold at EscPosEncoder' on my device! Maybe someone know whats the point ?

Danyl
  • 61
  • 4

0 Answers0