lundi 30 mars 2015

.NET WebAPI - automatic pdf generation

I have developed an ExtJS 5 + .NET MVC WebAPI RIA for reporting purposes. Now the client is requesting a feature to subscribe to some reports. The reports (pdf) should be generated automatically and then the server should send them per mail to the user who subscribed a report. It would also be a nice to have that the user can specify the date and time when he will receive the report.


Currently the application has already a PDF export where the user can save these reports. In this case the applications sends the html of the report section to the server and the server is working with wkhtmltopdf to generate the pdf.


For my new feature i have the following questions:




  1. Can i implement this new feature service in my WebAPI (e.g. as a thread which ill start on startup) or should i write an independet service for it.




  2. Would it be appropriate to just load the site on the server with the reports and execute the process which i am already running for my PDF export to get the pdf out of it?




I am thankful for every advice.





Aucun commentaire:

Enregistrer un commentaire