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
2010-10-18 12:24:41
A:
Or use the Java print API:
http://www.ibm.com/developerworks/java/library/j-mer0322/index.html
http://www.ibm.com/developerworks/java/library/j-mer0424.html
duffymo
2010-10-18 12:30:33
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
2010-10-18 12:30:34