.net – Unacceptable performance rendering PDF Tables with ITextSharp and PDFSharp

.netitextsharppdfpdfsharp

I am trying to generate PDF files containing large numbers of tables. Each PDF could potentially be 150 pages in length.

When using ITextSharp, the file sizes are up to 16 megabytes and have no noticeable shrinkage when zipped.

When using PDFSharp, the file size is very reasonable at 2 or 3 megabytes but it takes an unacceptable length of time (I canceled it after 3 minutes) to generate the document.

Does anybody have a suggestion of generating complex PDF files efficiently w/ .NET?

Best Solution

There has been a patch submitted which improves table rendering performance massively - the bigger the table the bigger the improvement apparently. On running a quick test my results for a table with 200 rows were:

  • (Original DLL) [ResultsGenerator] [Info] PDF results written in: 00:00:25.9754857
  • (Patched DLL) [ResultsGenerator] [Info] PDF results written in: 00:00:03.9472258

http://forum.pdfsharp.net/viewtopic.php?f=2&t=679&start=0#p4888