I have a View that renders and some javascript/jquery that updates some fields. When I use Rotativa, it renders the view, but before the JS is executed to replace some field text.
Is there a way to delay Rotativa or have it wait for JS/JQuery?
You should be able to delay pdf creation to wait for javascript to complete by setting this in Rotativa params:
CustomSwitches = "--no-stop-slow-scripts --javascript-delay 1000 "
Replace 1000 with the desired milliseconds.
I was facing same issue, and after so much googling and experiment my problem resolved by updating Rotativa to latest stable version as 1.6.4 using Manage Nuget Packages. May be it will help someone. Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With