|
Rank: Newbie Groups: Member
Joined: 1/24/2018 Posts: 3
|
I'm running the trial version of EO Pdf for examination for purchase by my company as a possible replacement for another product.
As a part of exploring the product I'm seeing if it will convert a complex bit of html with styles as a string to a memory stream.
When I run my test on a locally hosted IIS website, it performs very well.
However:
When I run it out of VS 2015 with IIS Express, I'm getting an out-of-memory error. When this occurs only 28% of the computer's memory is being used. (details: Intel Core i7, 32 GB of memory, Win 10 pro, VS 2015 run as debug / release / or any other mode with '32 bit preferred' not checked.)
When installed on a different computer with VS 2017, the error that is seen is 'Value cannot be null. Parameter name: destination'.
The code I'm running is this:
var output = new MemoryStream(); var htmlToPdfOptions = new HtmlToPdfOptions() { PageSize = new SizeF(PdfPageSizes.Letter.Height, PdfPageSizes.Letter.Width), OutputArea = new RectangleF(0, 0, 0, 0), GeneratePageImages=false }; HtmlToPdf.ConvertHtml(html,output,htmlToPdfOptions);
Do you know why I'm seeing these errors in VS and how to resolve them?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi, This looks like a bug on our side. If you can isolate the problem into a test project and send the test project to us, we will be happy to investigate further. See here for more details on sending test app to us: https://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/24/2018 Posts: 3
|
Thanks for your quick reply and your willingness to look into the issue.
When I isolated the code to another project the errors stopped, so I suspect the source of the problem maybe elsewhere with our legacy code base, however this may be hard to diagnose and/or fix.
If you have general ideas about the 'Value cannot be null. Parameter name: destination' error, let me know. Otherwise I think I need to look at other options right now.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
I can't really give you "general ideas" since every scenario can be different and we do not know for sure until we investigate it. However we did fix an issue with the exact error message before that was caused by an input PDF file that contains a minor error --- customer pass a PDF file to our library, our library expects something at a certain place (per the PDF specification) in that file and it is not there. For that particular case we changed our code to be more tolerate ---- so that if it is not there, instead of throwing an exception we ignored it.
Of course your situation can be totally different (most likely it is since that one has already been fixed), so the most effective way for us to resolve this is to isolate it, reproduce it and fix it. Any other approach would be like shooting in the dark --- not only it's very unlikely we will hit anything, but also even if we did hit something, we wouldn't know if it is the same thing that causes the problem for you. This is why we must have a repro first. And we believe this is the best approach for you as well because you could spend all the time to switch to a different solution and then run into other issues with that solution as well.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/24/2018 Posts: 3
|
Thanks! That makes sense.
Here's something I discovered that might help you for future diagnostics. For us the issue only occurs:
a) when running another memory-intensive third-party dll in our workflow before calling that ConvertHtml method; a dll which has had other issues in the past
b) when VS is run/debugged attached to IIS Express (default) not when running/debugging VS with the site hosted locally in IIS
It's good that we've discovered a work-around for developers, and since we think the primary source of the problem is with another, unrelated, product, I'm going to continue evaluating EO for our use.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Thanks for the additional information. We will keep an eye on this. Please feel free to let us know if you run into anything else in the future.
|
|