用Java打印 [英] Printing in Java

查看:157
本文介绍了用Java打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我想知道是否有人知道一种(相当)简单的方法来用Java创建和打印文档.这些文档必须包含多个表/图像/等.

我已经准备尝试使用JTable的打印方法来打印表,但是我发现扩展此类非常困​​难,以便它可以在一页上打印多个表.

我还发现了一个称为打印框架的框架,该框架基于Java打印API构建,但是找不到所需的源代码或jar文件.

非常感谢您的回答.

Hello,

I would like to know if someone knows an (fairly) easy way to create and print documents in Java. These documents must contain multiple tables/images/etc.

I''ve allready tried to print tables using the print method of the JTable, but I find it verry difficult to extend this class so that it can print multiple tables on one page.

Also I found a framework called print framework that is build on the Java print API, but could not find the source code or jar files needed.

Thank you very much for your answer.

推荐答案

使用Jasper报告: http://jasperforge.org/projects/jasperreports [ ^ ]
有一个很好的教程:

http://java.dzone.com/articles/java-reporting-jasperreports [ ^ ]
http://java.dzone.com/articles/java-reporting-part-2 [ ^ ]
http://java.dzone.com/articles/java-reporting-% E2%80%93-part-3 [ http://java.dzone.com/articles/java-reporting-% E2%80%93-part-4 [
Use Jasper Reports: http://jasperforge.org/projects/jasperreports[^]
There is a good tutorial:

http://java.dzone.com/articles/java-reporting-jasperreports[^]
http://java.dzone.com/articles/java-reporting-part-2[^]
http://java.dzone.com/articles/java-reporting-%E2%80%93-part-3[^]
http://java.dzone.com/articles/java-reporting-%E2%80%93-part-4[^]


这篇关于用Java打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆