Converting Base64 String to ZPL in Android

Tags: 

There's a of a chance that this question has been asked in a different way but this is the scenario. Using a webview on Android, we are loading a webpage that has a button that sends a base64 string to our android app for print. I need to figure out a way to convert the Base64 to ZPL and send it to a ZQ630 Printer that we are currently using.

The options I'm considering - converting the base64 to PDF (within Android ) then to ZPL for print. ---side note, I'm curios if the ZQ630 can also print the PDF directly.

Any suggestions will be highly appreciated.

Thanks.

Alexander Palchikov
Hi Victor,There is no such a

Hi Victor,

There is no such a thing like the Base64 to ZPL conversion per se. Base64 is a format for arbitrary binary payload and ZPL is a printer language. It highly depends on what exactly do you have encoded as Base64.

In case you need to print your Base64-encoded payload then your android app will have to decode it and print it using LinkOS SDK. It could be a PDF, image or prepared label format. It depends on your needs.

It could be not the optimal way to generate and print PDF. There is a chance you will successfully print your payload as ZPL prepared label. Please, see LinkOS SDK and Zebra Designer documentation .

Alexander Palchikov
Software Engineer, Kutir Mobility
Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Victor Okoye
Corrections

My apologies, I had written Base64 - Instead of Base64 String. So basically, we are receiving a Base64 Label String from UPS, that when decoded should show a ZPL Label string that we then feed to the ZQ630. issue is that the conversion on our app is not going as it should. Does Zebra provide any SDK that handles this?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Alexander Palchikov
Hi Victor,

Hi Victor,

Please, confirm if I understand you correctly. You have a text (not an image or anything else, it’s just a text) that is converted to Base64. 

And you want to print that text, right?

If so, you need to use the native methods to convert Base64 string to a text and then send it to printer.

 

Alexander Palchikov

Software Engineer, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments