electron-pos-printer icon indicating copy to clipboard operation
electron-pos-printer copied to clipboard

Cash drawer

Open GODAsderel opened this issue 5 years ago • 9 comments

Hi, is there a way to pass null arguments so that the printer detects there is a new object to print so that the cash drawer opens but doesn't actually print? I tried to pass null arguments but the printer prints a small paper size. As always thanks!

GODAsderel avatar Nov 15 '20 18:11 GODAsderel

@GODAsderel

I'm having this problem too, but my printer is printing a large paper, could you give me a sample code?

rafaelvaloto avatar Nov 15 '20 19:11 rafaelvaloto

@GODAsderel

I'm having this problem too, but my printer is printing a large paper, could you give me a sample code?

I'm using:

const options = {
    preview: false,               // Preview in window or print
    width: '100%',               //  width of content body
    margin: '0 0 0 0',            // margin of content body
    copies: 1,                    // Number of copies to print
    printerName: arg.printerName,        // printerName: string, check it at webContent.getPrinters()
    timeOutPerLine: 400,
    silent: true
  }

and then

PosPrinter.print(data, options)
  .then(() => {})
  .catch((error) => {
      console.error(error);
    });

in data I'm using let data = [] so it prints nothing, but it stills prints me a little piece of paper. Hope it helps you

GODAsderel avatar Nov 15 '20 19:11 GODAsderel

I need a way to send 27,112,0,25,255 cash drawer kick code

GODAsderel avatar Nov 19 '20 16:11 GODAsderel

@GODAsderel is there any possibilities to kick cash drawer?

jayan2019 avatar Dec 19 '20 12:12 jayan2019

I still don't know :disappointed:

GODAsderel avatar Dec 19 '20 13:12 GODAsderel

这个能发送打切纸和打开钱箱命令吗

koarcoxw avatar Jan 23 '21 14:01 koarcoxw

Hello @GODAsderel, Please forgive my extremely late reply. Are you still facing this issue?

Hubertformin avatar Oct 28 '22 06:10 Hubertformin

这个能发送打切纸和打开钱箱命令吗

Unfortunately not, it can't send cut paper events at the moment

Hubertformin avatar Oct 28 '22 06:10 Hubertformin

Unfortunately not, it can't send cut paper events at the moment

It's not possible to implement it or do you need help doing it? Maybe I can help, any directions on where should I start?

GuilhermeAmado avatar Dec 04 '22 01:12 GuilhermeAmado