hi all

Discussion in 'Java' started by mamta81, Nov 21, 2007.

  1. mamta81

    mamta81 Guest

    i want to print some files in a linux server using sockets.i hav used
    the following code
    sbr= new BufferedReader(new InputStreamReader(s.getInputStream()));
    String command=sbr.readLine();
    Process process=r.exec(command); where the command is
    lpr -Plp1 Loan.RPT which will be sent from the client pc. The client
    is in windows. Please help
    mamta81, Nov 21, 2007
    1. Advertisements

  2. mamta81

    Roedy Green Guest

    I think you would be better off waiting until you had accumulated the
    entire file before printing. Otherwise you may get just tiny dribbles
    at a time, which will tie up your printer for hours. Execing to print
    will likely start a fresh page for each burst. See

    See the code in the com.mindprod.http package to read a socket input
    stream coming in a bit at a time. See
    and also
    Roedy Green, Nov 21, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads