Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET - PDF Component in Medium Trust

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.

like image 480
Nathan Taylor Avatar asked Mar 27 '26 00:03

Nathan Taylor


1 Answers

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.

like image 116
Liam Avatar answered Mar 28 '26 14:03

Liam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!