Installation
Download the TextPrinter zip file and unzip. This will create a TextPrinter folder containing both code and documentation.
To access documentation, use your favorite browser to view the file TextPrinterREADME.html.
To use TextPrinter as a JavaBean, copy TextPrinter.jar into the jar
folder appropriate for your visual application builder:
For the JavaSoft BDK BeanBox:
\bdk\jars
For the IBM WebRunner BeanTester:
\webrunner\BeanTools\beantester\beans
For Symantec Visual Cafe:
anywhere (use "Insert: Component to Library..." command, then add to desired
palette)
To use TextPrinter as an ordinary class, since TextPrinter.class is in package com.wildcrest, com\wildcrest\TextPrinter.class needs to be accessible from your class path. You need to do one of the following four things:
To use the PrintTextFile sample program, click on "Sample Application"
link above and follow the instructions there.
Compatibility and known problems
TextPrinter was developed under JDK 1.1.4 on Windows 95. It has been tested successfully with the following systems:
Printing was a new addition to Java beginning with JDK 1.1. TextPrinter will not work with Java environments prior to JDK 1.1. Early releases of JDK 1.1 were also known to have problems on certain platforms.
Because of the hundreds of printers and printer drivers on different platforms, comprehensive testing of printing software is difficult at best. The JavaSoft site contains numerous reports in its bug database documenting printing problems on multiple platforms and printers under various releases of JDK 1.1 and early beta releases of JDK 1.2. Developers may wish to keep an eye on the JavaSoft bug database for printer bug status and workarounds.
Even in Java releases for which TextPrinter works, there are difficulties in certain interactions with the underlying printing system. During development, the following problems were experienced (most already in the JavaSoft bug database):
The problems described in (1) & (2) apply to versions up through JDK 1.1.4 on Windows. There are reports that this problem will be fixed on Windows in JDK 1.1.5, in which case these compensating negative values should no longer be necessary.
These special values are not used for the default values for TextPrinter. However, the sample program PrintTextFile does set them so it works correctly on Windows. On non-Windows systems you will want to change these values back to 0.0 (or whatever other values prove appropriate for your platform).
An earlier version of this documentation reported that pageWidth on Macintosh was overreported by about 2.5 inches and setting rightMargin to 2.5 would compensate for this. This is incorrect and was instead due to a bug in TextPrinter 1.0.0 arising from attempts to fix the Windows problem. This bug has been fixed in TextPrinter 1.0.1, and now the Macintosh works correctly with bottomMargin and rightMargin set to 0.0.
(3) No printer preferences are reported from calls to toolkit.getPrintJob(), so any user-specified preferences are unknown to TextPrinter and only take place at the driver level. This has the following consequences (on the systems used for development):
Please report any difficulties with Text Printer on your configurations
by email to products@wildcrest.com. Be sure to include what Java
release, OS, and printer you are using. Efforts will be made to fix
problems in Text Printer, but certain problems may not be its fault or
be possible for it to detect and/or correct.