Hi,
Starting from 20.1.30 a simple call to HtmlToPdf.ConvertHtml is failing with below error. I've tested 20.1.31 and same issue and 20.0.81 and below is fine.
Error:
System.TypeInitializationException: The type initializer for 'EO.Internal.prkq' threw an exception. ---> System.MissingMethodException: Method not found: 'System.Reflection.Emit.AssemblyBuilder System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName, System.Reflection.Emit.AssemblyBuilderAccess)'.
Stack Trace:
hrlp.hqdq(Stream nhb)
prkq.cctor()
--- End of inner exception stack trace ---
prkq.hqdp(Int32 ngv)
prdc.pthi()
prdc.ehsi()
HtmlToPdfSession.ctor(HtmlToPdfOptions yi, HtmlToPdfSession yj)
HtmlToPdfSession.Create(HtmlToPdfOptions options)
ogji.vgkg()
xjww.uhhg[a](prdl`1 bsh)
HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)
HtmlToPdf.ConvertHtml(String html, Stream stream)
Code:
Code: C#
var html = "<p>Hello</p>";
using (MemoryStream stream = new MemoryStream())
{
HtmlToPdf.ConvertHtml(html, stream);// , options);
byte[] array = stream.ToArray();
return array;
}