HTMLDocument class

The HTMLDocument class enables you to more easily use existing IBM® Toolbox for Java™ HTML classes to create either HTML pages or Portable Document Format (PDF) documents. When you create an HTMLDocument, you specify whether it contains HTML tags or Extensible Stylesheet Language (XSL) Formatting Object (FOs) tags:
  • When you want to create HTML pages, the HTMLDocument class offers you an easier way to group all the required HTML tags. However, HTML pages do not always look the same when you print them as when you view them in a Web browser.
  • When you want to create PDF documents, the HTMLDocument class offers you the ability to create XSL FO source that contains all the information you need to produce a PDF document. PDF documents retain the same graphical appearance when you print them as when you view them electronically.

To use HTMLDocument, you need to include an XML parser and an XSLT processor in your CLASSPATH environment variable. For more information, see the following pages:

Jar files

XML parser and XSLT processor

You can process the resulting HTML or XSL source data the way you want, for example, by displaying the HTML, saving the XSL to a file, or using the streamed data in another part of your Java program.

For more information about creating HTML pages and XSL FO source data, see the following pages:

Javadoc reference documentation

For more information about the HTMLDocument class, see the following Javadoc reference documentation:

HTMLDocument