We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error in tiff codec: Error reading from Tiff stream

We have an application that requires converting pdf files generated with the Aspose.Pdf.Kit
to tiff files. We do the pdf conversion to tiff with the following code:

PdfConverter converter = new PdfConverter();
converter.Resolution = 100;

The generated tiff file is viewable in the Microsoft Office Document Image viewer and in Paint. But I
receive the following exception when trying to save frame images from separate tiff files into one combined tiff file, I our case using Atalasoft’s ImageCollection class below:

for (int j = 0; j < RegisteredDecoders.GetImageInfo(imagePath).FrameCount; j++)
singleImageCollection.Add(new AtalaImage(imagePath, j, null));

Exception: "Error in tiff codec: Error reading from Tiff stream"

This doesn’t happen consistently, just with some of the pdf files we create. All PDF files are generated with Aspose.Pdt.Kit from PDF template files created using Adobe Acbrobat Professional - PDFMaker 9.1

File version
Production version 2009.12.25

Acrobat Distiller 9.0.0(Windows)
PDF Version 1.6

What could be the problem?

Hi Paul,

Thank you very much for considering Aspose.

As you have noticed that the TIFF files generated by Aspose.Pdf.Kit can be opened and viewed by other tools and software, there might be a possibility that the issue is with Atalasoft’s tool while reading some TIFF files. Did you try to discuss this issue with Atalasoft’s team? Kindly share these details with them so they could check the issue at their end.

However, if you still find any issues with the TIFF images themselves, please do let us know.

We’re sorry for the inconvenience and looking forward to help you out.

Yes. There seems to be issues with the TIFF itself. TIFF image information seems to be missing when I look at the Details tab in file properties from a problem. I have attached a copy of a tiff (and the source pdf file it was generated from) that causes this error. Can you look at it? Thanks.

Hi Paul,

Thank you very much for sharing further details and the related files. We’ll investigate this issue in detail at our end and you’ll be updated the earliest possible.

We’re sorry for the inconvenience.

Hi Paul,

Can you please share which properties or information is missing? Which tool are you using to view these properties? I hope this information will help us further investigate the issue.

We’re sorry for the inconvenience and appreciate your cooperation.

The image properties are missing when I right click on the tiff icon and view properties in Windows.

To add a little background, The PDF file we sent you was generated using Aspose.Pdf.Kit from a PDF template file that originally started out as a Microsoft Word document and then was saved as a PDF. The tiff file we sent you was created from the PDF output file we sent you using the PdfConverter.SaveAsTiff method in Aspose.Pdf.Kit 4.0. However, we also created created PDF form templates directly using Adobe Acrobat Professional and we have the same problem creating tiff files with it. One thing appears to be consistent regardless of the PDF source file used: PDFs containing two pages converted to tiff produce good tiff files. But one page PDF files converted to tiff files throw the exception: "Error in tiff codec: Error reading from Tiff stream" when adding the tiff to an Atalasoft ImageCollection (whom we also have a case open with). We tried using Aspose.Pdf.Kit 4.3, but it produces the same error.

Also, we would like to obtain an evaluation copy of Asopse.Pdf.Kit 4.3. Where can we download from you site?

Hi Paul,

I checked the image at my end and I can see image properties as in the attached snapshot. However, we need to investigate this issue further at our end to verify the image. Please spare us some time before we look into this issue in detail and you’ll be updated accordingly.

Also, you can download the latest version of Aspose.Pdf.Kit for .NET from this link.

If you have any further questions, please do let us know.