Free Support Forum - aspose.com

Converting multi-frame to Pdf

Hi!


When following your example, only the first frame/page of the tif is included in the pdf-file. Do you have an example of how to do this when converting multi-frame tif to pdf using the DOM approach?

Hi Stein,


Thanks for your inquiry. Please check following code snippet for converting multi-page tiff to Pdf. Hopefully it will serve the purpose.

Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section sec1 = new Aspose.Pdf.Generator.Section(pdf);
pdf.Sections.Add(sec1);
Aspose.Pdf.Generator.Image image1 = new Aspose.Pdf.Generator.Image(sec1);
sec1.Paragraphs.Add(image1);

string filename = myDir + “multi-tiff.tif”;

image1.ImageInfo.File = filename;
image1.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Tiff;
image1.ImageInfo.IsAllFramesInNewPage = true;
image1.ImageInfo.Title = “Tiff image”;

pdf.Save(myDir + “output.pdf”);

Please feel free to contact us for any further assistance.

Best Regards,

Hi!


Thank you for the example.

We have already tried this approach and it works fine, but the performance is too slow for our usage for both single-frame tiffs and multi-frame tiffs.

We are in a process where we are investigating if we can replace our existing solutions by using your products. For conversion of Office-files (Words/Excel) to pdf we are very satisfied, but we also have a high volume of tiff-images we want to convert to pdf. The conversion is done when the user is opening the image, and therefore the performance is very important.

Do you have any other approach to how we can do this with even better performance? Our existing solution converts the same tiffs to pdf 6-7 times faster than your example.

Are you working with the performance for future releases?

Regards,
Stein Roar Helle

Hi Stein,


Thanks for your feedback. Please check following documentation link for improving performance while converting Tiff image to Pdf. Hopefully it will serve the purpose. If issue persist then please share your sample image here? So we will test it at our end and will provide you more information accordingly.


Sorry for the inconvenience faced.

Best Regards,