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?
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.
I had the same issue, we have a site using both ASP MVC for back-end and AngularJS for the front and couldn't get it it work, so created custom razor views for exporting. Was justifiable for this project to meet future client needs. but in other projects might have to look elsewhere for exporting.
© 2022 - 2024 — McMap. All rights reserved.