Closed dantero00 closed 10 years ago
Yes, read the manual and send the cutter command to the printer. I did for Zebra printer at the moment when I initiated this project. Feel free to share your results.
Hi, you right.. sorry for not closing this issue.. i dont have computer until now...
I try to use the cutter but it doesn't cut... in the manual say this
GS V Select cut mode and cut paper Format: ASCII: GS V m (n) Decimal: 29 86 m (n) Hex: 1D 56 m (n) Description: (There is only one cut mode can be selected if the cutter can only realize one cut type.)
m=0, 48; No n parameter, Executes a full cut. m=1, 49; No n parameter, Executes a partial cut (with one point left in the middle). m=6, n=0~255; Feed paper to n(horizontal or vertical motion unit) and executes a full cut. m=66, n=0~255; Feed paper to n(horizontal or vertical motion unit) and executes a partial cut.
my code is this and doesnt work
var INITIAL_PRINTER = '\x1B\x40'; var PAPER_CUTTING = '\x1D\x56\x49';
function printZebra(barcode_text, printer_name){ printer.printDirect({data: new Buffer(INITIAL_PRINTER) + template + new Buffer(PAPER_CUTTING) + new Buffer(INITIAL_PRINTER) , printer: 'EC_Printer_EC-80320:4' , type: "RAW" , success:function(){ console.log("printed: "+barcode_text); } , error:function(err){console.log(err);} }); }
can you help me?
Use node.js Buffer if you want to send bytes.
Sorry, I missed that you already used Buffer. What about m variable? Is it in hex or in dec? I think you need to convert in hex, or you can send to buffer am array of dec values.
Sorry, I missed that you already used Buffer. What about m variable? Is it in hex or in dec? I think you need to convert in hex, or you can send to buffer am array of dec values.
it works... just convert 48 to hex... thank you
You are wellcome! Happy codding!
hi tojocky , i have a same problem!! can u pls help me!!!
Hi @DeepzSandra , as I mentioned above, use Buffer type instead of string.
Thank u so much!!! Jocky.....
there is a way to configure the automatic cutter? i use node printer with a mini printer