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

Free Support Forum - aspose.com

Color tiff saved with windows photo galery cannot be opened by aspose.pdf


I’m trying to insert a tiff image into a PDF document.

However I get an exception…

Below is the code and the link to the image

Aspose.Pdf.Pdf fDoc = new Aspose.Pdf.Pdf();

Section fSection = fDoc.Sections.Add();

fSection.IsNewPage = true;

Image fImage = new Image(fSection);

            fImage.ImageInfo.File = @"F:\werk\voorbeeld2.tiff";//args[0];<br>
            fImage.ImageInfo.IsAllFramesInNewPage = true;<br>
            fImage.ImageInfo.TiffFrame = -1;<br>
            fImage.ImageInfo.ImageFileType = ImageFileType.Tiff;<br>
            fImage.ImageInfo.IsBlackWhite = false;

[link to tiff]

Any help would be appreciated…


Thank you for considering Aspose.

It seems this image is not supported by .Net. The following line throw exception:
System.Drawing.Bitmap bm = new System.Drawing.Bitmap(“voorbeeld2.tif”);

I am afraid we can’t support this image in short time. As a workaround you can open the image with some image viewer such as Acdsee and resave it with lzw compression.