Everything was working fine on 2008R2
on the new server if I generate a DOC containing images, it works fine
if I generate the exact same document as a PDF images are not showing.
Doc and PDF are created by the exact same function, the only thing that changes is the output file format.
- Code: Select all
if (formato == "word")
{
document.SaveToFile(codice_offerta.Replace("/", "_").Replace(".", "") + ".docx", FileFormat.Docx2010, Response, HttpContentType.Attachment);
return "ok";
}
else
{
document.SaveToFile(codice_offerta.Replace("/", "_").Replace(".", "") + ".pdf", FileFormat.PDF, Response, HttpContentType.Attachment);
return "ok";
}
Images are added using this code
- Code: Select all
MemoryStream ms = new MemoryStream(File.ReadAllBytes(path_foto));
Image im = System.Drawing.Image.FromStream(ms);
p_desc_img.AppendPicture(im);
ms.Dispose();
everything else is working fine, the only problem is images not showing at all.
as I told before the application is running on windows 2016, IIS 11, .NET CLR v4.0.30319 (same version of the working old 2008 server)
Any help would be appreciated
Lorenzo