# Printing barcode to Zebra printer with Zebra API

**URL:** <https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 17, 2023, 10:26pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549 "2023-04-17T22:26:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shamsil\_Arefin](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Shamsil\_Arefin](https://forum.inductiveautomation.com/u/Shamsil_Arefin)\
**Post date:** [April 17, 2023, 10:26pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/1 "2023-04-17T22:26:10Z")

</div>

How can I get the Zebra API installed under ignition? Tried the jars in your Ignition gateway’s `../lib/core/common` and restart. Got error from the LicenseManager.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 17, 2023, 10:28pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/2 "2023-04-17T22:28:06Z")

</div>

> [@Shamsil\_Arefin](#):
>
> Got error from the LicenseManager.

What error?

What else have you tried?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 17, 2023, 10:39pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/3 "2023-04-17T22:39:31Z")

</div>

You might not need the SDK at all, if I remember correctly it doesn't actually give you a whole lot.

> [@Printing barcode to Zebra printer](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer/8957/26):
>
> No driver required. def printLabel(partNum, serialNum, printerIP, port): from java.net import Socket from java.io import DataOutputStream strMessage100 = '^XA' strMessage110 = '^BY3,3,60^FT065,120,^BCN,N,N,N,N^FDP%s^FS' % partNum strMessage111 = '^FT170,040^A0N,40,45^FD%s^FS' % partNum strMessage112 = '^FT065,260,^BCN,N,N,N,N^FDS%s^FS' % serialNum strMessage113 = '^FT170,170^A0N,40,45^FD%s^FS' % serialNum strMessage199 = '^PQ1,0,1,Y^XZ' strOut = strMessage100+strMessage110+strMessa…

---

<div class="post-metadata">

**Author:** ![Shamsil\_Arefin](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Shamsil\_Arefin](https://forum.inductiveautomation.com/u/Shamsil_Arefin)\
**Post date:** [April 17, 2023, 10:52pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/4 "2023-04-17T22:52:12Z")

</div>

Getting this error:

W [g.LicenseManager] [22:49:21]: Could not read license from HASP key. HASP login() failed. Last error = 14.

when I tried to copy all the jar into common.

Not sure what else I can try.

---

<div class="post-metadata">

**Author:** ![Shamsil\_Arefin](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Shamsil\_Arefin](https://forum.inductiveautomation.com/u/Shamsil_Arefin)\
**Post date:** [April 17, 2023, 10:53pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/5 "2023-04-17T22:53:31Z")

</div>

We can do it without the SDK, but out client want us to use the SDK.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 17, 2023, 10:55pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/6 "2023-04-17T22:55:39Z")

</div>

Nothing to do with copying the JAR into common, and it was always in your logs.

What are you expecting to happen after copying the JAR into common?

---

<div class="post-metadata">

**Author:** ![Shamsil\_Arefin](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Shamsil\_Arefin](https://forum.inductiveautomation.com/u/Shamsil_Arefin)\
**Post date:** [April 17, 2023, 11:14pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/7 "2023-04-17T23:14:53Z")

</div>

if I bring only ZSDK\_API.jar then I don't get that. Am I bringing the right JAR? And expecting to this to work.

> [@Printing barcode to Zebra printer](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer/8957/15):
>
> The java code works fine, we have similar code today printing to the zebra printers. Recently I have been exploring the Zebra API as well. I was able to easily install the jars into Ignition and do some printing with their native API. Its actually quite good. I’ll be switching over our current code to use their library in the future. If your using a newer zebra printer with LinkOS, the API code is even simpler and gives you a ton of options including full bi-directional status inf…

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 17, 2023, 11:17pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/8 "2023-04-17T23:17:09Z")

</div>

I don't know - do you have a link to this SDK and some documentation for it?

---

<div class="post-metadata">

**Author:** ![Shamsil\_Arefin](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Shamsil\_Arefin](https://forum.inductiveautomation.com/u/Shamsil_Arefin)\
**Post date:** [April 17, 2023, 11:19pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/9 "2023-04-17T23:19:40Z")

</div>

Using on Windows platform. Link below:

> **[Link-OS Multiplatform SDK | Zebra](https://www.zebra.com/us/en/support-downloads/printer-software/link-os-multiplatform-sdk.html)**
>
> Enables application creation on PCs, smartphones and tablets.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 17, 2023, 11:31pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/10 "2023-04-17T23:31:44Z")

</div>

You would likely need all the JARs, they are dependencies of the main API JAR.

---

<div class="post-metadata">

**Author:** ![Shamsil\_Arefin](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Shamsil\_Arefin](https://forum.inductiveautomation.com/u/Shamsil_Arefin)\
**Post date:** [April 17, 2023, 11:50pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/11 "2023-04-17T23:50:20Z")

</div>

Copied the ZSDK\_API.jar in the Ignition gateway’s `../lib/core/common` and restarted again, and this time it's working. Not sure why it wasn't working since yesterday. Taking all the JARs was causing the license manager to fail. Thanks for your Support.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 17, 2023, 11:55pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/12 "2023-04-17T23:55:39Z")

</div>

Whatever error you were getting was _not_ that LicenseManager _warning_. That happens on every Ignition install that doesn't have a hardware license key, which is essentially all of them.

---

<div class="post-metadata">

**Author:** ![Shamsil\_Arefin](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Shamsil\_Arefin](https://forum.inductiveautomation.com/u/Shamsil_Arefin)\
**Post date:** [April 18, 2023, 12:01am UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/13 "2023-04-18T00:01:57Z")

</div>

Every time I was putting all the JARs my log was ending with that error, and the designer wasn't loading. That's why I assumed it was the case. Appreciate your support.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 16, 2024, 4:26pm UTC](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer-with-zebra-api/72549/14 "2024-04-16T16:26:55Z")

</div>

Split this topic on April 16, 2024, 4:26pm UTC

A post was merged into an existing topic: [Printing barcode to Zebra printer](https://forum.inductiveautomation.com/t/printing-barcode-to-zebra-printer/8957/28)
