views:

467

answers:

4

Can anyone recommend some ASP.NET-compatible PDF Components that work in a medium trust environment? I read that ITextSharp works well, but coming from ABCPdf and ASPPdf, the thought of compiling the entire PDF in code is very daunting. Ideally I'd like to use something like wkhtmltopdf to simply convert HTML pages to PDFs (but of course that doesn't work in medium trust).

As far as price is concerned: free is best, but paid solutions are not out of the question.

In the event I cannot find a decent option I may choose to just host a web service on a separate machine that I can run a fully trusted application on, but that is definitely not optimal.

A: 

While not only a PDF library, our Data Dynamics Reports product is already supported in medium trust as noted in this stackoverflow thread. We are working on making ActiveReports work in medium trust very soon - the developers are working on it as we speak (I literally just saw an email discussion about documenting it). For handy reference some links from the other stackoverflow thread:

scott
Although reporting is relevant, I am building documents, not reports, with the system I am working on.
Nathan Taylor
A: 

You could try the winnovative library:

http://www.winnovative-software.com/

Or the CETE library

http://www.cete.com/Products/DynamicPDFForNET/Generator/index.csp

I've used both for different features in ASP.NET web applications

Mike
And they are medium trust compatible?
Nathan Taylor
I'm not sure, but they are both available for free trial - so you could test this easily.
Mike
+1  A: 

iTextSharp is possibly the best free option that works in medium trust. It can seem daunting to start using it, however once you get the hang of it it is very powerful. There is a tutorial available for both simple and more complex document layouts.

iTextSharp - http://sourceforge.net/projects/itextsharp/

iTextSharp Tutorial - http://itextsharp.sourceforge.net/tutorial/index.html

iTextSharp in medium trust - http://instantdevelopment.blogspot.com/2009/10/itextsharp-pdf-rendering-in-medium.html

I've just been through a similar exercise to generate documents. I looked at ReportViewer for a designer interface and PDFSharp for a cleaner API, but neither will currently work in a medium trust environment. iTextSharp was the best option I could find that met my requirements - free and medium trust compatible.

Liam
+1  A: 

They are both work in a medium trust:

PDF Duo .NET component - by duodimension.com

Html to PDF .NET component by subsystems.com

Constantine