Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ipp = require("ipp");
- var Printer = ipp.Printer("http://printer.example.com:631/ipp/print");
- var fs = require("fs");
- var document;
- fs.readFile("testfile.txt", function(err, data) {
- if (err) throw err;
- document = data;
- });
- var msg = {
- "operation-attributes-tag": {
- "requesting-user-name": "John Doe",
- "document-format": "text/plain"
- },
- data: document;
- };
- printer.execute("Print-Job", msg, function(err, res) {
- console.log(err);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement