Can't open image file

Hi.
I get this error message when trying to convert a tiff image to PDF:
"Can't open image file [path]"
The exception is thrown in pdf1.Save(...

I have no problem open it in MS Document Imaging and it works fine with other documents.
I´m on Windows XP SP3 and Aspose.Pdf 5
Here is the code:

private Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense(_settings.GetSetting("AsposeTotalLicensFilePath"));

Pdf pdf1 = new Pdf();
Aspose.Pdf.Section sec1 = pdf1.Sections.Add();

sec1.PageInfo.Margin.Top = 0;
sec1.PageInfo.Margin.Bottom = 0;
sec1.PageInfo.Margin.Left = 0;
sec1.PageInfo.Margin.Right = 0;

Aspose.Pdf.Image image1 = new Aspose.Pdf.Image(sec1);

sec1.Paragraphs.Add(image1);

image1.ImageInfo.File = docProperties.Path + "\\" + docProperties.Filename;
image1.ImageInfo.ImageFileType = ImageFileType.Tiff;
image1.ImageInfo.TiffFrame = -1;

string newFilename = Path.GetFileNameWithoutExtension(docProperties.Filename) + ".pdf";

pdf1.Save(outputPath + "\\" + newFilename);

The file is attached.

Hello Mathias,

Thanks for using our products.

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNET-26210. We will investigate this issue in details and will keep you updated on the status of a correction. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We apologize for your inconvenience.

Any resolution for this. I am seeing the same error.

Hi,

Thanks for using our products.

I am pleased to inform you that the issue reported earlier in this thread has been resolved. However for your particular scenario, I think it would be great if you could please share your source document so that we can test it with upcoming release version.

The issues you have found earlier (filed as 26210) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

I just noticed the tiff file I was unable to open was compressed with jpeg compression. Was that the problem? I´ve tried the new version of Aspose.Pdf (5.3) and i solved my problem. The reason I ask, is that I can´t open the file with System.Drawing,Image.FromStream, probably because of the jpeg compression.

Hello Mathias,

I am glad to hear that your problem is fixed. In fact the TIFF had compression value 6 (old-style jpeg compression), which is not supported by Windows GDI. However we have added a support of this compression type in our product.

In the event of any further query, please feel free to contact.