How can we print docs from SWING application
We have swing application. It includes documents(PDF, MSWord documents) Can we call system's print dialog form our prog开发者_开发百科ram to print this documents?
Target operating system is Windows XP.
And, id it is impossible, how can we process PDF and print PDF from java?
You can try the java.awt.Desktop class (needs Java 6) if it is supported on your platform.
It has a print
method for printing files (documents) if their type is registered with the system.
Prints a file with the native desktop printing facility, using the associated application's print command.
精彩评论