Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Converting Multi page tiff into pdf

$
0
0

I need to convert multi page tiff to pdf. But all are oming empty except first page. is there any solution for this?

I am using following code for conversion.

Pdf pdf1 = new Pdf();

                    //Create a section in the Pdf object

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

                    //Create an image object in the section

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

                    //Add image object into the Paragraphs collection of the section

                    sec1.Paragraphs.Add(image1);


                    //Set the path of image file

                    image1.ImageInfo.File = url;

                    //Set the type of image using ImageFileType enumeration

                    image1.ImageInfo.ImageFileType = ImageFileType.Tiff;

                    //Set image title

                    image1.ImageInfo.Title = "TIFF image";

                    // Set the value to -1 so that all the frames of TIFF image are included in PDF document

                    image1.ImageInfo.TiffFrame = -1;

                    //Save the Pdf

                    image1.ImageInfo.IsAllFramesInNewPage = true;



                    string changed = Path.ChangeExtension(url, ".pdf");

                    pdf1.Save(changed);


                    this.axWebBrowser1.Navigate(changed, ref Zero, ref EmptyString,

                     ref EmptyString, ref EmptyString);



I have attached sample multi page tiff file here.


Viewing all articles
Browse latest Browse all 3131

Trending Articles