ipp
ipp copied to clipboard
When the data contain Chinese characters, the printed result is garbled
var printer = ipp.Printer("http://192.168.0.123:631/lp1", {version:"1.0"});
var msg = {
"operation-attributes-tag": {
"requesting-user-name": "William",
"job-name": "My Test Job",
"document-format": "text/plain"
},
data: new Buffer("中文内容 will be garbled", "utf-8")
};
printer.execute("Print-Job", msg, function(err, res){
console.log(err);
console.log(res);
});
If data like above contains Chinese characters, the printed result will be garbled. Please Help.
I don't have using the print language attributes, so- I'm not 100% sure on this... but:
The operation-attributes-tag section has some defaults you can mess with:
-
"attributes-natural-language"(defualten-us) -
"attributes-charset"(defaultutf-8... you should be ok here)
Let me know if you get this working. I wish I had more suggestions.
did u solve that?
I'm having the same problem. Did you find a solution?