I've created a web service that generates a dynamic Excel file that has charts and images, and converts it to pdf using ExportAsFixedFormat. I've managed to get it working perfectly on my development machine. Installed is Excel 2007 (v12.0.6661.5000) SP3 MSO (12.0.6607.1000) on Windows 7 Pro x64.
Basic code (using C#):
The problem is that when I run the same service on our test server, one of the images (ie. not all) doesn't show up. Instead is the message
The same thing happens on our production server as well when I tried a test there.
I have also tried using a third party application (activePdf Server), but am having the exact same issue with the image. It works fine on my machine, but not the server.
Can anyone please help me with this?
Basic code (using C#):
Code:
workBook = app.Workbooks.Open(@"C:\temp\Original.xlsx", Type.Missing, true, Type.Missing, Type.Missing, Type.Missing, true, Type.Missing, Type.Missing, false, false, Type.Missing, false, Type.Missing, Type.Missing);
workBook.Activate();
workBook.ExportAsFixedFormat(Microsoft.Office.Interop.Excel.XlFixedFormatType.xlTypePDF, @"c:\temp\testexport.pdf", Type.Missing, false, true, Type.Missing, Type.Missing, false, Type.Missing);
The problem is that when I run the same service on our test server, one of the images (ie. not all) doesn't show up. Instead is the message
The server has the exact same version of Excel, but is on Windows Server 2008 R2 x64. I've also tried it with the same source .xlsx file. The only other major difference is maybe that I have Adobe Acrobat X installed on my machine, but I don't think that should matter. Memory should not be an issue.The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.
The same thing happens on our production server as well when I tried a test there.
I have also tried using a third party application (activePdf Server), but am having the exact same issue with the image. It works fine on my machine, but not the server.
Can anyone please help me with this?