Tiff File Not able to view

We are having a multipage tiff that should be opened using Aspose. but some tiff we can open and some tiff files opened as Empty documents and there is no error or exception. But we can open those tiff files separately other than aspose .

Aspose version details used for tiff to pdf conversion
Aspose.Drawing : 23.8.1.0
Aspose.Imaging : 23.12.0.0
Aspose.PDF : 23.12.0.0

License edition: Professional
License version 3.0

@Nandhini_D,

Which Aspose API are you using to load a TIFF file and save it to PDF? Are you using all three APIs you mentioned for the task and encountering the issue? Could you please zip and attach your sample (multipage) TIFF file? Also, paste the sample code that you are using to reproduce the issue, and we will check your issue soon.

Hi,

We have used all the APIs mentioned in the previous message and attached the code we used. Unfortunately, we cannot share the sample TIFF file that was used.

Could you please review our code and assist us in resolving this issue?

case ".tif":
case ".tiff":
	Aspose.Pdf.Document PdfDocument = new Aspose.Pdf.Document();
	Aspose.Drawing.Bitmap Bitmap = new Aspose.Drawing.Bitmap(ms);
	Aspose.Drawing.Imaging.FrameDimension Dimension = new Aspose.Drawing.Imaging.FrameDimension(Bitmap.FrameDimensionsList[0]);

		int FrameCount = Bitmap.GetFrameCount(Dimension);
		for (int FrameIdx = 0; FrameIdx < FrameCount; FrameIdx++) 
			{ 
				Aspose.Pdf.Page page = PdfDocument.Pages.Add();
				Bitmap.SelectActiveFrame(Dimension, FrameIdx);
		
				MemoryStream currentImage = new MemoryStream();
				Bitmap.Save(currentImage, Bitmap.RawFormat);
		
				page.PageInfo.Margin.Left = 30;
				page.PageInfo.Margin.Right = 30;
				page.PageInfo.Margin.Top = 65;
		
				Aspose.Pdf.Image ImageDocument = new Aspose.Pdf.Image();
				ImageDocument.ImageStream = currentImage;
				page.Paragraphs.Add(ImageDocument);
            }
	PdfDocument.Save(convertedstring, Aspose.Pdf.SaveFormat.Pdf);

	FileContent = convertedstring.ToArray();
 break;

@Nandhini_D,

Thanks for the code segment.

I am moving your thread to respective forum where one of our fellow colleagues from Aspose.PDF team will assist you soon.

@Nandhini_D

Would you kindly share your sample TIFF in .zip format with us? We will test the scenario in our environment and address it accordingly.

Hi,

We are unable to share the sample multipage TIFF file because it contains PHI data. However, we masked the PHI data and checked the same files, which worked as expected."

As per my previous message, there are no errors or exceptions.
Could you please suggest how we can identify the root cause in this case?

@Nandhini_D

We are afraid that we cannot suggest much without replicating and investigating the issue in our environment. Therefore, we needed the sample TIFF image. If it is possible for you to collect some sample image which can be used to replicate the issue, it would be much appreciated.