A Programmer's Dream

Binary Encoded Strings & Zebra printers....

Posted by Stephen Wrighton on 30 Jul 2007

We built a little application which talks to UPS via XML to print out their shipping labels. Well, until a few days ago, this portion of the application worked perfectly, and we had never had any troubles with it. Basically, all of a sudden, the printer stopped printing the labels.

So I spent a few days hunting through the logic looking for a problem. Didn't find a thing wrong.

Then I checked the Application Log, hunting for any errors listed. Nothing.

Sent the XML messages that I send/receive off to UPS. Still nothing wrong.

Today, I pulled out the relevant bits of program, and toss it into a new app, just to print these labels. No XML communication. No XML Parsing. I supply the base64 encoded string to the app, and it converts it and prints it.

So, what do I get? Nothing.

Finally, I try sending printer codes without conversion. Again, nothing.

Of course all of these things are done using the Zebra's programming codes for the Thermal 2844. Basically, I have to open the port and then write out to it directly.

Alternatively, whenever I open the printer through traditional .NET printing classes and print using those, then it works perfectly, and the printer obediently spits out the text as ordered.

I am now, officially, smacking my head up against the wall. And of course, Google is less than useless for this.

Tweet me @kidananubix if you like this post.