Welcome Guest Search | Active Topics | Sign In | Register

TriggerModes & MinLoadWaitTime / MaxLoadWaitTime Options
aceguy
Posted: Wednesday, May 16, 2018 12:00:11 PM
Rank: Newbie
Groups: Member

Joined: 3/8/2018
Posts: 5
Hello,

I have recently upgraded my version of EO from 5 to 2018 and as part of the upgrade I have had to change the implementation (to remedy another rendering problem) to do use a HtmlToPdfSession to render a PDF instead of using ConvertUrl() as we were before.

The problem is that some of our pages that load data via AJAX with a Dual trigger are not waiting for the JS code to initiate the render (via eoapi.convert()), as a result, I get a pdf showing the loading spinner. When I put a console.log() statement in the JS block with the eoapi.convert() call it does not output anything to the debug console, so that tells me the render happens before that piece of JS code even gets hit to signal that all the data as been returned and loaded. If I play around with the MaxLoadWaitTime and MinLoadWaitTime I am able to get it to render properly, but that is not a clean and robust solution to this problem as we did not need to set these times in the past.

So I guess I have a couple questions regarding this problem.

1.) Do you have any suggestions / ideas to what is going on and how to fix this behavior?
2.) (if not) Does using HtmlToPdfSession and HtmlToPdfSession.LoadUrl() not take into account HtmlToPdfTriggerMode.Dual like HtmlToPdf.ConvertUrl() Does? or do i need to write some additional code to implement RunWebViewCallback if I am using HtmlToPdfSession?
3.) Did the default behavior of MinLoadWaitTime / Max change over the years? Did HtmlToPdfTriggerMode change?

Thank you!
eo_support
Posted: Wednesday, May 16, 2018 2:33:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

We are not aware of this problem. The Dual mode should work exactly as before, meaning that if the trigger mode is set to Dual, then both the resources have to finish load and eoapi.convert() has to be called.

If you still have problem, please try to isolate the problem into a test app and send the test app to us. See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

Once we have that we will be happy to take a look.

Thanks!
aceguy
Posted: Wednesday, May 16, 2018 5:26:09 PM
Rank: Newbie
Groups: Member

Joined: 3/8/2018
Posts: 5
Before I take this step, Id just like to clarify that this is the case even if I am printing via an HtmlToPdfSession object and calling LoadUrl() and then RenderAsPDF()?
eo_support
Posted: Thursday, May 17, 2018 8:50:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Yes. That's correct. In fact HtmlToPdf.ConvertUrl internally uses a HtmlToPdfSession and then call LoadUrl and RenderAsPDF on that HtmlToPdfSession object.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.