Open zain-335 opened 10 months ago
i have the same problem
Having the same issue prints nothing but the paper cuts.
I have the same problem here
Hi @zain-335 @alfianlensundev @ranulrandombage I found the reason for this "bug". It's not related to the library but the electron itself.
Looks like the electron versions after 24x does not print the content when the silent mode is enabled.
Please take a look at these issues:
https://github.com/electron/electron/issues/17523 https://github.com/electron/electron/issues/31705
I've tested the library with electron 15x version and everything worked.
I'll proceed testing with all versions (from 15 to latest) and discover since when this bug is present.
Hi @aldoanizio,
Were you able to find a fix for this issue, I urgently need to find a solution for this, if not I might have to move to a different library :(
I tried upgrading electron v25.3.1 where they've mentioned that silent printing was fixed but the issue persists.
Hi @ranulrandombage I had to downgrade Electron to 15x version and everything worked!
To be more specific I'm using Electron v15.5.7. As you are using a newer version of Electron if you choose to downgrade be aware you have to change the function to catch the printers list.
In electron newer versions when you invoke the printers list function you receive a promise. In 15x version the function will return the printers list as an array of objects.
I'm using
@3ksy/electron-pos-printer
lib inside my electron react project to print receipts from main-process(nodejs). Printer is working only whenslient: false
. when i set thesilent: true
inside PrintOptions, it prints empty receipts. here is my code.Current Response