2

I had a lot trouble to setup a applet to work with an Epson TM-T88V pos printer. Now I can send the command for the cutter and it works. But printing any other text is not possible.

The following jpos.JposException occurs:

jpos.JposException: UnicodeDLL:-10An undefined parameter value was set.  
  at jp.co.epson.upos.T88V.pntr.T88VService.createNormalData(Unknown Source)  
  at jp.co.epson.upos.core.v1_13_0001.pntr.CommonPrinterService.executeNormalPrint(Unknown Source)  
  at jp.co.epson.upos.T88V.pntr.T88VService.printNormal(Unknown Source)  
  at jpos.POSPrinter.printNormal(Unknown Source)  
  at de.develman.pos.printer.Printer.printReceipt(Printer.java:58)  
  at de.develman.pos.ui.action.PrintAction.actionPerformed(PrintAction.java:22)  
  at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)  
  ...

My code looks as follows:

private void initPrinter() throws JposException {
    ptr.open("POSPrinter");
    ptr.claim(1000);
    ptr.setDeviceEnabled(true);
    ptr.setMapMode(POSPrinterConst.PTR_MM_METRIC);
}

private boolean printerUseable() throws JposException {
    // check if the cover is open
if (ptr.getCoverOpen() == true) {
    // cover open so do not attempt printing
    System.out.println("printer.getCoverOpen() == true");
    return false;
}

// check if the printer is out of paper
if (ptr.getRecEmpty() == true) {
    // the printer is out of paper so do not attempt printing
    System.out.println("printer.getRecEmpty() == true");
    return false;
}

    return true;
}

public void printReceipt() {
    try {
        initPrinter();
        if (printerUseable()) {
            ptr.printNormal(POSPrinterConst.PTR_S_RECEIPT, "1\n");
            ptr.printNormal(POSPrinterConst.PTR_S_RECEIPT, PAPERCUT);
        }
    } catch (JposException e) {
        // display any errors that come up
        e.printStackTrace();
    } finally {
        // close the printer object
        try {
            ptr.setDeviceEnabled(false);
            ptr.release();
            ptr.close();
        } catch (Exception e) {
    }
}

The exceptions points to the line:

ptr.printNormal(POSPrinterConst.PTR_S_RECEIPT, "1\n");

If I run the code from eclipse everything works fine. If I remove the line, the cutter works fine. But if I want to print any text, the given exception is thrown.
What is my problem here?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Georg Leber
  • 3,470
  • 5
  • 40
  • 63

3 Answers3

2

I have implemented JavaPOS with an Epson TM-T88V printer and I had the same error, but I was able to resolve the error with the sample code from this link:

http://jpos.1045706.n5.nabble.com/file/n2250344/StarReceiptTest.java

Look at the part that starts and terminates a printing transaction.

Hope it helps.

bouncer
  • 173
  • 10
0

I had the same Problem.

To fix this I have deinstall the Epson JavaPOS-ADK and reinstall it. While reinstalling the ADK again I have checked that I have select the right jpos.xml (that jpos.xml what I also used in my application). After that the error was gone ...

Hope this helps some other guys with the same problem ...

Steffen
  • 2,500
  • 4
  • 31
  • 47
0

Same problem here, the other answers didn't help for my issue.

I was able to install Epson_JavaPOS_ADK_11120.exe on a Win 10 64 with the steps below, it took me 3 days to figure this out:

  • remove any version of Java from Control Panel, reboot
  • install jdk-6u45-windows-i586.exe, reboot
  • replace java.exe, javaw.exe, javaws.exe in C:\ProgramData\Oracle\Java\javapath with the executable provided by the new Java installation from C:\Program Files\Java\jre6\bin
  • execute the Epson installer as Administrator
  • restore your system when done
fantaghirocco
  • 4,761
  • 6
  • 38
  • 48