We are trying to updgrade the SDK of epson, which is deprecated since a long while.
We were using the old ePOS-Print SDK (com.epson.eposprint) package and we began havin
For anyone still struggling with this, I've found a solution that seems to do the job without re-writing the library.
You should end up with a library you can reference from other projects and make use of the Com.Epson.Epos2
namespace and all the classes within it.
For reference, most of the useful constants are accessed through the Com.Epson.Eposdevice namespace
. e.g. Com.Epson.Eposdevice.Printer.Printer.LangEn
Note: There is no default DiscoveryListener
class, so you would need to build your own if you go down that route.
Also worth remembering most Java projects use camelCaseFormatting
for their method names, so when copy/pasting examples from the documentation (which is woeful), don't forget to change your methods to TitleCaseFormatting
.
Also, Also: I keep getting an error with global::Com.Epson.Epos2.Printer.LogoKeyCode
not existing for whatever reason. A temporary solution is to add the following line to the MetaData.xml
file in the Bindings Library's Transforms
folder:
<remove-node path="/api/package[@name='com.epson.epos2.printer']/class[@name='Printer']/method[@name='getLogoList' and count(parameter)=0]"/>
EDIT : Solution is to make sure all objects with no visibility keywords in the SDK is fixed with the Metadata.xml Transforms file, this way:
<!-- On enlève l'ancienne classe du package qui ne sert plus à rien, juste pour la migration -->
<remove-node path="/api/package[starts-with(@name, 'com.epson.epsonio')]" />
<!-- Need to change the visibility of many ommited classes visibility in jar epos -->
<attr path="/api/package[@name='com.epson.eposdevice']/class[@name='NativeDevice']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice.commbox']/class[@name='NativeCommBox']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice.commbox']/class[@name='NativeCommBoxManager']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice.keyboard']/class[@name='NativeKeyboard']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice.printer']/class[@name='NativePrinter']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice.scanner']/class[@name='NativeScanner']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice.simpleserial']/class[@name='NativeSimpleSerial']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice']/class[@name='DeviceInnerImplement']"
name="visibility">protected</attr>
<attr path="/api/package[@name='com.epson.eposdevice']/class[@name='NativeDevice']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.epos2.printer']/class[@name='CommonPrinter']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.epos2.printer']/class[@name='LogoKeyCode']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.epos2']/class[@name='NativeInitializer']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.epos2']/class[@name='OutputLog']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice.display']/class[@name='NativeDisplay']"
name="visibility">public</attr>
<attr path="/api/package[@name='com.epson.eposdevice']/class[@name='Device.DeleteDeviceCallbackAdapter']"
name="visibility">protected</attr>