Articles in this section
Category / Section

How to resolve the issue "Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0 or one of its dependencies" in HTML to PDF conversion using the Blink rendering engine

2 mins read

You can refer to the Newtonsoft.Json assembly or package with version 6.0.8 or above in the application for converting HTML to PDF using a Blink rendering engine. But, you need to specify the assembly version of Newtonsoft.Json in the App.config file of the application. Please find the code sample for specifying the Newtonsoft.Json assembly in the App.config file. 


Note:

If the project is a web application then the assembly binding redirect code sample should be updated in the web.config file. 

 

When installing the Newtonsoft.Json assembly from NuGet package, it will automatically include the assembly binding redirect code sample in the App.config or web.config file.

 <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
      <dependentAssembly> 
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> 
        <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /> 
      </dependentAssembly> 
    </assemblyBinding> 
  </runtime> 
 

 

Note:

You need to modify the newVersion attribute of the bindingRedirect tag in the App.config or web.config file according to the version of the Newtonsoft.Json assembly referred. 

 

A complete work sample can be downloaded from BlinkHtmlToPdf.zip.

Click here to explore a rich set of the Syncfusion Essential PDF features.

An online sample link to convert HTML to PDF.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied