Hello,
I am using Aspose.PDF version 2010.03.11 to add two tif documents to new pdf document. However, only the second tif document actually appears in the generated pdf. Using a previous version of Aspose.PDF (2009.05.29) this worked correctly. I have also testing with 2010.06.01. It looks like all of the pages are in the pdf but seem “stacked” on top of each other?
Has something changed in the API? Here is the code I am using:
Aspose.Pdf.License l = new Aspose.Pdf.License();
l.SetLicense(@“Aspose.Total.lic”);
Pdf pdf = new Pdf();
pdf.PageSetup.PageHeight = PageSize.A4Height;
pdf.PageSetup.PageWidth = PageSize.A4Width;
pdf.PageSetup.PageBorderMargin.Left = 0;
pdf.PageSetup.PageBorderMargin.Right = 0;
pdf.PageSetup.PageBorderMargin.Top = 0;
pdf.PageSetup.PageBorderMargin.Bottom = 0;
List pages = new List();
pages.Add(@“1.tif”);
pages.Add(@“2.tif”);
foreach (string page in pages)
{
Section section = pdf.Sections.Add();
section.PageInfo.PageBorderMargin.Left = 0;
section.PageInfo.PageBorderMargin.Right = 0;
section.PageInfo.PageBorderMargin.Top = 0;
section.PageInfo.PageBorderMargin.Bottom = 0;
Aspose.Pdf.Image image = new Aspose.Pdf.Image(section);
section.Paragraphs.Add(image);
image.ImageInfo.File = page;
image.Margin.Bottom = 0;
image.Margin.Left = 0;
image.Margin.Right = 0;
image.Margin.Top = 0;
image.ImageInfo.ImageFileType = ImageFileType.Tiff;
image.ImageInfo.IsBlackWhite = false;
image.ImageInfo.IsAllFramesInNewPage = true;
image.PositioningType = PositioningType.PageRelative;
image.Top = 0;
image.Left = 0;
image.ImageInfo.FixWidth = PageSize.A4Width;
image.ImageInfo.FixHeight = PageSize.A4Height;
image.ImageInfo.CcittSubFormat = CcittSubFormat.Group4;
}
pdf.Save(@“Merged.pdf”);
Attached are the tif documents I am using. Thanks.
James