Hi,
I've got some multi page tiff files that need to be converted to PDF. However the tiff file contains pages of different sizes, eg A4., A3, A1, etc.
I tried to convert using your sample code, but all the pages come out in A4.
// Instantiate an object PDF class
Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
// add the section to PDF document sections collection
Aspose.Pdf.Generator.Section section = pdf.Sections.Add();
// create an image object
Aspose.Pdf.Generator.Image image = new Aspose.Pdf.Generator.Image(section);
// provide the path for TIFF image file\
image.ImageInfo.File = @"c:/temp/A1_A4_A4i.tif"; // (multipage tiff - included)
// specify the input image file type
image.ImageInfo.ImageFileType = Aspose.Pdf.Generator.ImageFileType.Tiff;
// add image to paragraphs collection of section
section.Paragraphs.Add(image);
// specify the value to include all the frames of image file into resultant PDF
image.ImageInfo.TiffFrame = -1;
image.ImageInfo.IsBlackWhite = true;
//Save the pdf document
pdf.Save(@"c:\temp\A1_A4_A4.pdf");
Should the above convert the pages using the input page size or is additional coding required?
I have attached a sample file that contains A1 and 2 A4 pages.
Regards,
Bernard