W3C home > Mailing lists > Public > www-xsl-fo@w3.org > May 2002

ANN: TIFFRenderer for FOP

From: Oleg Tkachenko <olegt@multiconn.com>
Date: Sun, 12 May 2002 12:10:51 +0200
Message-ID: <3CDE3FAB.3090007@multiconn.com>
To: www-xsl-fo@w3.org

For the people interested in faxing using xsl-fo and FOP I'm happy to announce
TIFFRenderer for FOP. The homepage is at
http://www.tkachenko.com/fop/tiffrenderer.html and here is some info:

TIFFRenderer for FOP, version 0.9

TIFFRenderer is a small Java library extending Apache's FOP by providing
possibility to output multi-page TIFF (Tagged Image File Format) images. [TIFF
is one of the most popular and flexible of the current public domain raster
file formats, which was primarily designed for raster data interchange and is
standard format in faxing applications.] TIFFRenderer is not a real renderer
on its own, it just extends org.apache.fop.render.awt.AWTRenderer class and
encodes generated by that renderer AWT images to TIFF format. To actual
encoding TIFFRenderer uses slightly modified free of charge open source TIFF
codec [1] by Sun Microsystems, Inc. (Actually, a very similar TIFF codec is
included in Batik distribution, but unfortunately it has very limited support
for TIFF compression methods). TIFFRenderer has no dependencies on JAI, JIMI
or other image processing libraries.

For demonstration of using TIFFRenderer in a web application see TIFFRenderer
Demo [2].


* Supported TIFF compression methods:
         o Raw uncompressed data
         o Byte-oriented run-length encoding "PackBits" compression
         o Modified Huffman Compression (CCITT Group 3 1D facsimile compression)
         o CCITT T.4 bilevel compression (CCITT Group 3 2D facsimile compression)
         o CCITT T.6 bilevel compression (CCITT Group 4 facsimile compression)
         o JPEG-in-TIFF compression
         o DEFLATE lossless compression (also known as "Zip-in-TIFF")
* Ability to add extra images before/after those generated by FOP.


Not sure yet. Tested with FOP 0.20.3 under Sun JRE 1.3.1, 1.4. Definitely
doesn't work under IBM JDK1.2.2 (WebShere 3.5) because of some bug in AWT

Download and Installation

* Compiled version: tifferenderer-0.9.jar (140 Kb) [3].
* Sources: tifferenderer-0.9-src.jar (180 Kb) [4].

Just put tiffrenderer-0.9.jar into the CLASSPATH.
Testing: run TIFFRendererTest class with two arguments - xsl-fo file and tiff
file to be generated (having fop related jars and tiffrenderer-0.9.jar in the

java com.multiconn.fop.TIFFRendererTest table.fo table.tif


See TIFFRenderer Javadoc [5].
Main pattern of using TIFFRenderer is a very primitive one:

//Creates TIFFRenderer instance
TIFFRenderer tiffRenderer = TIFFRendererFactory.newTIFFRenderer();
//Creates render/encode params collection
TIFFRendererParams params = new TIFFRendererParams();
//Sets up params
//Sets params to the renderer
//Sets renderer to the FOP driver
//Runs FOP
See also TIFFRendererDemo servlet source [6] as example of using TIFFRenderer
in a servlet.

Licence issues

TIFFRenderer is subject to the Mozilla Public License Version 1.0 and is
distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
or implied. Original TIFF codec source code licence by Sun Microsystems, Inc.:
JAI_1.1.1_sample_io_sourcecodelic.10_23_01.txt [7].

To be done

* Diminish library size by eliminating duplicate classes, which are
already in Batik jar.


Any comments and suggestions would be greatly appreciated, feel free to
contact me: <olegt@multiconn.com>.


[1] http://developer.java.sun.com/developer/sampsource/jai
[2] http://www.tkachenko.com/fop/TIFFRendererDemo
[3] http://www.tkachenko.com/fop/tiffrenderer-0.9.jar
[4] http://www.tkachenko.com/fop/tiffrenderer-0.9-src.jar
[5] http://www.tkachenko.com/fop/tiffrenderer-doc/index.html
[6] http://www.tkachenko.com/fop/TIFFRendererDemo/src/TIFFRendererDemoServlet.java
[7] http://www.tkachenko.com/fop/JAI_1.1.1_sample_io_sourcecodelic.10_23_01.txt

Oleg Tkachenko
Multiconn International, Israel
Received on Sunday, 12 May 2002 05:10:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:25 UTC