New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error of use printer.printDirect #116
Comments
Use type: "TEXT" On Tue, 16 Feb 2016, 08:47 jin-pan notifications@github.com wrote:
|
I use every options of the type for test,The error still occur. and i use another pdf pinter: my test code is: =========================================================
=========================================================
var printer = require("node_printer"),
util = require('util');
console.log("supported formats are:\n"+util.inspect(printer.getSupportedPrintFormats(), {colors:true, depth:10}));
console.log('default printer name: ' + (printer.getDefaultPrinterName() || 'is not defined on your computer'));
printer.printDirect({data:"print from Node.JS buffer" // or simple String: "some text"
//, printer:'Foxit Reader PDF Printer' // printer name, if missing then will print to default printer
, type: 'TEXT' // 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);}
});
=========================================================
========================================================= the console show:
Help!!! |
Hi,tojocky: if i use this: printer.printDirect(1,1,1,1,1,1,1); the error catch is: so i think the error is on arguments passing and receiving. Please help to give same advise about the error. |
Strange, only you have this issue. Recompile and let me know what do you have. |
oh! one year is pass! thank you tojocky. you are a good gay! |
same problem here. |
Setting my default printer fixed this for me. |
i build the module with nw.js 0.12.3 (winXP-32) use nw-gyp0.13.0 and node.js 5.4.1.
my test code is :
`var printer = require("node_printer");
console.log('default printer name: ' + (printer.getDefaultPrinterName() || 'is not defined on your computer'));
the "printer.getDefaultPrinterName()" can return the printer name of "PDFCreator".
but it catch error when "printer.printDirect".
the error show in cosole is:
"
Uncaught TypeError: Expected 5 arguments
(anonymous function)
"
what's wrong of it??
The text was updated successfully, but these errors were encountered: