Open jink2005 opened 5 years ago
I use Base64 lib from third party replace the btoa to solve this problem. this.printRaw = function (data, printer) { // var request = {a: "printraw", printer: printer, data: btoa(data)}; var request = {a: "printraw", printer: printer, data: BASE64.encode(data)}; sendAppletRequest(request); };
Print Chinese Character will get following error: Error: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
Maybe need encodeURIComponent and decodeURIComponent.