Hello,
Request to printer fails when printed from a web page (firefox) and if it contains special characters. Sample content in the string is "1DFDX_1Dz_1D8_1D_Ï_87_ñ_04>_83_ÿ@_1E_04" . Same works when printed from notepad.
I am doing base64 decoding of the string in javascript in this way :
var decodedata = window.atob(zpl);
Please suggest. Thanks
Special Characters are not printed on zpl500 from browser, works from notepad |
3 Replies
Hi, When you say you are printing from a browser, do you mean with a driver, Browser Print, or HTTP POST direct? You do not need to base64 encode the strings at all. Only images can be B64 encoded.
Hi Robin,
Thanks for your response. I am printing from browser with Generic/Text Printer drivers. I also tried using the page - "Print ZPL from browser - JSFiddle" (which i found online)
I was able to do some progress and was able to print a portion of that string. Like for ex:
^XA
^FO21,400^BY2,2^B7N,10,5,14^FH^FWN^FH^FD[)>_1E01_1D0299502_1D840_1D019_1D794642608996_1DFDEG_1D8000288_1D321_1D_1D1/1_1D9.00LB_1DN_1D6700 Jewel L^FS
^XZ
The above code Prints fine but the below code doesn't print
^XA
^FO21,400^BY2,2^B7N,10,5,14^FH^FWN^FH^FD[)>_1E01_1D0299502_1D840_1D019_1D794642608996_1DFDEG_1D8000288_1D321_1D_1D1/1_1D9.00LB_1DN_1D6700 Jewel Lake Rd_1DAnchorage_1DAK_1DManager on Duty_1E06_1D10ZGD009_1D11ZMy Grill_1D12Z9072430507_1D20Z_1C_1D31Z9622001900008000288000794642608996_1D34Z01_1D9KMXL1091XCW_1D_1E_04^FS
^XZ
I have made the text bold as from where the printer stopped working. As I said earlier everything gets printed fine through notepad
Seems like its not the special characters that are causing the issue but the following set of commands. The below string doesn't have any special characters but still printer doesn't do anything when printed from browser. I removed it and rest of the label prints fine.
^FO21,400^BY2,2^B7N,10,5,14^FH^FWN^FH^FD[)>_1E01_1D0299502_1D840_1D019_1D794642608996_1DFDEG_1D8000288_1D321_1D_1D1/1_1D9.00LB_1DN_1D6700 Jewel Lake Rd_1DAnchorage_1DAK_1DRestaurant Manager on Duty_1E06_1D10ZGD009_1D11ZKincaid Grill_1D12Z9072430507_1D20Z_1C_1D31Z9622001900008000288000794642608996_1D34Z01_1D9KMXL1091XCW_1D_1E_04^FS