ZXP Series 7 with ZMotif SDK - Instructions for use?

D Dan kaufman 8 months 2 weeks ago
157 0 0

I have a ZXP Series 7 Card Printer with UHF. I am trying to print to it and encode RFID using an SDK.

I have landed on using the ZMotif SDK. Here is the only reference I can find: https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/software/card/zmotif-sdk-rm-en.pdf. Unfortunately, it is almost entirely useless. For example:

  • in the `InitGraphics` method, there is an optional `fillColor` parameter. What does this fill???
  • The example in `5.2.7 PrintGraphicsLayers` has the wrong number of parameters for calls to `BuildGraphicsLayers`
  • `5.2.5 BuildGraphicsLayers` has a parameter `int imgOpacity`. What are the bounds on this parameter?
    • It also has a parameter `GraphicsTypeEnum graphicType`, but does nothing to explain what these possible values mean or when to use them.
  • The list goes on....

I have been iterating on the following code, changing various parameters:
 

public static void Main()
    {
        ZMotifGraphics graphics = new ZMotifGraphics();
        graphics.ClearGraphics();
        graphics.InitGraphics(1006, 640, ZMotifGraphics.ImageOrientationEnum.Landscape, ZMotifGraphics.RibbonTypeEnum.Color, 0x4d254f);

        int text_color = graphics.IntegerFromColor(Color.Tomato);
        Console.WriteLine(text_color);
        //graphics.DrawFillRectangle(200, 100, 100, 100, text_color);
        //graphics.DrawTextString(50, 50, "HELLO, WORLD!", "dejavu", 20, ZMotifGraphics.FontTypeEnum.Regular, text_color);

        Job job = new Job();
        try
        {
            string deviceName = "12J232000056";
            short alarm = job.Open(deviceName);
        }
        catch (Exception ex)
        {
            string errMsg = ex.Message;
            Console.WriteLine(errMsg);
        }

        int bg_color = graphics.IntegerFromColor(Color.Transparent);
        Console.WriteLine(bg_color);
        job.BuildGraphicsLayers(SideEnum.Front, PrintTypeEnum.Color, 400, 400, 50, bg_color, GraphicTypeEnum.NA, graphics);

        int actionId;

        job.PrintGraphicsLayers(1, out actionId);
        job.ClearGraphicsLayers();
        job.Close();
        graphics.ClearGraphics();
        graphics.CloseGraphics();
    }

But so far all I've managed to print are these:
printed cards

Some of these were trying to print "Hello World", some were trying to print a rectangle, I've changed color values to all different things and it doesn't seem to change anything.

They're interesting, but they aren't the text or rectangle that I was trying to print. (the cards are perforated and hole-punched for our use-case. This does not seem to effect printing.)

I'm pretty much out of ideas. I tried the Link-OS SDK since that seems to be what Zebra is pushing really hard, but this printer is not fully compatible (or if you believe Zebra Support, it's not compatible at all, which just is not true. It's well hidden, but there's a page on the Zebra website explaining the restrictions when using Link-OS SDK with a non-Link-OS printer.)

I can print test cards from the controls on the printer, and I can print by just doing `File->Print` on an image file and sending it to the card printer. But I can't for the life of me get it to print what I want using code.

Questions

  • How can I use an sdk to print something useful? Literally I would start with a black square on a white background
  • How can I interact with the uhf module installed in my printer? I tried running the `ZXPUHFApp` that comes with the `ZXPSCReader SDK` but when I try to perform any of the UHF options, the printer positions the card, then an exception is thrown when trying to call `UHF.IM6eReader.connect()`. The UI Log shows "Error connecting to printer" and the output window shows:
12:35:07:653	Open connection 12J232000056
12:35:07:903	Open connection 12J232000056 Successful
12:35:11:640	Exception thrown: 'System.OverflowException' in ZMotifPrinter4cs
12:35:11:640	Exception thrown: 'System.OverflowException' in ZMotifPrinter4cs
12:35:11:640	Exception thrown: 'System.ArgumentNullException' in System.dll
12:35:11:640	Exception thrown: 'ZMotifPrinter4cs.Error' in ZMotifPrinter4cs
12:35:11:640	Exception thrown: 'ZMotifPrinter4cs.ZMotifException' in ZMotifPrinter4cs
12:35:11:640	Exception thrown: 'System.Exception' in ZXPSCReader.dll
12:35:11:640	Exception thrown: 'ZMotifPrinter4cs.Error' in ZMotifPrinter4cs
12:35:11:640	Exception thrown: 'ZMotifPrinter4cs.ZMotifException' in ZMotifPrinter4cs
12:35:11:640	CloseConnectionToPrinter - Close connection 

 

Please help me I am losing my mind.

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