Hi.
I'm generating and storing tiffs then converting them to pdfs using DynamicPDF. This works great for CCITT4 compressed black and white images.
I have some tiffs containing 8-bit greyscale or colour images compressed using LZW (this seems to be the only compression .NET/GDI+ can use for colour images). However, PDFs can't contain LZW compressed images so they must be decompressed and compressed again using Deflate by DynamicPDF. This is much slower than pass-through, as you would expect.
What compression scheme should I use for my greyscale/colour tiffs so that DynamicPDF can use pass-through?
I tried generating tiffs with Deflate compression (using LibTIFF), but DynamicPDF gives an error:
"ceTe.DynamicPDF.Imaging.ImageParsingException: TIFF Compression value 8 (Flate/Deflate) is not supported."
What would you suggest?
Thanks.
Scott
Tiff compression supported for colour images
Re: Tiff compression supported for colour images
Support · Oct 4, 2006Hello Scott,
Since both TIFF and PDF files are different in format and in order to be able to place the LZW TIFF image on the PDF document, it needs to be decompressed and reformatted in order to make it compatible with the format recognized by PDF.
The solution would be to use 8-bit grayscale PNG image and this will produce much better results and it also uses pass-through process.
Thanks,
ceTe Software Support Team
Re: Tiff compression supported for colour images
Forum member · Oct 5, 2006Hi Support.
Thanks for your quick reply.
I agree that an LZW compressed tiff must be decompressed and recompressed (using Flate) to be added to a pdf. It's just unfortunate for me that DynamicPDF can't read Flate compressed tiffs and output them to pdf using pass-through.
I have found a solution using the open source LibTIFF library. I use cptiff to convert my tiffs to be Flate compressed with one strip (i.e. set the rows per strip to the length of the image - the command is: cptiff -r -1 -z input output). In this format the tiff2pdf tool can generate pdfs using pass-through.
Scott