views:

522

answers:

10

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!

A: 

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.

Stephen Wrighton
We do this here (http://msdn.microsoft.com/en-us/library/ms251671(VS.80).aspx). Not too hard to use, but note that it uses SQL Server 2005 Reporting Services to do server-based generation (but not local generation).
Server/local is a bit of a misnomer in regards to RDLC served over ASP.NET. Local generation is local to the ASP.Net application as opposed to the server generation which occurs on the SQL Server itself.
Stephen Wrighton
+2  A: 

I have had good success using SharpPDF.

RedFilter
Thanks. I am checking this out.
G Forty
Right - this looks simple enough to use right away. Does tables and images which is great. Thank you OrbMan.
G Forty
+6  A: 

Have a look at http://itextsharp.sourceforge.net/. Its open source.
Tutorial: http://itextdocs.lowagie.com/tutorial/

Akshay
I use this one myself and it is great. The nice thing is that it also allows you to add passwords to existing PDF files, which was something I couldn't find with some of the other libraries out there.
Dillie-O
I too have used itextsharp in the past. It's excellent from what I can remember. I believe I also tried the .NET version of PDFlib - apparently I wasn't as impressed, since I ended up doing the project with itextsharp.
Jonathan Sampson
Looks like the last version is from 2005, and built for .NET 1.1. Anything newer out there?
Chris Ammerman
@ Turbulent Intellect: Last Update: May 25 2008 (from: http://sourceforge.net/projects/itextsharp/)
Akshay
I've used it in the past and liked it. The API is a mess though, so expect a learning curve beyond your usual .NET API.
jcollum
Thanks. Cannot tell immediately but this looks like a Java component?
G Forty
@ G Forty - Its ported to .Net from a similar Java component. That's why most of tutorials are in Java as well. But they are not too hard to follow.
Akshay
A: 

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

A: 

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

marc_s
A: 

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.
Robert Gowland
A: 

I have had success using Siberix

http://siberix.com/

Corporate License: $299 USD

quimbo
quimbo227 - thanks, that looks pretty good too. i'll give it a try
G Forty
+1  A: 

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

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

rlb.usa
A: 

EzPDFlibrary is advanced PDF library, it is fast, and can run under windows web server.

Sarah
A: 

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.

wageoghe