SVG/TIFF Serializer
http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Main
User Documentation

Serializers
Overview

Default
HTML Serializer

Core
XHTML Serializer
XML Serializer
Text Serializer
WAP/WML Serializer
SVG Serializer
SVG/XML Serializer
SVG/JPEG Serializer
SVG/PNG Serializer
SVG/TIFF Serializer
VRML Serializer
Link Serializer
Zip archive Serializer

Optional
PDF Serializer
PS Serializer
PCL Serializer
HSSF (XLS) Serializer

SVG/TIFF Serializer

The SVG/TIFF serializes an xml svg document to a tiff image. The serialization uses the Batik's TIFFTranscoder internally.

  • Name : svg2tiff
  • Class: org.apache.cocoon.serialization.SVGSerializer
  • Cacheable: yes
Sitemap Configuration

A minimal sitemap configuration snippet declaring the svg2tiff serializer:

<map:serializers..
  <map:serializer name="svg2tiff"
    src="org.apache.cocoon.serialization.SVGSerializer"
    mime-type="image/tiff"
    logger="sitemap.serializer.svg2tiff"
  >
  </map:serializer>

A sitemap pipeline snippet using the svg2tiff serializer:

<map:match pattern="svg/*.tiff">
  <map:generate src="docs/samples/svg/{1}.svg"/>
  <map:serialize type="svg2tiff"/>
</map:match>

In the declaration section of the svg2tiff a number of parameters can be specified. The following snippet set the background color explicitly:

<map:serializers..
  <map:serializer name="svg2tiff"
    src="org.apache.cocoon.serialization.SVGSerializer"
    mime-type="image/tiff"
    logger="sitemap.serializer.svg2tiff"
  >
    <parameter name="background_color" type="color" value="#ff00ff"/>
  </map:serializer>
TIFFTranscoder Parameters

General ImageTranscoder parameters are described at the SVG Serializer user documentation.

The following section presents TIFFTranscoder specific parameters configurable for the TIFFTranscoder.

ParameterTypeComment
force_transparent_whitebooleanIt controls whether the encoder should force the image's fully transparent pixels to be fully transparent white instead of fully transparent black. This is usefull when the encoded TIFF is displayed in a viewer which does not support TIFF transparency and lets the image display with a white background instead of a black background. However, note that the modified image will display differently over a white background in a viewer that supports transparency.
Further Reading

Further details about TIFFTranscoder, ImageTranscoder is available at Batik.

Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.