Reputation: 800
I am using rotativa in MVC3 for downloading multiple views in pdf format. Its working fine in my local system. But when I moved that to production its taking almost 2-3 min to download. Please suggest any option to make that faster in production.
I am using ViewAsPdf in rotativa.
return new ViewAsPdf("PDF") { FileName = "Application1.pdf", CustomSwitches = "--print-media-type" };
Thanks.
Upvotes: 5
Views: 2076
Reputation: 71
it may happen because of the unnecessary linking of js & css files that are linked in the layout page of your view page. Try to make a separate layout page for pdf pages and keep only the related js & css calls which are only needed for pdf generation(design related). I faced the same issue & this approach solved my issue in production.
Upvotes: 1