tags:

views:

62

answers:

4

I have a requirement to print data exactly in a particular position in paper. How can these kind of formatting be done using Java?

+1  A: 

Which kind of data ?

If it's form, the use of reporting library can help you:

If it's graphic you can try using 'raw' java api:

Alois Cochard
+3  A: 

Jasper, iText will work for you.

org.life.java
A: 

If you really need full control, you can print Graphics2D objects directly. See http://java.sun.com/developer/onlineTraining/Programming/JDCBook/render.html and the next page.

Another possibility would be printing PDF, e.g. using iText. I think exact positioning is possible, but probably harder than using Graphics2D.

Landei