JTextPrinter 1.0
Swing JavaBean
WILDCREST ASSOCIATES

Main Page  Sample Code    User Manual    Javadoc Documentation  Installation & Compatibility  License & Contact Information

JTextPrinter is a Swing (JFC) component for printing multi-page rich text documents from Java. 

JTextPrinter prints the contents of any JTextPane (StyledDocument) including multiple fonts, sizes, styles, colors, paragraph attributes, embedded graphics and components.  Includes both com.sun.java.swing (Swing 1.0) and javax.swing (Swing 1.1 and Swing 1.1.1) versions and is for use with JDK 1.1.x (only).

NOTE: JTextPrinter is intended for printing native Java StyledDocuments (e.g., Stylepad documents).  Because JTextPane can read RTF and HTML, JTextPrinter can also print RTF and HTML documents, but in practice this capability is severely limited due to problems in the current Swing support for these formats.   Also, JTextPrinter currently does not work under JDK 1.2 due to limitations in JDK 1.2 support for JDK 1.1-style printing.
 

Features:
  • pagination
  • multiple columns
  • optional title (single column) section
  • page breaks
  • page ranges
  • left, right, top, and bottom margins
  • left, center, and right headers
  • left, center, and right footers
  • page numbering
  • date and time formatting
  • JTextPane WYSIWYG support
  • print monitor job name control
Benefits:
  • Easy to use - a simple constructor and single print method is all it takes.
  • Works great as a bean in visual builders and as a simple class for programming.
  • Works with Swing 1.0, Swing 1.1, and Swing 1.1.1 on JDK 1.1.x.
  • Source code for two sample programs included 
  • Free, Product, and Source Code Versions available.
  • Limitations:
  • Free Version is limited to printing 5 pages plus can't change copyright notice in headers
  • JTextPrinter does not work under JDK 1.2 due to bugs in JDK 1.2 support for JDK 1.1-style printing
  • Intended for use with native Java StyledDocuments, as support for RTF and HTML formats under Swing on JDK 1.1.x has significant limitations

  • © Copyright 1999, Wildcrest Associates (http://www.wildcrest.com)