Issue downloading fonts from Android App to iMZ320 Printer

L Laks Chanamolu 2 years 11 months ago
7 1 0

Hi,

We need to download a new font on to our field printers. I am trying to embed this into an Android app. I copied the ttf file to Assets folder and used the below code.

ZebraPrinterLinkOs linkOsPrinter = ZebraPrinterFactory.createLinkOsPrinter(printer, PrinterLanguage.ZPL);InputStream stream = getAssets().open("myfont.ttf");linkOsPrinter.downloadTtfFont(stream, "Z:myfont");

The prints spits out almost all of a paper role (nothing actually getting printed) for about 20 mins and in the end no font is downloaded to printer.

If I print configuration label I see some thing like below.

I can install the TTF into my windows desktop successfully and use "Zebra Font Downloaded" push the font successfully via USB. But unfortunately because of the number of printers we have in field doing this is not an option.

I can not find a Android sample code for font download as well. Not sure what is wrong with my code/approach. Any help is greatly appreciated.

Thanks
Laks.

Please register or login to post a reply

1 Replies

D Dmitry Prokhorov

Hello Laks,

As I can see in documentation: ZebraPrinterFactory.createLinkOsPrinter(ZebraPrinter genericPrinter, PrinterLanguage language)​
​This method will not query the printer for its control language and will use a language value that you provided. So you need to be sure your printer is configured to use ZPL language.

You can check it and set to ZPL with following SGD commands:
! U1 getvar "device.languages"
! U1 setvar "device.languages" "zpl"

You may need to read Best Practices For Printing document that covers such kind of issues.

Dmitry Prokhorov
Software Engineer, Kutir Mobility
Posted on behalf of Zebra Technologies

CONTACT
Can’t find what you’re looking for?