Hello,
I have build a utility that will pull file & path information for TIFF files from a database, then loop through the records and add each TIFF image to a new Page object. When I attempt to add more than 1 page worth of images (i.e. the recordset returns 3 records which point to three distinct images, and I add a new page then add the image, then proceed to the next record and repeat) the first page displays fine, but the others are blank.
I can open the TIFF files that are trying to be added to the document in Brava! Reader, however I cannot open them in Photoshop. I do not know how to tell if the file is corrupt, but I would think that if it is open-able in Brava! that it should be able to be added and displayed in the PDF document.
The code I am using to add the image is below (This code is called for each record in my recordset):
private void AddImage(string imagePath)
{
// Create a new page to hold the image
ceTe.DynamicPDF.Page page = new ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Portrait, 36.0f);
// Instantiate the image object with the path passed in
ceTe.DynamicPDF.PageElements.Image img = new ceTe.DynamicPDF.PageElements.Image(ConfigurationSettings.AppSettings["ImagePath"] + imagePath, 0, 0);
// Set the bounds of the image so it doesn't fall off the page
img.SetBounds((page.Dimensions.Width - 72.0f), (page.Dimensions.Height - 72.0f));
// Add the image to the page
page.Elements.Add(img);
// Add the page to the merge document
m_Document.Pages.Add(page);
}
Any ideas?
I am using version 4.0.3.20 (Build 70403) of DynamicPDF for .NET 2.0 - Server Edition
Thank you for your time!
Matt L.