tags:

views:

638

answers:

3

Hello,

I have a java desktop application with information about several entities. There is a "print" button than WHEN pressed various information should be collected and printed.

The question is: How can i select WHAT will be printed ON a specific location on the paper?

A more general question would be: How can i format information to be printed on paper?

Thanks for your time.

+2  A: 

I would suggest using something like iText for generating a PDF and print the PDF instead. As a bonus, the output can be saved easily and attached to an e-mail.

stili
+1  A: 

You need the Java Print Service - http://java.sun.com/javase/6/docs/technotes/guides/jps/index.html

Thorbjørn Ravn Andersen
A: 

We've successfully use JasperReports -- really great tool scaling from simple to complex reports. Supports working directly with a list of entities (very convenient), and also RDBMS communication via JDBC and even HQL (Hibernate Query Language). There is also a visual design tool for it called iReport, so one can visually design the look and feel of the report.

01es