Welcome Guest Search | Active Topics | Sign In | Register

JavaScript printing event not fired - Ignoring too frequent calls to print() Options
Touchway
Posted: Thursday, October 19, 2017 8:18:41 AM
Rank: Member
Groups: Member

Joined: 8/5/2016
Posts: 17
Hi guys,
we are struggling with printing on a website that fires the print event via JavaScript.

If JavaScript calls the window.print() function too often within a short period, the "BeforePrint" event stops to be fired.
This mostly happens after the 6. attempt to print.
At the same time you can see an error in the webview console with following error "Ignoring too frequent calls to print()".


I searched this error on Google and found out, that this was an known issue of Chrome engine that was officially fixed in 2012 (!!!).


I hope you can help us.
Regards
Lukas
eo_support
Posted: Thursday, October 19, 2017 8:26:32 AM
Rank: Administration
Groups: Administration

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

This is neither is a bug nor has it been fixed. The behavior is by design and the code that blocks frequent print is still there. You can find the corresponding source code here:

https://cs.chromium.org/chromium/src/components/printing/renderer/print_render_frame_helper.cc?q=print_render_frame_helper.cc&l=2419

You can see the comment in the code to see the exact logic used to block frequent print from JavaScript.

Thanks!


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.