How to pass and print files through LPT1 port using thermal printer

We are developing POS for a retailer store and we most probably finished it. We are using the following hardware interfaces for the development.
1) Receipt Printer with Cash Drawer
Brand: POSIFLEX pp6000 serial thermal printer
Power Rated: DC 24v 2.0 A
Model no: 3902c492
2) Barcode Label Printer
Brand : Monarch Paxar
Model No: M09642PMU
Serial No: 20123152
Brand: CE
Model No: 07010517
4) Barcode Scanner
Model no: A307911
5) Programmable Keyboard
Model No: 90319-000/0000
Serial No: 014693
6) Touch Screen
Model No: 11-81371-129
The problem is , we never get the printout of the receipt .But we generaed the receipt. And the cash drawer is not opening.We use the following code for printing the receipt
import java.awt.print.*;
import java.util.*;
class PrintManager extends Thread
String STR_OUT="";
boolean CD_OPEN=true;
FileOutputStream fos;
PrintStream ps;
//char[] CMD_CUT={29,86,66,250}; //cuts paper
char[] CMD_CD_OPEN={27,112,0,25,250}; //kicks cash drawer 1
public PrintManager(){
public void Init()
public void Init(boolean CDOPEN)
fos = new FileOutputStream("LPT");
System.out.println("nnnnnnnnnnnnafter LPT2");
ps = new PrintStream(fos);
System.out.println("nnnnnnnnnnnnafter LPT2");
// System.setOut(new PrintStream(new FileOutputStream("LPT1.txt")));
//System.setOut(new PrintStream(new FileOutputStream("console.txt")));
}catch(Exception ex)
public void run ()
}catch(Exception ex)
public void Close()
}catch(Exception ex)
public class PrintRcpt {
public static void main(String args[]) {
PrintManager objPM=new PrintManager();
//call Init always before calling start
objPM.Init(); //print and open cashdrawer
//objPM.Init("ZX",false); //print and do not open cashdrawer
//Below sleep is a simulation for time lapse between two sales- do not include this sleep in the final code
}catch(Exception ex){}
//before starting second sale, close the port connection opened by first sales
//this close should be called when the user closes the receipt print preview screen
objPM=null;//destroy the print manager object
You please post your suggestion for getting the printout from our POS system.

[url]Duel posted

Similar Messages

  • How to fetch and save file in common server using FTP in SAP

    Dear All,
    My requirement is to fetch a image and save an image in a common server through SAP .
    I think there is some concept of doing the same using FTP.
    Please put some light on this issue.

    Below are the FM's use to FTP.
    FTP_CONNECT                    Connect to FTP server
    FTP_COMMAND                    Execute FTP Command
    FTP_DISCONNECT                 Disconnect from FTP server
    You can search SDN for more details on each of the FM's.
    Hope this helps

  • How to read and write from the serial port using java

    can anyone tel me how to capture data from a serial port and display on the screen and also store it in a database.

    Java Comm API, JDBC

  • How to pass array of Object in A Procedure using OCCI.......

    I m also trying for How to pass Object to a procedureb using OCCI...
    1. I created A type.....
    2. Then I created a VARRAY using that Type.
    3.After that I have written An Procedure with object as a parameter..
    now using OCCI how do u bind the parameter with this . plz note that using OTT
    i have already created the class representation of above object type i.e class
    four Files Created 1> demo.h 2>registermapping.h
    3> demo.cpp 2>registermapping.cpp
    After I want to Pass the Values in A Vector...
    vctor<full_name *> vect;
    stmt=con->createStatement("BEGIN Add_Object(:1); END;");
    full_name *name1 = new full_name; //Giving the Error here Given below....
    Through name1 Which Function I will call in which I will Pass a String....
    name1->readSQL("Sanjay"); Or I have to add a function......
    error C2259: 'FullName' : cannot instantiate abstract class
    can u plz suggest me Why this Error is Giving......?
    How to pass the data?
    setFirst_name() and setLast_name() this two function I will add in Demo.cpp which one created automativcally by Using OTT command.....or other way plz tell me Boss ....
    Can u lz Suggest me ASAP....

    hi Nishant ,
    What u have done Now I mm trying ....
    can u Plz Suggest me......
    How to pass and Array of Object in Procedure using OCCI... Doing....
    90% finished Two Error's Are Coming...
    1> If I create the Class then Data Not Inserting table......
    2> If I will create the Class through OTT command.......
    then U can't Instantiate Object It is DIsplying ,this is Abstract Class(PObject)...
    Beco'z the below Method is Not adding Automatically by OTT command which is Pure Virtual Function.....
    But I added this Function Still SAme Error Giving..
    getSQLTypeName(oracle::occi::Environment env, void *schName,
    unsigned int &schNameLen, void **typeName,
         unsigned int &typeNameLen) const
    Plz Suggest me....

  • How to view and print pdf files

    how to view and print pdf files

    Download and install Adobe Reader: Adobe Reader Install for all versions
    Open the PDF file using it. If security restrictions don't prevent it you could also print it.

  • How to undeploy an .sda file through command line

    How to undeploy an .sda file through command line.send me the related command to do it.and related information and links.

    Please find below the steps to undeploy thro command line :
    Shut down the sdm server
    1)SDM shutdown "sdmhome=D:\usr\sap\J2E\JCO1\SDM\program" "sdmguiport=50018" "sdmhostname=<hostname>" password="<password>" "shutdownmode=abort"
    2)sdm jstartup "mode=standalone" "sdmhome=c:\usr\sap\J2E\DVEBMGS00\SDM\program"
    3) sdm undeploy "sdmhome=D:\usr\sap\J2E\DVEBMGS00\SDM\program" "compname=c:\test.sda"
    4)sdm jstartup "mode=integrated" "sdmhome=c:\usr\sap\J2E\DVEBMGS00\SDM\program"
    5)start the sdm server again
    SDM server "sdmhome=D:\usr\sap\J2E\JCO1\SDM\program"
    Hope this helps. do not forget to reward points

  • How to create and print contact sheet using photoshop elements 10?

    how to create and print contact sheet with photoshop 10?

    Which operating system are you using?
    On a windows system you can use the Organizer tml
    On a Mac, File>Contact Sheet II within the pse 10 editor

  • How to compare two PDF files through PLSQL

    Can any body help that how to compare two PDF files through PLSQL programing and gives the differences as output.

    Or simply apply an oracle text index on your pdf column:
    SQL>  create table t (id integer primary key, bl blob)
    Table created.
    SQL>  declare
    bf bfile := bfilename('TEMP','b32001.pdf');
    bl blob;
    DBMS_LOB.LOADFROMFILE(bl, bf,dbms_lob.getlength(bf));
    insert into t values (1,bl);
    PL/SQL procedure successfully completed.
    SQL>  create index t_idx on t (bl) indextype is ctxsys.context parameters ('filter ctxsys.auto_filter')
    Index created.
    SQL>  declare
       mklob   clob;
       ctx_doc.filter ('t_idx', '1', mklob, true);
       dbms_output.put_line (substr (mklob, 1, 250));
       dbms_lob.freetemporary (mklob);
    Oracle® Database
    Release Notes
    Release 1 (11.1) for Linux
    November 2007
    This document contains important information that was not included in the
    platform-specific or product-specific documentation
    PL/SQL procedure successfully completed.This generates a text only version of your pdf and standard text comparison methods can be applied ....

  • How do I drag and drop files between computers when using Home Sharing in ITunes?

    How can I drag music files between computers while using Home Sharing? An older version of ITunes had a Home Sharing icon in the column browser near the playlist so it was easy to drag and drop.

    Hello cacalenni,
    Thanks for using the Apple Support Communities. I understand that you wish to learn how to import songs using Home Sharing in the new iTunes. The following resource should assist you in doing so:
    iTunes 12 for Mac: Use Home Sharing to import items from another iTunes library
    Matt M.

  • How do I save a file to a server using flex and coldfusion?

    How do I save a file to a server using flex and coldfusion?
    On the CF side I might need to use this:
    <cffile action="UPLOAD" filefield="Filedata"
    And on the flex side I might need to use something like this:
    var sendVars:URLVariables = new URLVariables();
    sendVars.action = "upload";
    var request:URLRequest = new URLRequest(); = sendVars;
    request.url = _strUploadScript;
    request.method = URLRequestMethod.POST;
    _refUploadFile = new FileReference();
    _refUploadFile = _arrUploadFiles[_numCurrentUpload].data;
    _refUploadFile.upload(request, "file", false);
    I just don't know how to put it all together in Coldfusion.

    try this... ing-The-Initial-Form

  • How to read a text file through pl/sql

    How to read a text file through pl/sql

    pl/sql runs inside the database. so your file also should be on the database server file system for you to be able to read.
    check out UTL_FILE package. This is the database package to read/write files on the database server.

  • How to copy and paste file in mavericks

    how to copy and paste file in mavericks?

    Spoombung wrote:
    I actually can't get copy and paste to work in Mavericks!!!
    Is it me, or is there something wrong with it? I can hardly believe this was overlooked....
    Obviously it was not overlooked.
    Select a file, go to the edit menu and choose Copy, open another folder and choose Paste from the edit menu.
    What happened (error messages etc)

  • How To Generate And Print Reports In PDF Format From EBS With The UTF8 Char

    I want to know How To Generate And Print Reports In PDF Format From EBS With The UTF8 Character Set in R12.0.4.

    Refer to Note: 239196.1 - PASTA 3.0 Release Information
    Or, you can use XML Publisher.
    Note: 551591.1 - Need Latest XML Publisher / BI Publisher Patches For R12

  • VISA: How to get the CSV file through C/C++ code?

    How to get the CSV file through C/C++ code?
    I'm communicating with a USB oscilloscope using VISA.

    Thank you for your reply.
    I am using Apache Commons File Upload. Here is the code where I got the "fi".
         DiskFileUpload fu = new DiskFileUpload();
              List fileItems = fu.parseRequest(request);
             Iterator itr = fileItems.iterator();
              FileItem fi = (FileItem);
                File tempFileRef  = new File(fi.getName());
         System.out.println("Field = "+tempFileRef.getAbsolutePath());

  • How to download and upload files in Java?

    Hi, everyone
    How to download and upload files in Java? Do you have some references about this issue or some valuable web link�? Thanks!
    Best Regards,

    This is too vague a question, please be more specific. What protocol would you like to use? HTTP? FTP? Something else?

Maybe you are looking for

  • Issue with XSLT Mapping

    Hi Team, I have one requirements which I am explaining below: Source structure should be: <?xml version="1.0" encoding="UTF-8"?> <ns0:MT_Student xmlns:ns0="urn:bp:xi:hr:edm:test:100">    <Data>       <FName>       <LName>            <Marks>          

  • Open Form not working when called from When-Mouse-Click

    In our application to navigate to other forms we have created a feature where user selects the Forms from a LOV, the form id is returned to the text item and user needs to click the text item.....In the text item the Open form command is given This i

  • How to import wav. files into garage band?

    I've downloaded some samples for making electric music and they're all wav. files, but I don't know how I can import them into garageband "library" (probably where all the apple's loops are) can somebody please help me???

  • Itunes a cessé de fonctionner windows 8

    Bonsoir à tous, Je rencontre un problème à l'ouverture de l'Itunes Store: j'ai comme message "Itunes a cessé de fonctionner" et lorsque je clique sur ok, Itunes se ferme... Quelqu'un a t-il eu ce soucis? Savez-vous comment y remédier? Merci d'avance

  • Why does my iMac not shut down when I try to shut it down?

    Wh does my iMac not shut down, or restart when I try to do either.  It just sits there with the little loading circle continuously moving.  The only way I can shut it down is if I hold down the power button to shut it down.  Can anyone tell me why th