Home/FOP/TIFFRendererEnglish/Russian

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 for 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 perform actual encoding TIFFRenderer uses slightly modified free of charge open source TIFF codec 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).

Features

  • Supported TIFF compression methods:

    • Raw uncompressed data

    • Byte-oriented run-length encoding "PackBits" compression

    • Modified Huffman Compression (CCITT Group 3 1D facsimile compression)

    • CCITT T.4 bilevel compression (CCITT Group 3 2D facsimile compression)

    • CCITT T.6 bilevel compression (CCITT Group 4 facsimile compression)

    • JPEG-in-TIFF compression

    • DEFLATE lossless compression (also known as "Zip-in-TIFF")

  • Ability to add extra images before/after those generated by FOP.

Requirements

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 implementation.

Download and Installation

There are two versions of TIFFRenderer available - full version and Batik-dependent one (recommended). Batik-dependent version is much smaller and relies on Batik.

Installation: just put compliled version jar into the CLASSPATH.

Documentation

Main pattern of using TIFFRenderer is a very primitive one:

	//Creates TIFFRenderer instance
	TIFFRenderer tiffRenderer = TIFFRendererFactory.newTIFFRenderer();
	//Creates render/encode param collection
	TIFFRendererParams params = new TIFFRendererParams();
	//Sets up params
	params.setCompression(TIFFRendererParams.COMPRESSION_GROUP3_1D);
	//Sets params to the renderer
	tiffRenderer.setRenderParams(params);
	//Sets renderer to the FOP driver
	driver.setRenderer(tiffRenderer);
	//Runs FOP
	driver.run();
		
See also TIFFRendererDemo servlet source 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.

It's free software, but any donations are greatly appreciated

To be done

  • Integrate TIFFRenderer into FOP.

Feedback

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