1

Nodejs を使用して、p-touch テンプレート コードを QL-720NW に送信するだけです。

私はすでにp-touch template をセットアップする手順に従いました。

また、tojocky/node-printerを使用してコマンドをプリンターに送信しようとしています。

ここに私のコードがあります、

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.printDirect({
     data: rawData
     , printer:'Brother QL-720NW' // printer name, if missing then will print to default printer
     , type: 'RAW' // type: RAW, TEXT, PDF, JPEG, .. depends on platform
     , success:function(jobID){
        console.log("sent to printer with ID: "+jobID);
   }
   , error:function(err){console.log(err);}
});

ただし、プリンターは常に失敗し、赤く点滅します。兄弟の技術サポートに電話して、技術仕様を検索してください。アイデアが見つかりません。誰でもアイデアがありますか?

4

1 に答える 1