Hi, I'm evaluating DynamicPDF Rasterizer for my company since we are interested in using it for conversion of PDF into TIFF. Unfortunately I got a problem with conversion. No matter which method I choose for TiffCompression I always get LZW compressed results, everything else is working fine.
Is that maybe a known bug? Or am I doing something wrong?
Thanks for your answer!
Bye,
Christoph
see my code below:
private static byte[] pdf2tiff(byte[] inStream, string fileName, TiffCompression tiffCompression, TiffColorFormat imageColor, ImageSize imageResolution){
InputPdf inputPdf = new InputPdf(inStream);
PdfRasterizer pdfRasterizer = new PdfRasterizer(inputPdf);
TiffImageFormat tiffImageFormat = new TiffImageFormat(imageColor, tiffCompression);
return pdfRasterizer.DrawToMultiPageTiff(tiffImageFormat, imageResolution);}
Compression Problems
Re: Compression Problems
Support · Feb 4, 2009Hello Christoph,
We will forward this issue over to developers to look into it further. We will post a message in this forum as soon as we have some updates on this issue.
Thanks,
ceTe Software Support Team.
Re: Compression Problems
Support · Feb 9, 2009Hello Christoph,
We just heard back from the developers. After doing some research they found that CCITGroup3 and CCITGroup4 compression are meant only for monochrome images and not for color images. You will have to change the TiffColorFormat to Monochrome in order to set CCITGroup3 or CCITGroup4 compression. For any other TiffColorFormat the compression will be LZW.
We do have a new build available that will give a more friendly message when you have this scenario. If interested in getting a new build, please send an email to our [^a|mailto:support@cete.com|opennewwindow|Support team^] and they will send you a link to download the new DLL files.
Thanks,
ceTe Software Support Team
Re: Compression Problems
Forum member · May 9, 2009Hi,
I have the same problem, the TIFF images returned all have the LZW compression instead of the specified CCITT4.
The .dll's I downloaded yesterday have a datestamp of 11-14-2008 and 11-20-2008. Can I receive the .pathed dll's a referred to in the last post?
Thanks in advance.
Best regards,
Peter
Re: Compression Problems
Forum member · May 9, 2009Did some further testing with the singlepage tiff method: Draw.
The TiffImageFormat settings only seems to work for the Draw method. The settings do'nt have any effect when used in the DrawToMultiPageTiff method.
Is this fixed in the new .dlls?
Regards,
Peter
Re: Compression Problems
Support · May 11, 2009Hello Peter,
Can you please send over the code and the input PDF you are using to our [^a|mailto:support@cete.com|Support Team^] so that we can do some testing on our end. Also we can send you the link to download the latest build product.
Thanks,
ceTe Software Support Team.
Re: Compression Problems
Forum member · May 11, 2009The source PDF file doesn't really matter, any pdf file is fine for reproducing the following code:
// create the rasterizer
PdfRasterizer rasterizer = new PdfRasterizer(@c:\59.pdf);
// create tiff settings, monchrome and CCITTgroup4
TiffImageFormat tiffImageFormat = new TiffImageFormat(TiffColorFormat.Monochrome, TiffCompression.CcitGroup4);
// generates MultiPageTiff, but INGORES the TiffImageFormat settings, output is alway tiff with LZW;
rasterizer.DrawToMultiPageTiff(@"c:\59.tif", tiffImageFormat, ImageSize.Dpi300);
// generates single page tiff files with correct TiffImageFormat settings
rasterizer.Draw(@"c:\59.tif", tiffImageFormat, ImageSize.Dpi300);
// more control over the filenames for single page tif, also uses the correct imageformat settings
for (int i = 0; i < rasterizer.Pages.Count; i++)
{
outputFileName = outputFileNameBase + i + ".tif";
rasterizer.Pages[i].Draw(outputFileName, tiffImageFormat, ImageSize.Dpi300);
}
Re: Compression Problems
Support · May 13, 2009Hello,
The issue with setting the compression for TIFF images when using DrawToMultiPageTiff method has been resolved in Build 13125.
Please make sure to get the latest build from the web site if you are experiencing this same behavior.
Thanks,
ceTe Software Support Team