LinkOs java SDK getObjectFromPrinter method does not support long filenames

The `com.zebra.sdk.device.FileUtilLinkOs#getObjectFromPrinter(java.lang.String)` method incorrectly throws an exception when trying to retrieve an object with a filename longer than 8+3. I've done some debugging and it appears that this is caused by failing to send the last parameter of a `^HZO` command to enable long filename support. The code in question lives in `com.zebra.sdk.util.internal.ZPLUtilities#getHZO(...)`.

Steven Si
Hi David,

Hi David,

I just ran a simple test with the Link-OS SDK on an Android phone. The getObjectFromPrinter worked just fine. Here is the code snippet. The filename here is longer than 8+3.

    private void retrieveObjectFromPrinter(Connection connection)
        try {
            ZebraPrinterLinkOs printer = ZebraPrinterFactory.getLinkOsPrinter(connection);

            byte[] bytes = printer.getObjectFromPrinter("R:DEVTALKSNAMETAG.ZPL");

        } catch (Exception e) {
            // Do something

Not sure why you got an exception. Do you have the code snippet to share?


Vote up!
Vote down!

Points: 0

You voted ‘up’

Log in to post comments