Hubertformin / electron-pos-printer

Electron-pos-printer is a plugin that works to ease paper formatting and printing to thermal printers. it currently supports 80mm, 78mm, 76mm, 58mm, 57mm and 44mm printers thermal printers. it is built with Electron.js and Node.js
Apache License 2.0
318 stars 102 forks source link

Error: height and width properties must be minimum 352 microns. #81

Closed melhadidy572 closed 2 years ago

melhadidy572 commented 2 years ago

Hi, appreciate your support, I'm using electron-pos-printer 1.3.4 in vue/electron project, when I trigger it it give me this error in the console. -->Error: height and width properties must be minimum 352 microns.

Hubertformin commented 2 years ago

Hello @melhadidy572 Can I see your code with a screenshot of the error stack?

noah2000 commented 2 years ago

@Hubertformin
Electron[7144:113857] Warning: Expected min height of view: (<NSPopoverTouchBarItemButton: 0x7f9456a49a50>) to be less than or equal to 30 but got a height of 32.000000. This error will be logged once per view in violation.|

noah2000 commented 2 years ago
const options = {
    preview: false, 
    margin: "auto", 
    copies: 1, 
    printerName: "EPSON LQ-310", 
    timeOutPerLine: 1000,
    pageSize: "80mm",
  };

when preview = false node: v14.18.3 electron: ^10.0.0"

Error: height and width properties must be minimum 352 microns. at WebContents._.print (electron/js2c/browser_init.js:157:7237) at /Users/admin/Documents/project/**/electron-printer/node_modules/electron-pos-printer/dist/index.js:1:2307

Hubertformin commented 2 years ago

Okay, Thank you. I will look into that.

Hubertformin commented 2 years ago

Hello @noah2000 and @melhadidy572. The issue has been resolved. You should update to v1.3.6