Alex
Alex

Reputation: 370

Java document printing in Windows

I am doing a project which will finally print a pdf file or doc file to the printer as "another user". But now I stuck on how to print document in Java.

I know there is a pdf renderer in java, developed by sun, which can convert pdf to pcl file.

After the conversion, I want to print the pcl file to remote printers. My previous way is "copy /b filename \printserver\printer", however, this approach actually is too lowlevel and cannot even display the document name, and sometime is not working.

I wonder is there a better approach of java to send the PCL file to print server, where the server can actually detect the document name and host name(which I want to specify in the program, not the original one). This one is really driving me crazy...Thanks!

Upvotes: 0

Views: 2719

Answers (1)

Sap
Sap

Reputation: 5291

Have you looked into java print service? You can find some useful code here http://docs.oracle.com/javase/1.4.2/docs/guide/jps/spec/printing.fm2.html

Upvotes: 1

Related Questions