Invoice PDF errors in both 3.9 and 4.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi,

Wondered if somebody could help me, Just upgraded 2 nopCommerce stores one to 3.9 and the other to 4.0, pretty much everything works apart from within the orders page when generating the pdf invoice both sites break 3.9 with the following error: and 4.0 with this error https://ibb.co/cBiAS8. Could anybody shed any light on this, I'm well and truly stuck.


Could not load file or assembly 'itextsharp, Version=5.5.10.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Many thanks

Nick
5 years ago
Hi,

No idea about this error but here are few things you can do on your IIS. But you really need to debug code with existing database, plugins and content if it does not solves issue.

# Check directory permission in your IIS for these websites
# Make sure to clear cache
# Recycle IIS App pool
# Restart website

Hope this would help..

Thank you,
Atul
5 years ago
nclamb wrote:
Hi,

Wondered if somebody could help me, Just upgraded 2 nopCommerce stores one to 3.9 and the other to 4.0, pretty much everything works apart from within the orders page when generating the pdf invoice both sites break 3.9 with the following error: and 4.0 with this error https://ibb.co/cBiAS8. Could anybody shed any light on this, I'm well and truly stuck.


Could not load file or assembly 'itextsharp, Version=5.5.10.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Many thanks

Nick


I've had this exact problem in the past.  It was caused by a plugin that needed and included a copy of iTextSharp, but it included a different version to the one that nopCommerce needed.

Search your "plugins" folder for iTextSharp.dll and if you find one, take a look what version it is.  If it's a different version to the one that nopCommerce uses, then that is the cause of your problem.

The solution is to contact the plugin provider and ask them to correct their plugin to use the same version of iTextSharp as the version of nopCommerce that the plugin is targeting.

As a quick fix you can try replacing the plugin iTextSharp.dll with the version used by nopCommerce but the results may be unpredictable.

For reference:
    nop v3.9 needs iTextSharp v5.5.10
    nop v4.0 needs iTextSharp v5.5.12
5 years ago
Hello Nick,

First, I suggest to uninstall GDPR plugin, and check if that will helps.
Font to small could be related to our plugin, after upgrade sometimes font size is set to 0. Open configuration of our plugin, at the header/footer section you will find font size setting (at the bottom).

Regards,
Tomasz
5 years ago
Thanks Tomas,

Both of those suggestions worked, I knew I should of contacted you first, may thanks again.

Cheers

Nick
5 years ago
Just to a follow up to this issue, the reoccurrence of the itextSharp issue for 3.9 happened again after a couple of days from  the changes above. After a bit or research I found copying the iTextSharp dll file to the system GAC folder was a possible solution, after 3 days since copying to the GAC no error messages.  
On my Windows server 2008r2 the GAC folder can be found here:C:\Windows\assembly\itextsharp.dll
Hop this helps somebody in a similar problems.
5 years ago
We just upgraded from 3.9 to 4.0. I was getting the "The path is not of a legal form." error when I tried to view an invoice/PDF and found this thread.

Not sure it is a permanent fix, but I did NOT have a logo image uploaded to Settings > General Settings > PDF. When I uploaded a logo, I was able to open and print the PDF invoices.

Incidentally, the first time I tried to save the setting, I got an error message, but the second time I tried the settings saved and this worked, at least for now.

SZ
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.