| Notes on applet signing:
We have gotten numerous requests on how to sign applets in order
to enable printing from browsers. Two good memos on applet signing
we recommend are: As to how to sign applets in general, in addition to the references above, the following Q&A from Peter van der Linden's excellent Java FAQ contain some more useful links on applet signing: Question 17 (Sect. 13): How do I sign an applet? Answer: The browser vendors have produced independent and different solutions for applet signature (alas). Here are some URLs on this topic. See the Java Signing FAQ at http://www.fastlane.net/~tlandry/javafaq.txt Read the basics of signing at: http://www.javareport.com/html/features/archive/9802/somers.shtml
Netscape signing: Microsoft signing: Changes in TextPrinter 1.3.1 TextPrinter 1.3.1 fixes a problem with line break processing present in TextPrinter 1.3 on Windows and Mac. TextPrinter's detection of end-of-line characters was revamped in version 1.3 to fix line separator handling problems on certain non-Windows platforms. TextPrinter 1.3 looked for System.getProperty("line.separator") as the line separator, which may be CR ("\r"), LF ("\n"), or CRLF ("\r\n") on different platforms. This allowed TextPrinter 1.3 to handle line breaks in text read from files correctly on all systems.. However, it turns out that the Java components themselves (e.g. TextArea) insert LF when the user types "Enter" regardless of what the platform line separator is (which will be wrong on Windows and Mac). In additon, some Java developers always use LF (or CR, or CRLF) rather than the platform line.separator for line separation in their programs. Also, programs may encounter text files imported from other OS's. Since TextArea always displays a line break for any occurances of LR, CR, or CRLF regardless of the platform line separator, TextPrinter 1.3.1 has likewise been changed to detect any of CR, LF, or CRLF as valid line separators on all platforms regardless of the platform line separator. This fix also fixed a related bug wherein with line wrap off, TextPrinter 1.3 inserted an extra blank line between lines that needed wrapping. In addition, the PrintTextFile sample code contains updated "defaultMargins"
sample code, including support for Windows 98 and the latest JDK releases
plus small optimizations to certain default values. Changes in TextPrinter 1.3 TextPrinter 1.3 fixes the following bugs and problems in previous
releases: Changes in TextPrinter 1.2.1 TextPrinter 1.2.1 was updated to correspond to changes made by Sun
to the Java printing support in their newest releases JDK 1.1.7 and JDK 1.2beta4.
These new JDK releases addressed the long-standing page dimension and resolution
problems discussed at length below and in the TextPrinter documentation.
These fixes have led to the following changes in TextPrinter: In the free PrintTextFile sample application that accompanies TextPrinter,
the following changes were made: Known bug in TextPrinter (problem with Symantec
Visual Cafe JAR command) There are two workaround solutions: Changes in TextPrinter 1.2 In TextPrinter 1.2, a problem was fixed that caused a nullPointerException on bringing up the getPrintJob Dialog Frame on Solaris. Previously the Frame was saved and reused, which worked fine on other platforms, but Solaris seems to require a new Frame each time. It appears that Solaris platforms place the 0,0 origin right at the physical upper left corner of the page, even though as a practical matter most printers are unable to print right to the edge. By contrast, leftMargin and topMargin of 0.0 seem to work fine on Windows and Macintosh, which appear to place the 0,0 page origin at the upper left of the actual printing area. For this reason the default values of left and top margin for TextPrinter itself have been kept at 0.0, but it is recommended you experiment with your system(s) and printer(s) and look to setting your margins to some value greater than 0.0 to be safe. In particular, the PrintTextFile 1.2 sample application sets left and top margins of 0.125 so that it works on Solaris at the price of a small loss of potential printing area on Windows and Macintosh. Solaris also appears to work with rightMargin and bottomMargin as small as 0.125, but since values this small don't work on all platforms and because of the cummulative font metrics errors mentioned in the TextPrinter documentation, default values of rightMargin 0.4 and bottomMargin 0.5 are used in both TextPrinter and PrintTextFile. The test application PrintTextFile 1.2 fixes a packaging problem that resulted in certain Symantec Visual Cafe classes being omitted in the jar version of PrintTextFile 1.1. This meant that PrinterTextFile 1.1 would not run unless you happened to have Visual Cafe installed, or had downloaded certain other Wildcrest Associates products that provided these classes, or rebuilt PrintTextFile from the sources. PrintTextFile 1.2 again improves the PageSetupDialog, providing
even more generous text field and label sizes to accomodate the larger system
fonts used on some systems. Changes in TextPrinter 1.1 In TextPrinter 1.1, a problem has been fixed in the custom TextAreaPropertyEditor that displays when you click on the Text property in the property sheet of your favorite bean tool. The problem caused earlier versions of TextPrinter in some bean tools to not display the previously entered text when reopened. The improved TextAreaPropertyEditor described above is being made available as a separate product from Wildcrest Associates. If you install the separate TextAreaPropertyEditor product on your system, you must switch to TextPrinter 1.1, as earlier versions of TextPrinter conflict with the new TextAreaPropertyEditor product. The following default values were changed in TextPrinter 1.1 based
on user experience with earlier versions of the product: The recommended values for rightMargin and bottomMargin in TextPrinter 1.1 are the same as for TextPrinter 1.0.1 above. The PageSetupDialog in the PrintTextFile sample application has an improved layout. Label fields were too narrow in previous versions, causing some labels to clip in systems with larger system fonts, notably Macintosh. One breaking API change was made between TextPrinter 1.1 and earlier
versions: setFont has been renamed to setPrinterFont and
getFont has been renamed to getPrinterFont.
This change was necessitated to avoid subclassing setFont, which
causes intermittant crashes when instantiating multiple instances of TextPrinter
in certain bean tools, notably IBM WebRunner BeanTester. Changes in TextPrinter 1.0.1 The Windows JDK 1.1.4 incorrectly reports the printer pageWidth and pageHeight. Appropriate values of rightMargin and bottomMargin in TextPrinter can be used to compensate for this problem. However, a bug in the rightMargin computation in TextPrinter 1.0.0 caused rightMargin values to not correspond correctly to physical measurements. This has been corrected in TextPrinter 1.0.1. The original JDK bug was fixed in JDK 1.1.5, though the values still do not appear to be quite correct. Bottom line: All versions of JDK 1.1.x and TextPrinter will work correctly with appropriate values of rightMargin and bottomMargin. The best advice is to determine these values empirically for your system. Here are the values that work on systems tested by Wildcrest Associates: TextPrinter 1.0.0 Mac (Metrowerks VM) JDK 1.1.3: rightMargin
= 2.5, bottomMargin = 0.0 TextPrinter 1.0.0 Windows JDK 1.1.4: rightMargin =
0.0 , bottomMargin -2.0 But given the wide variety of printers out there, you really need to experiment to see what values work for you. One customer using TextPrinter on Windows JDK 1.1.4 reported that he had to use values of rightMargin = -6.65, bottomMargin = -10.0 on his printer! |