Hello, I have a .Net Core 2.0 WebApi project with
- TargetFramework of netcoreapp2.0
- I have added EO.Pdf and EO.WebBrowser (v17.3.13) as references using NuGet (which have also added the other two dependencies EO.Base and EO.WebEngine)
- calls HtmlToPdf.ConvertHtml as per below
Quote: string content = "<html><body>Hello world!</body></html>";
MemoryStream stream = new MemoryStream();
HtmlToPdf.ConvertHtml(content, stream);
The above falls over with "{System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'..."
I have seen your post regarding integration with .Net Core 1.0 (https://www.essentialobjects.com/doc/common/dotnetcore.aspx) however the configuration for .Net Core 2.0 is very different (the contents of project.json is 'translated' into the project file). I've tried to translate what you have within the 1.0 article (with numerous variations) and have been unsuccessful
I've also tried separating the call to HtmlToPdf.ConvertHtml into a another project targeting net461 and/or netstandard2.0 but to no avail (I get the message "{System.IO.FileNotFoundException: Could not load file or assembly 'EO.Pdf, Version=17.3.13.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc'. The system cannot find the file specified.
File name: 'EO.Pdf, Version=17.3.13.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc'..." or a message suggesting version conflict)
Are you able to explain how this is done (i.e. calling HtmlToPdf.ConvertHtml from within a .Net Core 2.0 project)