Question

I'd like to dynamically generate content and then render to a PDF file. This processing would take place on a remote hosting server so using virtual printers etc is out. Does any have a recommendation for a .NET library (pref C#) that would work?

I know that I could generate a bunch of PS code and package it myself but I'd prefer something a little less tricksy at this stage.

Thanks!

Was it helpful?

Solution

I have had good success using SharpPDF.

OTHER TIPS

I have had success using Siberix

http://www.siberix.com/

Corporate License: $350 USD (A single license covers unlimited number of company's developer seats, unlimited number of company's web servers and unlimited number of distributions as a part of your application.)

Free PDF Generator .NET (WkHtmlToPdf wrapper) can generate pretty PDF from HTML template with one line of code:

var pdfBytes = (new NReco.PdfGenerator.HtmlToPdfConverter()).GeneratePdf(htmlContent);

(all you need is one DLL, no external dependencies)

We use the Amyuni PDF Converter and have used it successfully for several years. Our usage is via the COM interface, but it does support a .NET interface.

I've had good experiences with Winnovative's HTML to PDF.

And bad ones with Open Source HTML Doc (Problems with form elements + CSS).

I have been looking for a high performing docx to pdf tool for a while now. Our system has an e-government aspect and is generating a very high number of reports to the user community. At this point, performance is paramount.

Earlier tools I have used did not do simultaneous conversion, instead each exe needed to wait for completion of the other. I have tried Aspose.words and I am very happy with the results.

First of all, it was very easy and seamless to integrate and deploy in our project. Very smooth.

Secondly, the speed of conversion is way better due to the fact that multiple jobs run in parallel.

Thirdly, not only fast, but even with no formatting errors. Considering that we are providing a multi-lingual system and some reports include both English and Arabic fields (mind right-to-left alignment!), this was very important.

And finally, the file size was quite small, which again is very important as tens of thousands of documents are created through our system.

Our first implementation was Microsoft Office Interop library. We convert docx to pdf documents by using below code. This library converts the docx documents to pdf files perfectly and we decided to upload this to report generation server. But after a while, we noticed that conversion operations are waiting for each executable. This causes a big delay on converting the documents at the same time and that's why we start to search a new tool for converting docx files to pdf files. See Image

Below code shows the how to convert docx documents to pdf files by using Aspose.Words for .NET tool. See Image 2

RDLC & the Report Viewer controls can generate PDF either at the Client's discretion or at server command which can then be served as a PDF mime-type.

I've used PDF4NET from O2solutions with much success. They support all sorts of scenarios and digital signing of the pdf.

If your data is mostly in XML, you could also look at a XSL-FO solution - we're using Alt-Soft's Xml2Pdf with great success. The "server" version is a bit of a misnomer - it's really just a single DLL you need to include in your Winforms, WPF or ASP.NET app - that's all!

Works like a charm (if you're familiar with XSLT and XSL-FO, or willing to learn it).

Marc

We used a set of third party DLLs from PDFSharp who in turn use DLLs from MigraDoc. I'm not privy to all the reasons that we went that direction (the decision was made by a senior developer), but I can tell you that:

  • It seems to be in active development.
  • It had most of the features we needed.
  • The source code is available. Although it used some patterns and conventions that I hadn't seen before, once I got on to them, it was fairly easy to make the changes. I added support for using the System.Drawing.Image directly rather than as saving files.
  • It is not documented well either internally or externally.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top