tray
tray copied to clipboard
Support HID Fargo Card Printers
Summary
- I've reached out to Fargo for more information on the licensing restrictions of their API. If we have to pay to license each copy, it would have a domino effect on how we license our own product -- likely an addon to our white-label portal, if it ever comes to fruition.
- The API is pretty robust, but Windows only. At the time of writing this, Fargo hasn't added any new downloads for macOS or Linux since 2015.
- The API uses JNA 4.1.0 for memory exchange (e.g. String, Images) with its native library. Bundling it with QZ Tray may require some additional library shading.
- We're willing to share our Java source code with anyone else that's obtained an evaluation license, just ask.
The bad:
- SDK is for evaluation only; strictly prohibits distribution without a proper license
- SDK uses a bundled .dll, so despite it being available for Java, it's only compatible with 32-bit and 64-bit Windows.
- Despite the docs referring to the printer operating in "Raw" mode on port 9100, I can't find any documentation on how to actually use this. I have a feeling it's for the older hardware (such as when they offered drivers for Linux and macOS before 2015)
The good:
- SDK is just two .jar files and two .dll files, easy to add to a Java project.
- SDK ships with one of the best printer emulators I've ever used.
- Java SDK is fairly well documented in the bundled samples but the the JavaDocs need to be extracted manually from the JAR to get to the API descriptions.
- If encoding/status/advanced controls aren't needed, it appears you can print to it using standard Java APIs, which would work OK with QZ Tray's "Pixel" features.
The weird:
- The drawString routine is reliably cutton off my test text "JAVA TEST" as seen in the picture below.
- The "Track 2" magnetic data is ignored using the example they've provided.
- Since the API is written in C++, some things like adding images requires physical disk access or using JNA to convert to memory pointers, which is a bit unorthodox. This isn't a surprise, but can make for some really hard debugging if we ever were to integrate support for this printer.
