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
6 Replies
Yes
https://google.com
https://google.com">google.com
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.
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
I am having the same issue using a GK420D with .net framework 4.7.2
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:");
Thank you very much!