开发者

How to get multiple prints on a single click?

I am working on a web application that is used to print user receipts based on the supplied receipt number. I want to enhance it in suc开发者_StackOverflow中文版h a way that when i supply receipt numbers from 1 to 100 it will print all 100 receipts. Is there any ways in Java to implement this. How can i implement this in Java ?


Use a Map with the receipt number as the key and the receipt's as values.

Map<String, Receipt> receipts = new HashMap<String,Receipt>();
//Put objects in the map
receipts.put(receipt_number,receiptObject);

//Later print them out
for(Receipt r : receipts.values()) {
   System.out.println(r);
}


Your print document code is probably generating some sort of PDF or other report format and sends it to a printer. I think you should collect all the receipts in one multi-page report and print that. If you provide more details about the reporting tool used we might be of more help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜