2004.08.20 10:06 "[Tiff] Tiff2pdf with zlib", by Beppe Costagliola

2004.08.20 16:02 "Re: [Tiff] Tiff2pdf with zlib", by Ross A. Finlayson

Hi Beppe,

I've ported the latest Tifflib 3.6.1 to my iSeries with the tiff2pdf.1.4.

Everything works fine and I use it to convert spooled files to PDF.

The TIFF is created from and AFP spooled file with an IBM api called HostPrintTranform and the generated PDF has the attribute /CCITTFaxDecode

I've tried to include the zlib modules and rebuilt all.

I call the tiff2pdf with the -z option, it runs without errors, but the pdf is still the same.

That is by design. For most cases Group IV Fax cmpression is more efficient in output size in compressing the image. Some type of images are better compressed with LZ77, Deflate, Zip. Those are highly speckled or halftoned images, JBIG encoding is better than Group IV Fax or Zip in file size, if not necessarily computational requirements.

Also, in the conversion, when the input image is already compressed with Fax compression, the tiff2pdf program can copy it right over to the PDF file without handling the compressed domain image data.

It should be not a problem to add the logic so that when you select, say, the -n option for no data passthrough, and then the -z option for zip, with maybe the -d option for decompress or don't compress, to get some intuitive combination that would instruct the program that you want the file compressed with Deflate.

I'm trying to figure out Ionita's tags, if I can get a patch to tiff2pdf.c for that then I will try and figure out a good way for you to set that option.

Ross F.