I am using Aspose.Pdf to convert TIF images to PDF. It works great with non-color TIF images. While trying to convert color TIF images (scanned by Kodak Image scanners using our custom applicaiton), i am having issues. Is there any limitations/conditions for converting color TIFs to PDF.
Following is the C# code snippet i tried to convert a color tiff file.
Aspose.Pdf.Pdf pdf1 = new Aspose.Pdf.Pdf(); pdf1.PageSetup.PageHeight = Aspose.Pdf.PageSize.LetterHeight; pdf1.PageSetup.PageWidth = Aspose.Pdf.PageSize.LetterWidth; Aspose.Pdf.Section sec1 = pdf1.Sections.Add(); Aspose.Pdf.Image image1 = new Aspose.Pdf.Image(sec1); image1.ImageInfo.FixHeight = Aspose.Pdf.PageSize.LetterHeight; image1.ImageInfo.FixWidth = Aspose.Pdf.PageSize.LetterWidth; sec1.Paragraphs.Add(image1); image1.ImageInfo.TiffFrame = -1; image1.PositioningType = PositioningType.PageRelative; image1.ImageInfo.File = txtSecondFile.Text; // Input file name by a text box image1.ImageInfo.ImageFileType = ImageFileType.Tiff; image1.ImageInfo.IsAllFramesInNewPage = true;
Can you please provide us with the TIF images that you are having problems with. Also include the produced PDF accompanied by a detailed description of the problem. This way we can more accurately determine the cause of the problem.
Attached is the TIF file I tried to convert. A pdf file was n't created. An error "can't open the file" error was thrown out at the Save method of pdf object.
I have tested the file and was able to reproduce the error. I have logged this as PDFNET-4181 in our issue tracking system. We will try our best to resolve this issue as soon as possible.
This issue is still under processing at present. I am sorry we can’t fix it in time. We may need about five days more to offer an update. We appreciate your patience.
Sorry for the delay of this task. After investigating this problem we found it is not easy to support this image. This image is strage and I can’t open it with MS print. If I open it with some image viewer (such as Acdsee) and resave it, then Aspose.Pdf can support the resaved file. So we still can’t support this image in short time. As a workaround you can resave your image.