We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Adding .tif documents to a new PDF


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();

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();

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);
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;

Attached are the tif documents I am using. Thanks.


Hello James,

I have tested the scenario and I’m able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNET-17602. We will investigate this issue in details and will keep you updated on the status of a correction. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We apologize for your inconvenience.

Thanks for that,. Is this likely to be fixed soon or is there a workaround? This functionality is quite important to us.

Hello James,

Our development team will look into the details of this problem and once we have some updates regarding the resolution of this problem, we would be pleased to update you with the status of correction.

Your cooperation and comprehension is greatly appreciated in this regard. We are sorry for your inconvenience.