Generate a business letter for 100+ leads using wkhtmltopdf

pdf-generation, wkhtmltopdf

Solution

PDFSharp library is really a nice one!

I have used it for quite a while now, and I find it flexible enough to fulfill your needs.

However there are some aspects of using it as a "standalone library" - e.g creating tables is a headache and there aren't much text formatting options. It is much better to mix it together with MigraDoc (an extension library for PDFSharp).

Problem

We need to print Business Letter for a given list with mail merge facilities. My client is not willing to spend $$ on a paid ASP.NET control to make PDF. So I opted in for WKHTMLtoPDF and it works fine for us until one day the client tried to get a PDF of 100+ leads, resulting in complete failure of PDF generation. It works just fine with a 10-20 page PDF, but not for 100. Are there any tips & tricks to improve performance? We are using Cloud-hosted IIS 7 with ASP.NET 4 if that matters.

Original source

Related problems