Rank: Newbie Groups: Member
Joined: 10/21/2015 Posts: 2
|
Hello,
I'm trying to to use HtmlToPdf.ConvertHtml() to generate a large number (~500) small PDF documents (1 or 2 pages). Basically, we have a big loop, on each iteration, we get a html string and we use HtmlToPdf.ConvertHtml(htmlString.ToString(), doc1, options) to get the PDF.
However, after a random number of iteration (usually between 110 and 150) we can see that the CPU stops being used and after a few moment EOPDF returns a timeout.
I tried to increase the MaxLoadWaitTime option but it only delays the timeout error.
I tried to save the debug console log to files but they are all empty.
Does anyone else got this kind of issues ?
I'm using EO.pdf version 15.2.88.0.
---- here is the error I'm getting---------------------------------------------- System.Exception was unhandled by user code HResult=-2146233088 Message=The operation has timed out. Source=EO.Pdf StackTrace: à EO.Internal.aix.a(alf A_0) à EO.Pdf.HtmlToPdfSession.a(alf A_0) à EO.Pdf.HtmlToPdfSession.a(ady A_0, String A_1, String A_2, Int32 A_3, Int32 A_4, Boolean A_5) à EO.Pdf.HtmlToPdfSession.a(ady A_0, String A_1, String A_2, Boolean A_3) à EO.Pdf.HtmlToPdfSession.LoadHtml(String html) à EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) à StandardTemplates.Facture.RenderingTemplateFacture.RenderAsPDF(ValueData dataobject) dans d:\DEV\AWS\trunk\StandardTemplates\Facture\RenderingTemplateFacture.cs:ligne 708 à AWSWebMVC.Controllers.InvoicingController.DownloadAllPDFsToDirkTMP(Int64 id) dans d:\DEV\AWS\trunk\AWSWebMVC\Controllers\InvoicingController.cs:ligne 1237 à lambda_method(Closure , ControllerBase , Object[] ) à System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) à System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) à System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() à System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) à System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() à System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() InnerException:
---here are the option dans call I use to ConvertHtml -------- :
var options = new HtmlToPdfOptions() { PageSize = PdfPageSizes.A4, OutputArea = new RectangleF(pxToInch(MarginLeft.Value), pxToInch(MarginTop.Value), pxToInch(PageWidth.Value - MarginLeft.Value - MarginRight.Value), pxToInch(PageHeight.Value - MarginTop.Value - MarginBottom.Value)), NoScript = true, PreserveHighResImages = true, AllowLocalAccess = false, MinLoadWaitTime = 1, GeneratePageImages = false, NoCache = true, MaxLoadWaitTime = 20000 };
var doc1 = new PdfDocument(); HtmlToPdf.ConvertHtml(htmlString.ToString(), doc1, options);
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This is a known issue. We have an internal build that should fix this problem. We will PM you with the download location.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 10/21/2015 Posts: 2
|
Now that's what I call great support !!
The build did fix the issue.
Thanks a lot for the quick support.
Hugues
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Glad to hear that! :) Please feel free to let us know if there is anything else.
Thanks!
|
Rank: Member Groups: Member
Joined: 12/30/2012 Posts: 11
|
Hello, I think I have a very similar issue. I'm using EO.Total 2015 15.3.1.0 and sometimes I receive the following error in a ASP.NET page: EO.Pdf.HtmlToPdfException: Conversion failed. The operation has timed out. ---> System.Exception: The operation has timed out. in EO.Internal.aiv.a(ald A_0) in EO.Internal.aiv.a(aiv A_0, ald A_1) in EO.Internal.aiv.a(aa8 A_0, Boolean A_1, a4p A_2) in EO.Internal.aiv.a(aa8 A_0, a4p A_1)
I receive this error quite randomly but especially after generating several PDF. The normal generation takes 5-10 seconds for each PDF file, but after the first error, I have to kill w3wp.exe as EO.PDF seems locked on ConvertHtml.
Maybe your internal build can also help me? Thanks, Michele
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hello Endurance, Build 15.3.1.0 already contains the fix mentioned in previous post. If you still have problem, please try to create a test application to reproduce the problem and send the test project to us: http://www.essentialobjects.com/forum/test_project.aspxOnce we have that we will look into it as soon as possible. Thanks!
|