Results 1 to 8 of 8
  1. #1
    dhamayanthikd is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default print all docs togather without interruption from other computers

    I have done a coding to print the reports from java (its basically a till machine and printing bills) and that is working fine. But the problem is, if any other Till machine sends the document to print, the printer will just get the job and does and finally it is kinda merging of papers from one till to other. I hope Im explaining the problem clearly. For ex. Till Machines t1 and t2; both printing 3 sets of doc as doc1 - 3 pages , doc2-2pages and doc3-3pages.

    now the printer prints in the following order:
    t1 -> doc1-3pages
    t2 -> doc1-3pages
    t2 -> doc2-2pages
    t1 -> doc2-2pages
    t2 -> doc3-3pages
    t1 -> doc3-3pages

    basically it does not follow any order, but it takes how it reaches printer from till machines. So, I want to synchronize this and in one shot, it should print from t1 and it should complete, then should it should go for t2 and goes on...

    Is there any solution that I can implement in java.
    Thank you for your time!

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    How have you coded the print jobs?
    The printer should simply print however many copies of a document you have requested, before moving onto the next document in its queue.
    So if you;re getting a print job interupted by another print job then I suspect you've sent the document incorrectly in some way?

  3. #3
    dhamayanthikd is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    There is no problem in the copies that print. but the order in the queue. it works perfectly as the printer prints whatever it gets in the order. But i want to control the order from the machines. It should complete Till1's docs and should go to till2's doc. As of now, it gets till1 first doc and gets till2's first doc and it may get either till1's 2nd doc or till2's 2nd doc. but this is how the machines are sending to the printer.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    There's not much you can do about that, if they're separate documents, and jobs.
    Look at the printer queue from a PC, you don't control the order on a networked printer.
    You can pause or cancel your own job, but that's about it.

    The only option I can see straight off is to have a server in between that the tills submit the docs to. When the server has a complete set of docs from a till, and no other job is running, it submits them to the printer...preventing (synchronised, or somesuch?) another job from being launched until all the relevant docs have been submitted.

  5. #5
    dhamayanthikd is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    Yes! even I could see this only as the option. thinking to write some socket programming that will say to other tills that, it is using the printer and others should hold their printing task. let me see how i can achieve it. Thanks for your reply.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    I'd really consider having something that accepts the docs from a till (give the tills ids or something), and then holds them ready to submit to the printer. If they're not big and/or there aren't many tills then you should be able to hold them in memory.

    That way the tills don't have to worry about it at all. They just need their print code changed to a submit to this service.

  7. #7
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,520
    Blog Entries
    7
    Rep Power
    20

    Default

    Maybe all the documents from one client can be merged together into one big document so clients offer only one doc to a printer.

    kind regards,

    Jos

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default

    Oh yes.
    For some reason I thought it was printing multiple copies of a doc...silly me.

Similar Threads

  1. Sharing a game instance over two computers
    By keiys in forum Java Gaming
    Replies: 0
    Last Post: 04-21-2010, 02:39 PM
  2. Replies: 0
    Last Post: 12-24-2008, 10:35 AM
  3. Sockets for computers in wireless network
    By etrynus in forum Networking
    Replies: 2
    Last Post: 12-02-2008, 11:39 PM
  4. JCreator JDK docs?
    By thejerryman in forum JCreator
    Replies: 4
    Last Post: 12-01-2008, 04:31 PM
  5. producing DOCs
    By javaplus in forum New To Java
    Replies: 0
    Last Post: 11-18-2007, 06:08 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •