File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Printing in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Printing in Java" Watch "Printing in Java" New topic
Author

Printing in Java

Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hello guys,

I am working on Printing using Java API. Are there any standard dialogs like print dialog and UI which support print function in Java. Are there any standard api supporting pages setup,print preview,and print. Please busse me if there are any.

Suman
Pavan Panduga
Ranch Hand

Joined: Jun 12, 2002
Posts: 68
There is a whole javax.print package,

and here are some useful links
sun guide
javaworld article
some examples

Hope that Helps,
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
Personally I think the Java printing support is much like other parts of the language. Very flexible and powerful, but make the simple uses almost as hard as the complex uses. I'm just getting into some printing and will be using the JPS.

I really think there should be a good abstraction layer for pumping out basic printing that handles the paging and some basic layout, but I haven't found anything yet. Maybe that will be a good project for me to take on in another month or so. I've read the javaworld article and that may be a good place to start.
Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hi Pavan

Thanks for the reply. I need to know some thing else also
Are there any special API thta can processes data structures like the JTable before printing like converting them into a report fachion so that I can be readable.

-suman
Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hi Steven,

I you are right. I have read the Java world artical and I am currently working on JPS. The most hardest part of all is developing a print preview. Where you have to render various object data and fit them into the page formats. I am looking forward for Sun to develop some abstraction for JPS to do page formating. This will be cool, but for me I have to do it the old way.

Cheers
Suman
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing in Java