I have developed an asp.net application in C# . It runs on IIS Server. Users can create reports with widgets(text, values, charts etc...) . There is a date widget on the report. If users change the date, all widgets are updated using javascript in function of the date(I use AJAX to get new values). When they have finished they can save the report to see it later and they can export it to PDF using wkhtmltopdf. The problem is I would like to develop a function that allow users to ask to receive this report automatically every day, every week etc... So i would like to do a cron that refresh the date widget on each report, then update widgets to generate the report of the day? Is it possible?
Asked
Active
Viewed 1,008 times
3
-
MVC or webforms? You could render the ascx server-side then bounce the result (HTML) down to your method to generate the PDF from it. – Sep 23 '14 at 09:54
-
Then I recommend you do the above, but that's only because I don't know of any other approach. – Sep 23 '14 at 10:03
-
Ideally you would run a recurring task to request some page to generate the HTML and then pass that to wkhtmltopdf to generate the PDF. You can definitely run that as a scheduled job. You can use some .NET scheduler like Quartz. This thread explains how to use wkhtmltopdf on the server http://stackoverflow.com/questions/1331926/calling-wkhtmltopdf-to-generate-pdf-from-html – Faris Zacina Sep 23 '14 at 10:27
-
the problem is that it's a javascript script which update my widgets, so if i just make a recurring task to request my page, the javascript will not be executed and my widgets will not be updated – Eowendacan Sep 23 '14 at 10:42