I have a program where I am sending command to the printer using IPP protocol from a node.js server. I am using here
var ipAddress='127.0.0.1';
var Printer = ipp.Printer("http://".concat(ipAddress).concat("/ipp/print"));
var dt = "";
dt = dt.concat("SINCOS Vending Machine Demo.\n\r", "Contact: ", phone, "\n\rProduct: ", product, "\n\rQuantity: ", quantity, "\n\rPrice: ", price, "\n\r");
var buffer1 = new Buffer(dt, 'utf8');
var msg = {
"operation-attributes-tag": {
"requesting-user-name": "John Doe"
},
"job-attributes-tag": {
"media": "na_letter_8.5x11in"
},
data: buffer1
};
Printer.execute("Print-Job", msg, function (err, suc) {
return res.send({error: false, message: suc});
});
Here I need to add a barcode or an image that also will be printed in the same document. How can I do it?