Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Libraries to Quickly Create Pdfs

I want to take a list of objects and create that into a table and display that into a pdf file. Is there any good libraries out there that I can use?

MyObject a = new MyObject();
a.Name = "bob";
a.Address = "123 fake st";

pdf output

Name    Address
bob    123 fake st
jim     test

I looked at pdfsharp/migradoc but it does not seem to work on medium trust so I am not sure if it will work on my shared hosting.

I heard of itextsharp but did not really look into it as they seemed to have changed their licensing and the new licensing forces you to make your project open I believe.

like image 656
chobo2 Avatar asked Jun 19 '26 07:06

chobo2


1 Answers

You could use iTextsharp. And here's a nice article on CodeProject which illustrates how Razor views could directly be exported to PDF using iTextsharp and the RazorEngine package.

like image 116
Darin Dimitrov Avatar answered Jun 21 '26 21:06

Darin Dimitrov



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!