Rotativa PDF export taking significantly longer on Windows Server 2016 after recent update

30 Views Asked by At

I have an ASP.NET MVC 4.6 web application running on a 64-bit Windows Server 2016. The application utilizes Rotativa 1.7.3 to generate and export PDF documents. Previously, the PDF export process was fast, typically taking less than 3 seconds. However, after a recent Windows update on the server, the export process now takes approximately 45 seconds.

I'm using Rotativa here to convert a Partial View as a PDF and then use it as an attachment in an email or show it in a new tab. Here's the relevant code snippet:

Rotativa.PartialViewAsPdf salesQuotePdf = new Rotativa.PartialViewAsPdf("_PrintableSalesQuote", pricingToolModel);
byte[] salesQuotepdfData = salesQuotePdf.BuildFile(ControllerContext);

The slowdown seems to occur specifically within the BuildFile function call. Interestingly, the issue is not occurring when we access the IIS website from server machine using localhost but the issue is occuring when accessing the same IIS website from other machines via domain name.

I've researched similar issues and came across an old thread on Stack Overflow (Rotativa pdf converter works very slow on server), but none of the proposed solutions resolved the problem.

Could anyone suggest potential causes or solutions to this slowdown issue with Rotativa PDF generation on Windows Server 2016? Any insights or troubleshooting steps would be greatly appreciated. Thank you!

0

There are 0 best solutions below