How to use a printer never register in server and client sides injava?

X

xhy_China

How to use a printer never register in server and client sides in
java? It's a web application. I want to use it on server side.

Thx!
 
X

xhy_China

How to use a printer never register in server and client sides in
java? It's a web application. I want to use it on server side.

Thx!

Why no response??
Can anyone give me some advice??
 
A

Andrew Thompson

Gordon said:
Honestly, I don't think anyone understands what you are asking.

I am having trouble understanding.

To xhy_china, can you describe the series of actions
you would like to see happen for this answer?
Something like....
- User visit company search web page.
- User select search parameters - click 'search'
- User decide on products - click 'buy'
- Report is printed on server side.
 
X

xhy_China

I am having trouble understanding.

To xhy_china, can you describe the series of actions
you would like to see happen for this answer?
Something like....
- User visit company search web page.
- User select search parameters - click 'search'
- User decide on products - click 'buy'
- Report is printed on server side.

First$B!$(BI think I need to apologize for my poor English. Sorry!

My problem is:
I have a web application. If user presses print button on his browser,
server will print the paper with the printer that user specified
before in application. But the printer is not added on both server and
client machine, it only have an IP. So which classes can I use in Java
to implement this function and how?

Thx!
 
L

Lew

xhy_China said:
My problem is:
I have a web application. If user presses print button on his browser,
server will print the paper with the printer that user specified
before in application. But the printer is not added on both server and
client machine, it only have an IP. So which classes can I use in Java
to implement this function and how?

The server is not going to see printers on the client side. Perhaps an
applet, appropriately signed (do you have to sign applets to print?), could
print, but I don't think it can tell the server about the printer. Likewise
with a Java WebStart app.
 
X

xhy_China

The server is not going to see printers on the client side. Perhaps an
applet, appropriately signed (do you have to sign applets to print?), could
print, but I don't think it can tell the server about the printer. Likewise
with a Java WebStart app.

The printer's IP was stored in DB. When user press print button,
application will
select printer according to userid form db to do printing job on
server side. So
the selected printer may not be added on server machine, but I want to
use this printer
by java program(in silent way). How can I implement this?
Thx!
 
R

RedGrittyBrick

xhy_China said:
The printer's IP was stored in DB. When user press print button,
application will
select printer according to userid form db to do printing job on
server side. So
the selected printer may not be added on server machine, but I want to
use this printer
by java program(in silent way). How can I implement this?
Thx!

The only way this could possibly make sense to me is if you have an
Intranet application used within a single corporation and the printers
are all of the same type, connected to the network in the same way.

For example if all the printers were HP LaserJet model P2xxx or 4xxx
connected using JetDirect then you could emit a subset of Postscript to
them, making a TCP connection to port 9100 at the printer's IP-address.

Either the server application would have to construct the Postscript
directly or use a Postscript driver whose output is known to work on all
the models of printer deployed. The driver might be set to print-to-file
so that you can read the output for onward transmission.

Of course you could probably do the same using another PDL such as PCL5
but I happen to like Postscript :)

If the client is a web browser I'd look into using that to perform the
printing in a more "normal" way. DHTML, AJAX, applets, whatever.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top