Image print from windows
Hello,
I am getting a blank page when doing:
var printer = require("printer");
var fs = require('fs')
printer.printDirect({data:fs.readFileSync('myimage.png')
, printer:'PDFCreator'
, type: 'RAW'
, success:function(jobID){
console.log("sent to printer with ID: "+jobID);
}
, error:function(err){console.log(err);}
});
i am on win7 x64.
any idea?
Type 'RAW' means that you send commands to the printer. On posix is possible to send images to CUPS printer, but not in windows.
will leave this issue open to track the image print on windows. Feel free to propose patch on this.
Printing an image with raw ESCP commands is a little more complex from as far as I know. The reason is because we need to send specific command to declare the image bytes array that will follow and that contains the image data. http://stackoverflow.com/questions/14099239/printing-a-bit-map-image-to-pos-printer-via-comport-in-c-sharp http://stackoverflow.com/questions/14530058/how-can-i-print-an-image-on-a-bluetooth-printer-in-android?lq=1 Most solutions online for this problem are in C# or Java. I am not very familiar with those two, in order to convert the script to nodejs/javascript code. Hope someone else can work on this in order to be able to print images.
This problem solved? I also want to print pictures, pictures above the following text
This problem solved? I also want to print pictures, pictures above the following tex
This problem solved? I also want to print pictures, pictures above the following text
did you manage to get printing images, bro? I'm also having the same problem!!