I am writing a web-based system with java. There are some labels and reports printing. Each requires different printers which are connected to the same client computer.

How could I set so that, when I "Print Doc A", document A would print to printer A, and "Print Doc B" button, document B would print to printer B.

The URL for both documents are different. Doc A is on http://www.xyz.com and Doc b is on http://www.abc.com.

info: It is a web-based system used within a lan. So each user use the system with a fixed computer.