Question

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!

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top