开发者

What tool for printing Invoices and similar documents in Java Swing?

I'm looking for a good tool for printing Invoices, Receipts and similar documents in Java Swing. I have tried JasperReports but it is pretty hard to get a dynamic layout and it is designing for reports.

A requirement that I have is that the document should be sent directly to the printer and must not be s开发者_开发问答aved to a file. So some tools that first creates an Office Document or a PDF document isn't a solution for me.

Any recommendations?


You might want to give Docmosis a go. You can create dynamic documents in various formats with the advantage that layout is specified in a template (being a simple doc or odt file) and content can be dynamically managed based on data. The type of layout your link refers to is pretty easy to achieve by using Docmosis conditional fields or by adjusting your input data.

In terms of printing only, Docmosis lets you stream the resulting output document anywhere. You could stream it to code that will send it to a printer directly.


I recommend to use DynamicReports, an open source and based on JasperReports. You can send report directly to the printer.


Printing in Java revolves around a fairly simple but powerful API that provides you with a canvas. Fromthere you can easily paint any information using the Java2D API in the same way you would override a paintComponent() function.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜