java打印程序设计
在我们的实践办公中,常常需要实现打印功能。但由于前史因素,Java提供的打印功能一向都比较弱。实践上开始的jdk底层不支持打印,直到jdk1.1才引入了很轻量的打印支持。所以,在曾经用Java/Applet/JSP/Servlet设计的程序中,较杂乱的打印都是通过调用ActiveX/OCX控件或许VB/VC程序来实现的,十分烦恼。实践上,SUN企业也一向致力于Java打印功能的完善,而Java2方式则终于有了一个强大的打印模式的初步,该打印模式与Java2D图形包充沛结组建一体。更令人鼓舞的是,新发布的jdk1.4则提供了一套完整的Java打印服务API(JavaPrintServiceAPI),它对已有的打印功能是活跃的补充。利用它,我们可以实现大多数实践使用需要,包括打印文字、图形、文件及打印预览等等。这篇文章将通过一个详细的程序实例来说明如何设计Java打印程序以实现这些功能,并对不一样版本的实现方法进行分析比较,希望大家能从中获取一些有利的提示。Java打印程序设计.txt
(In our practice office, we often need to realize the printing function. But due to historical factors, the printing function provided by Java has always been relatively weak. In practice, the bottom layer of jdk does not support printing, and it was not until jdk1.1 that very lightweight printing support was introduced. Therefore, in the programs designed with Java/Applet/JSP/Servlet, the more complicated printing is realized by calling ActiveX/OCX controls or VB/VC programs, which is very annoying. In fact, SUN enterprise has always been committed to the improvement of Java printing function, and Java2 method finally has the beginning of a powerful printing mode, which is fully integrated with the Java2D graphics package. What's more encouraging is that the newly released jdk1.4 provides a complete set of Java Print Service API (JavaPrintServiceAPI), which is an active supplement to the existing print function. Utilizing it, we can realize most practical use needs, including printing text, graphics, documents and print preview, etc. This article will explain how to design a Java printing program to realize these functions through a detailed program example, and analyze and compare the implementation methods of different versions. I hope you can get some favorable tips from it.
Java print programming.txt)
页:
[1]