If you want control on printing you can use PDF format and there are APIsfor making PDF output in java.