-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
I'm really struggling trying to get a brother HL-L5100DN to print using tray-2
It always defaults to tray 1 regardless of how I try to set it,
I must be missing something obviously wrong but I can't see it .....
var ipp = require("ipp");
var PDFDocument = require("pdfkit");
var doc = new PDFDocument;
doc.text("Hello World");
var buffers = [];
doc.on('data', buffers.push.bind(buffers));
doc.on('end', function () {
var printer = ipp.Printer("http://192.168.10.58:631/ipp/printer");
var file = {
"operation-attributes-tag":{
"requesting-user-name": "User",
"job-name": "Print Job",
"document-format": "application/octet-stream"
},
"printer-attributes": {
"media-col": {
"media-source": "tray-2"
},
},
"job-attributes-tag":{
"media-col": {
"media-source": "tray-2"
}
},
data: Buffer.concat(buffers)
};
printer.execute("Print-Job", file, function (err, res) {
console.log("Printed: "+res.statusCode);
});
});
doc.end();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels