ZebraPrinterLinkOs always null

A Alex Alex 3 years 7 months ago
132 6 0

Hello,
Can you help me please,
I want  upload my fonts from android device to the printer memory.
in the code below, object ZebraPrinterLinkOs  always null . Where is my problem?(I'm using printer zd410)

Connection connection = new BluetoothLeConnection(macAddress, this);
ZebraPrinter printer = ZebraPrinterFactory.getInstance(PrinterLanguage.ZPL, connection);
Thread.sleep(10000);
ZebraPrinterLinkOs linkOsPrinter = ZebraPrinterFactory.createLinkOsPrinter(printer, PrinterLanguage.ZPL);
linkOsPrinter.downloadTtfFont("/storage/emulated/0/fonts/DroidItalic.ttf", "Z:");  // exception, linkOsPrinter is null

Thank you in advance

Please Register or Login to post a reply

6 Replies

n nyan gali
Y Yanis Dalabiras

Hi MJ, The GK420D is not a Link-OS printer. You will only be able to use the functions in the ZebraPrinter class with that printer.

A Alexander Palchikov

Hello Matt,
Could you provide more details, please?Which code do you use for that?As far as I understand you use Xamarim for Android, correct? 
Alexander PalchikovSoftware Engineer, Kutir MobilityPosted on behalf of Zebra Technologies

M Matt Jensen

I am having the same issue using a GK420D with .net framework 4.7.2

Y Yanis Dalabiras

Hi Alex,
You need to open the connection before using the ZebraPrinterFactory.  It checks a few settings on the printer to set up the ZebraPrinterLinkOS object.  You also don't need the 10 second sleep after creating the ZebraPrinter.
Something like this should work:
Connection connection = new BluetoothLeConnection(macAddress, this);connection.open();ZebraPrinter printer = ZebraPrinterFactory.getInstance(PrinterLanguage.ZPL, connection);ZebraPrinterLinkOs linkOsPrinter = ZebraPrinterFactory.createLinkOsPrinter(printer, PrinterLanguage.ZPL);linkOsPrinter.downloadTtfFont("/storage/emulated/0/fonts/DroidItalic.ttf", "Z:");

A Alex Alex

Thank you very much!

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