node-printer
node-printer copied to clipboard
Printer not printing anything
I've been unsuccessful in getting a printout from the sample script. Tried everything but still can't figure out how to get a simple "Hello World" printed out with a default printer.
My default printer is setup like this and using the /examples/print_raw.js
I've tried all possible dataType settings to send a print job but still no luck. If I use 'XPS2GDI' only then does a print happen but text is all gibberish. For all other dataTypes the script creates a new job but doesn't send anything to the Print Job Queue.
Do I have to convert text to PCL/PDL or EMF before hand and then run the printDirect() method?
Some light on this would be really nice.
I got the same issue :/
@FlorianBELLAZOUZ I had raised this issue and got no response from Ion @tojocky. Some light on this would be really helpful.
Sorry i don't find solution
I started a project https://github.com/tojocky/node-pdfium , but unfortunately, I don't have time to finish with a proper test. So far I managed to compile in node google pdfium but didn't test with node-printer.
If you have time, feel free to propose patches.
Same issue. On Windows XPS2GDI the only type with which printer is working. RAW type do nothing. TEXT and other types throws error: StartDocPrinterW error: code: 1804, message: The specified datatype is invalid.
@tojocky any updates on this? i'm running into the same problem like the others.
Same problam
I cannot print on Windows 10, too. Not even with XPS2GDI.
When i run the following script:
var printer = require('printer');
printer.printDirect({
data:'fs.readFileSync(filename)',
success:function(jobID){
console.log("sent to printer with ID: "+jobID);
},
error:function(err){
console.log(err);
}
});
The print job list only shows for a few milliseconds the currently sent print job and then the job disappears without printing and any error message.
I don't know what to do...
@Batajus I've noticed this happens when you send invalid data to the printer. Unclear to me whether this is a case that could be handled by node-printer
@thealexbaron I'm a bit confused, i tried it on Windows 7 and the script does work there o.O Either the data are invalid on Windows 10 or something else is not working correctly.
@Batajus Do you have a working sample with the data that you passed to the printer? It would be great to see what we are doing wrong?
I have used printDirect with RAW data type on thermal receipt printer (model BEIYANG BTP-2002NP) the printDirect success method runs and logs successfully on console and the job sent to printer but printer does not print , If I order print manually to print it prints the last job was sent to him from printDirect method, How should I fix this?
I have the same problem. Please give an update on this issue.
Same here, everything goes fine and seems to work properly, but no printing. Windows
Same on MacOS
Hi, there is no solution for this problem? please I need help
Same on Window 10. It not work with any printer in list although it go to til success funtion callback.
I have the same problem