File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing on two printers simultaneously

 
hereisrajesh
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i have to print the content of a JComponent in two printers connected over a peer-to-peer network simultaneously.
please help me by sending some information about changing default (or setting) printer using java .
thanks in advance

rajesh
 
Gizzmo Zeuzere
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friend !
If you use a PrinterJob, you can use the PrintDialog twice, I think.
if(yourPrinterJob.printDialog())
yourPrinterJob.print();
if(yourPrinterJob.printDialog())
yourPrinterJob.print();
But I'm not sure
 
hereisrajesh
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response
here once more i will explain my problem briefly.
i have a peer-to-peer network of three terminals.
For each systems i am having printer connected to the default port.Here each terminals should be able to send information to the respective default printers and also to a common printer connected over the network(These two operations can be in two threads).Here i can set the printers by using the print dialog box what i can get , but it is not desirable for me and i should be able to set both printers in coding part(like setting page size and number of pages) and redirect deferent data to these printers at a time.
Expecting help from all of You,
Rajesh Adukkadukkath

[This message has been edited by hereisrajesh (edited May 15, 2001).]
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"hereisrajesh",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Posts which contravene the naming convention are not eligible to win books! Please log in with a new name which meets the requirements.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic