Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing in Java

 
Suman Mummaneni
Ranch Hand
Posts: 96
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic