Rank: Member Groups: Member
Joined: 6/19/2013 Posts: 23
|
Hi,
Converting my project from .Net 3.5 to 4.5 and EO.PDF give me error "EO.PDF Convertion failed. Failed to initialize conversion" every time I call in when debugging it (both in Visual Studio Development Server and IIS Express).
I've test on EO.PDF 5.0.50 till 5.0.73, all the same.
Project is on Visual Studio 2012 and the code is very simple
protected void Button1_Click(object sender, EventArgs e) { string fileName = "1.pdf"; string html = "<p>ABC</p>";
HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ClearHeaders(); HttpContext.Current.Response.Buffer = true; HttpContext.Current.Response.ContentType = "application/octet-stream"; // Do not use any other types, it will break IE 8.0 HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName); HttpContext.Current.Response.AddHeader("Cache-Control", "no-store, no-cache"); // Do not use Cache.SetCacheability(HttpCacheability.NoCache) it will break IE 8.0 EO.Pdf.HtmlToPdf.ConvertHtml(html, HttpContext.Current.Response.OutputStream); HttpContext.Current.Response.Flush(); HttpContext.Current.Response.End(); }
If I set the Framework to 3.5, everything is fine and if I upgrade it to 4.5 I'll get the error.
Also in Event Viewer I'll get:
The description for Event ID 0 from source EO Debug Message cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Code = 8. hr = 80131604
Can you please help me with this error.
Thanks, Sadjad Bahmanpour
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, Error code 80131604 is TargetInvocationException. We do not know what can cause the problem because we are not able to reproduce the problem here. You can try to run this tool and see if you can see the actual error message: http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspxThanks!
|