I don't think TIFF output from 0.92 will satisfy you. There have been
substantial improvements since 0.92 in FOP Trunk. I suggest you use that.

Configuration of the output compression to make the file smaller:
    <renderer mime="image/tiff">
      <compression>CCITT T.6</compression>
    </renderer>

Use "CCITT T.6"as value if you don't need grayscales, just 1bit images.
Use "PackBits" or "Deflate" otherwise.

0.92 did not compress the images, but FOP Trunk compresses with PackBits
by default, so just upgrading to FOP Trunk will shrink the image size.

I'll see to it that the website is updated. I've already documented the
compression options but have not since redeployed the website.

Here's the section of the documentation that describes this:
    <section id="tiff-configuration">
      <title>TIFF-specific Configuration</title>
      <p>
        In addition to the above values the TIFF renderer configuration allows 
some additional
        settings:
      </p>
<source><![CDATA[<renderer mime="image/tiff">
  <transparent-page-background>true</transparent-page-background>
  <compression>CCITT T.6</compression>
  <fonts><!-- described elsewhere --></fonts>
</renderer>]]></source>
      <p>
        The default value for the "compression" setting is "PackBits" which 
        which is a widely supported RLE compression scheme for TIFF. The set of 
compression
        names to be used here matches the set that the Image I/O API uses. Note 
that
        not all compression schemes may be available during runtime. This 
depends on the
        actual codecs being available. Here is a list of possible values:
      </p>
      <ul>
        <li>NONE (no compression)</li>
        <li>PackBits (RLE, run-length encoding)</li>
        <li>JPEG</li>
        <li>Deflate</li>
        <li>LZW</li>
        <li>ZLib</li>
        <li>CCITT T.4 (Fax Group 3)</li>
        <li>CCITT T.6 (Fax Group 4)</li>
      </ul>
      <note>
        If you want to use CCITT compression, please make sure you've got a 
J2SE 1.4 or later and
        <a href="http://java.sun.com/products/java-media/jai/current.html";>
          Java Advanced Imaging Image I/O Tools
        </a>
        in your classpath. The Sun JRE doesn't come with a TIFF codec built in, 
so it has to be
        added separately. The internal TIFF codec from XML Graphics Commons 
only supports PackBits,
        Deflate and JPEG compression for writing.
      </note>
    </section>

On 01.11.2006 17:41:33 Richard King wrote:
> Hi all,
> I currently use fop 0.92 to product PDF documents but have had a
> request to also produce a TIFF documents.  To this end I updated my java code 
> so
> MIME_TIFF is used.
> 
> The file produced is very large.
> The PDF created is 145KB
> The equivalent tiff file is 9650KB!
> 
> Is there any way to reduce this file size?
> Are there any other alternatives I could consider?
> 
> Many thanks,
> Richard



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to