NielsLeenheer / ReceiptPrinterEncoder

Create a set of commands that can be send to any receipt printer that supports ESC/POS or StarPRNT
MIT License
141 stars 13 forks source link

cutting #18

Closed ndr82 closed 4 hours ago

ndr82 commented 1 year ago

it cuts before it finishes print what it is going to write.

FouadRaheb commented 8 months ago

Same issue here, did you figure it out?

joshuayoes commented 5 months ago

I got a better cut by adding a few vertical tabs before the cut call

  .raw([0x1b, 0x64, 0x04]) // CTL_VT Vertical Tab
  .raw([0x1b, 0x64, 0x04]) // CTL_VT Vertical Tab
  .cut("full")
  .encode();
joshuayoes commented 5 months ago

This node-thermal-printer has some constants that are handy for this type of thing:

https://github.com/Klemen1337/node-thermal-printer/blob/master/lib/types/epson-config.js

NielsLeenheer commented 4 hours ago

This should be fixed in the upcoming version 3.

It includes a way to configure the number of lines you want to feed before cutting. And it has default values for a whole bunch of populair printers.