I just use Nodejs to send p-touch template code to QL-720NW.
i already followed the steps how to setup p-touch template.
Also, i try to use tojocky/node-printer to send commands to printer.
Here is my code,
var rawData = new Buffer([
0x1B, 0x69, 0x61, 0x33, // Use p-touch template
0x5E, 0x49, 0x49, // Initialize p-touch template
0x5E, 0x54, 0x53, 0x30, 0x30, 0x31, // Choose template 1
0x5E, 0x46, 0x46 // Start printing
, printer:'Brother QL-720NW' // printer name, if missing then will print to default printer
, type: 'RAW' // type: RAW, TEXT, PDF, JPEG, .. depends on platform
console.log("sent to printer with ID: "+jobID);
Finally, i found the core issue.
First, tojocky/node-printer can work with sending ESC/P to QL-720NW.
Secondly, the main issue is came from p-touch template. When you design the label layout. Each ui widget assigned Object name is required to inject a value. If you want a static object, you should remove Object name and tick a checkbox which force the widget cannot modify.
Thirdly, send a commands as follow
you can print it.
Sample Code: https://github.com/KingWu/NodePrinterExample