0

In my project the clients needs to print a receipt using a POS printer which can be done using JAVA POS. i searched on net no useful material until now but came across

1.JavaPOS
2.JPos

Could someone please guide which i should go ahead with JAVA POS or JPos.
The application is based on Java Swing desktop not web based.
Really stuck at this any help would be very useful

Chetan Pulate
  • 503
  • 1
  • 7
  • 21
  • In my own experience ever vendor implements it differently. Also, 1 and 2 are the same thing. That is, JPos is short for JavaPOS. – Elliott Frisch Aug 01 '14 at 13:45
  • For an epson printer you can check: http://stackoverflow.com/questions/30839049/how-can-i-use-javapos-to-print-reciepts-with-an-epson-printer/30839050#30839050 For all other printers the things you have to do are equal: Install the driver, generate a jpos.xml which lets your program now how to talk to the printers and then write Java code using these printers. – thi gg Jun 15 '15 at 07:12

1 Answers1

0

You could do it in straight java, depending on how the printer is attached. Here is some code I used:

 private void    printMailer(ResultSet rs) {
    try {
        FileOutputStream os = new FileOutputStream("LPT1");  
        PrintStream ps = new PrintStream(os);  
        ps.println("\n\n\n\n\n\n\n\n");
        ps.println("\t\t\t" + rs.getString("FIRSTNAME")+ " " + rs.getString("SURNAME"));
        ps.println("\t\t\t" + rs.getString("ADDRESSLINE1"));
        ps.println("\t\t\t" + rs.getString("ADDRESSLINE2"));
        ps.println("\t\t\t" + rs.getString("ADDRESSLINE3"));
        ps.println("\t\t\t" + rs.getString("ADDRESSLINE4"));
        ps.println("\f");
        ps.close();
    }
    catch (Exception e) {
        System.out.println("Caught Exception printing mailer.");
    }
}
Greycon
  • 793
  • 6
  • 19
  • Dear friend, I have a Vega7000 Series EFT-POS terminal. Do you have any idea how can I develop program for it? What kind of tools and IDEs and Documents am I need? Where can I find this requirements? And does it have JVM? i.e. does it support Java applications or I must use another programming language? Any light on this issue highly appreciated. – Jean Mar 15 '15 at 08:53
  • No, I'm sorry, I don't know anything about that specific printer. – Greycon Mar 24 '15 at 17:28