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
316 stars 101 forks source link

Documents larger than the electron window do not print completely. #100

Open hiagodotme opened 1 year ago

hiagodotme commented 1 year ago

Hello everyone, I tried to print a very large item and was surprised when the printer triggered the cut and did not finish printing it.

I noticed that this routine takes the size of the Electron window where the document was rendered. Putting a manual value of 4096 (much higher than the value I need, everything worked normally).

My thermal printer is 80mm.

How can I get around this?

https://github.com/Hubertformin/electron-pos-printer/blob/d01e9614c0cdb056143fbe6172124908878a0a78/src/main/post-printer.ts#L108

hiagodotme commented 1 year ago

I'm wrapping up my day for today, I'm going to make a fork and try to solve it. As soon as I get it I will send a pull request.

hiagodotme commented 1 year ago

@Hubertformin I sent the correction and performed the tests, if you can generate an npm version I would appreciate it.

josemmpgtim commented 1 year ago

Hello; how did you make the correction? I am having the same issue with last version