Free Support Forum - aspose.com

Multi-Page TIFF Files

I am using the evaulation version of ASPOSE.PDF and I am trying to pull in multi page tiff files via a VB.NET application. I am successful in doing this but it only allows me to show one page. I want all pages of the TIFF to be added to the PDF. Is there any way to do this?

Hi musicj,

Thank you for considering Aspose.

Please refer to Image in our programmer’s guide.

I have read that and it doesn’t help me much. Each tiff will vary in the amount of pages that they have and could range from 1 page to 20 pages. Regardless of the how many it has I need it to convert it to PDF and include all of the pages. Help!?

Thanks!

Sorry Aspose.Pdf has not the function to convert all frames of tiff image because it does not know where to place all the images. You can use the following code to get the frames number:

System.Drawing.Bitmap bm = new System.Drawing.Bitmap(“image.tif”);
int total = bm.GetFrameCount(FrameDimension.Page);

I have added that code:

System.Drawing.Bitmap bm = new System.Drawing.Bitmap("image.tif");
int total = bm.GetFrameCount(FrameDimension.Page);

But it tells me that FrameDimension is not declared, do I need to replace that with something or do I need to import another namespace to allow that to work?

Nevermind, I wasn’t importing the System.Drawing.Imaging namespace… got it now.