Rank: Member Groups: Member
Joined: 12/30/2012 Posts: 11
|
While using the ConvertHtml method of EO.Pdf.HtmlToPdf we are facing issues randomly. Current Version of EO.Pdf installed in project: 23.4.5
The conversion is executed by an Azure Function. Here the configuration details: Stack: .NET .Net Version: .NET7 isolated Platform: 32 Bit Managed pipeline version: Integrated
The HTML provided to the ConvertHtml method doesn't contain any external link (no image, no link, no css, ...).
These are the most common issues:
First Issue: Child process exited unexpectedly. at EO.Internal.suxd.edoz(Exception nnh, Boolean nni) at EO.Internal.suxd.edoy(sutc nne) at EO.Internal.suxd.edom(Boolean& nmc, Type[] nmd, String nme, String nmf) at EO.Internal.suxd.xgxr(Type[] nlz, String nma, String nmb) at EO.Internal.suxe.xgxr(String nrr, String nrs) at EO.Internal.jqrf.eivi() at EO.Internal.jqrf.mgeh.qjux() at EO.Internal.suss.ifjd(Action luk) at EO.Internal.jqrf.cxla(WindowsIdentity hc) at EO.WebEngine.Engine.Start(WindowsIdentity user) at EO.WebEngine.Engine.Start() at EO.Internal.vufm.qycm() at EO.Internal.vufn.qycm(vufm& bsu) at EO.Internal.vufo.qycm(jqra bsy, vufm& bsz) at EO.Internal.vufr.stqn() at EO.Internal.vufr..ctor(jqra btd, HtmlToPdfOptions bte) at EO.Pdf.HtmlToPdfSession.seir(HtmlToPdfOptions aav, WebView aaw) at EO.Pdf.HtmlToPdfSession..ctor(HtmlToPdfOptions aar, WebView aas, HtmlToPdfSession aat, ResourceHandler aau) at EO.Pdf.HtmlToPdfSession.Create(HtmlToPdfOptions options, ResourceHandler resourceHandler) at EO.Pdf.HtmlToPdf.bydt.abgm() at EO.Internal.vufo.dwun[a](susk`1 btc) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)
Second Issue: Operation timed out while waiting the page to be loaded, taskId = 11 at System.Environment.get_StackTrace() at EO.Base.BaseException..ctor(String lss, Exception lst) at EO.Pdf.HtmlToPdfException..ctor(HtmlToPdfErrorCode acf, Int32 acg, String ach, Exception aci) at EO.Pdf.HtmlToPdfException.vqxm(String acm) at EO.Internal.cbpc.jjbw(String bvc) at EO.Internal.cbpc.bslq(cbkh bud, String bue, String buf, Int32 bug, Int32 buh, String bui, Boolean buj) at EO.Internal.cbpc.qiqv(cbkh btv, String btw, HtmlToPdfOptions btx, String bty, Int32 btz, Int32 bua, String bub, Boolean buc) at EO.Pdf.HtmlToPdfSession.qiqv(cbkh aba, String abb, String abc, Int32 abd, Int32 abe, String abf, Boolean abg) at EO.Pdf.HtmlToPdfSession.qiqv(cbkh abh, String abi, String abj, Boolean abk) at EO.Pdf.HtmlToPdfSession.LoadHtml(String html) at EO.Pdf.HtmlToPdf.loou.rnif() at EO.Internal.cboz.dqen[a](mcsu`1 btc) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)
Third Issue: Exception: System.AggregateException: One or more errors occurred. (The request was canceled.) ---> The request was canceled. at System.Environment.get_StackTrace() at EO.Base.BaseException..ctor(String lss, Exception lst) at EO.Pdf.HtmlToPdfException..ctor(HtmlToPdfErrorCode acf, Int32 acg, String ach, Exception aci) at EO.Pdf.HtmlToPdfException.vqxl(LoadFailedEventArgs acl) at EO.Internal.cbpc.bslq(cbkh bud, String bue, String buf, Int32 bug, Int32 buh, String bui, Boolean buj) at EO.Internal.cbpc.qiqv(cbkh btv, String btw, HtmlToPdfOptions btx, String bty, Int32 btz, Int32 bua, String bub, Boolean buc) at EO.Pdf.HtmlToPdfSession.qiqv(cbkh aba, String abb, String abc, Int32 abd, Int32 abe, String abf, Boolean abg) at EO.Pdf.HtmlToPdfSession.qiqv(cbkh abh, String abi, String abj, Boolean abk) at EO.Pdf.HtmlToPdfSession.LoadHtml(String html) at EO.Pdf.HtmlToPdf.loou.rnif() at EO.Internal.cboz.dqen[a](mcsu`1 btc) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)
Usually, the issues dissapear restarting the Azure Function . Then 3 or 4 documents are successfully converted, but after that one of this issue appears again.
Look forward to receiving your comments. Thanks,
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, Can you capture the log when this occurs and send the log to us? The code can be something like this:
Code: C#
try
{
EO.Pdf.HtmlToPdf.ConvertHtml(....);
}
catch (Exception ex)
{
string log = EO.Base.Runtime.GetLogs();
//save log to a file and send it to us
}
Once we get the log we will see what we can find. Thanks!
|
Rank: Member Groups: Member
Joined: 12/30/2012 Posts: 11
|
Hi, I have uploaded the logs from the Contact Us page.
Look forward to receiving your comments. Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, We have looked into the log files and it indicates that the GPU process keeps crashing. Can you try to disable the GPU like this and see if it helps?
Code: C#
EO.WebEngine.EngineOptions.Default.DisableGPU = true;
Make sure you run this line before any conversion is triggered. Once a conversion is triggered (which initializes the browser engine), then this line would have no impact. If the problem continues, please collect crash report and send it to us: https://www.essentialobjects.com/doc/common/crash_report.htmlThanks!
|
Rank: Member Groups: Member
Joined: 12/30/2012 Posts: 11
|
Hi, Do I have to disable it in a static method or before any convertion?
Option 1: static EOPdfHelper() { EO.WebEngine.EngineOptions.Default.DisableGPU = true; }
Option 2: EO.WebEngine.EngineOptions.Default.DisableGPU = true; result = HtmlToPdf.ConvertHtml(html, stream, options);
Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
You can do it either way. The key is it must be called before anything else.
|
Rank: Member Groups: Member
Joined: 12/30/2012 Posts: 11
|
Hi, I still have a random error during the HTML conversion. I have uploaded the logs file.
Look forward to receiving your comments. Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
We have sent you a test build through private message. Please try that build and send us the new logs.
Thanks!
|
Rank: Member Groups: Member
Joined: 12/30/2012 Posts: 11
|
Hi, I have uploaded new log files.
Look forward to receiving your comments. Thanks!
|