Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Mar 21, 2017 10:24 am

Hi, we migrated a website from windows Server 2008 R2 to Windows Server 2016
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

info@isis.it
 
Posts: 20
Joined: Thu Sep 27, 2012 9:01 am

Wed Mar 22, 2017 10:08 am

Dear Lorenzo,

Thanks for your inquiry.
We will investigate it further, and then update to you ASAP.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Mar 24, 2017 9:41 am

Hello,

After an initial test on the system you mentioned, but unfortunately I have not reproduced the issue on my side, please provide us the following detailed information for investigation further.
1.System Architecture(32/64);
2.Application pool setting
3.System memory
4.Corresponding codes and documents(For example, template document and original image) can show the issue.
Once you share the detail. We will prepare the required platform to simulate the environment as of yours and test it again.
One more thing, how much times the application run when the issue occured?

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Mar 24, 2017 5:53 pm

Thank you for your help, here you go:

1. 64bit
2. integrated pipeline .NET CLR v4.0.30319 - default settings
3. 8gb RAM
4. see attached files (images not provided as they're not relevant: no image at all is showing properly in pdf)

we are using spire.DOC v 4.6.3.3040

not sure to understand what you mean by "how much times the application run when the issue occured", could you please explain me? thank you again
Lorenzo

info@isis.it
 
Posts: 20
Joined: Thu Sep 27, 2012 9:01 am

Tue Mar 28, 2017 8:58 am

Hello,

Thanks for the detailed information. After investigation, you need to force the IIS application pool to run in 32bit mode if you are using the older version. Hope this helps.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Mar 28, 2017 4:37 pm

Gary, you're my hero. it works flawlessly.
Thanks a lot
Lorenzo

info@isis.it
 
Posts: 20
Joined: Thu Sep 27, 2012 9:01 am

Fri Mar 31, 2017 7:38 am

Dear Lorenzo,

Thanks for your feedback.
Any questions, please feel free to contact us :) .

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF