Creating pdf files at runtime in c#

C#Pdf

C# Problem Overview


Is there a pdf library attached/that can be attached to .NET 3.5 that allows creation of pdf files at runtime i.e opening a new pdf file, writing to it line by line, embedding images, etc and closing the pdf file all in C# code?

What I want is a set of tools and specifications which allow me to implement a customised pdf writer in C# without using Reporting Services' pdf output option.

C# Solutions


Solution 1 - C#

iTextSharp is no longer licensed under the MIT/LGPL license. Versions greater than 4.1.6 are licensed under the Affero GPL, meaning you can't even use it in a SaaS (Software as a Service) scenario without licensing your code under the GPL, or a GPL-compatible license.

Other opensource PDF implementations in native .NET include

There's also a couple of Java PDF libraries (like PDFBox) you can convert to .NET using IKVM.

Solution 2 - C#

iTextSharp http://itextsharp.sourceforge.net/

Complex but comprehensive.

itext7 former iTextSharp

Solution 3 - C#

Have a look at PDFSharp

It is open source and it is written in .NET, I use it myself for some PDF invoice generation.

Solution 4 - C#

Well, free and not-for-free, I use WebSuperGoo ABCpdf .NET component, that I just love it!

not-for-free because you need to pay for it.

for free because even if you have to pay, they have a trial version and you can request a free license if you do not mind that, in your site show "This site uses WebSuperGoo ABCpdf .NET component" with a link to their website.

I did that and I got a free license (version 5 in that time) so, I can say that it works (even if the website is no longer online) - I still have and use the component ~:)

A wonderful thing that I love with this is that you can do everything that you can thing off with this, create PDF forms and dynamically fill them and send to user by mail or have them to download it, create a pdf from scratch, convert HTML pages into PDF, etc etc etc, please read the documentation, it is a wonderful component.

Solution 5 - C#

Solution 6 - C#

Solution 7 - C#

For this i looked into running LaTeX apps to generate a pdf. Although this option is likely to be far more complicated and heavy duty than the ones listed here.

Solution 8 - C#

I have used Gnostice in the past and found them to be very good.

http://www.gnostice.com/PDFOne_dot_Net.asp

Solution 9 - C#

Docotic.Pdf library can be easily used to create PDF files at runtime. The library can also modify existing PDF documents (extract text/images, append pages, fill form fields, etc.)

Samples for common tasks are available on the library site.

Disclaimer: I work for Bit Miracle.

Solution 10 - C#

Amyuni PDF Converter .Net can also be used for this. And it will also allow you to modify existing files, apply OCR to them and extract text, create raster images (for thumbnails generation for example), optimize the output PDF for web viewing, etc.

Usual disclaimer applies.

Solution 11 - C#

There is a new project, RazorPDF which can be used from ASP.NET MVC. It is available as nuget package (search for RazorPDF).

Here is more info: http://nyveldt.com/blog/post/Introducing-RazorPDF

IMPORTANT UPDATE as @DenNukem pointed out, it depends on iTextsharp, I forgot to edit answer when I found that out (when I tried to use it), so if your project is not open source and eligible for their AGPL licence, it will probably be too expensive to use.

Solution 12 - C#

I have used (iTextSharp) in the past with nice results.

Solution 13 - C#

How about http://www.1t3xt.com/products/index.php">iTextSharp</a>;?

iText is a PDF (among others) generation library that is also ported (and kept in sync) to C#.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLonzoView Question on Stackoverflow
Solution 1 - C#darkphoenixView Answer on Stackoverflow
Solution 2 - C#ineView Answer on Stackoverflow
Solution 3 - C#Taner GedikoğluView Answer on Stackoverflow
Solution 4 - C#balexandreView Answer on Stackoverflow
Solution 5 - C#PrzemekView Answer on Stackoverflow
Solution 6 - C#MarlonRibunalView Answer on Stackoverflow
Solution 7 - C#Simon PView Answer on Stackoverflow
Solution 8 - C#KhadajiView Answer on Stackoverflow
Solution 9 - C#BobrovskyView Answer on Stackoverflow
Solution 10 - C#ymsView Answer on Stackoverflow
Solution 11 - C#Goran ObradovicView Answer on Stackoverflow
Solution 12 - C#KnoblochView Answer on Stackoverflow
Solution 13 - C#Francisco CanedoView Answer on Stackoverflow