Printing labels to A4

Hi, I'm creating a java application that will take customer details (name, address, contact number etc) and print each set on information to sticky labels. There are 21 labels per A4 sheet in a 3 x 7 matrix and I would like to print on a per sheet basis.

I was wondering if anyone would have any idea on how to do this?

I've tried using html and tables but there is too much variation in printing from different web browsers. I've also though about creating PDF's for this task but I can't find any PDF API's without a steep learning curve.

Does anyone know if there are other java API's out there designed specificly for printing?

Hi, I'm creating a java application that will take customer details (name, address, contact number etc) and print each set on information to sticky labels. There are 21 labels per A4 sheet in a 3 x 7 matrix and I would like to print on a per sheet basis.

I was wondering if anyone would have any idea on how to do this?

I've tried using html and tables but there is too much variation in printing from different web browsers. I've also though about creating PDF's for this task but I can't find any PDF API's without a steep learning curve.

Does anyone know if there are other java API's out there designed specificly for printing?

Thanks for your help

I'd use a GridLayout on a JPanel and to each grid element I'd stick another JPanel representing the individual labels. A bit of trial and error would give me the size of one printed page of labels ...