10 Best Libraries for generating PDF Files

Great commercial solution

FPDF Library PDF generator

FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.

License: Free, no usage restrictons.

Supported technology: PHP.


iText is a library that allows you to generate PDF files on the fly. iText is an ideal library for developers looking to enhance web- and other applications with dynamic PDF document generation and/or manipulation. iText is not an end-user tool. Typically you won't use it on your Desktop as you would use Acrobat or any other PDF application. Rather, you'll build iText into your own applications so that you can automate the PDF creation and manipulation process.

License: MPL/LGPL.

Supported technology: Java.


ActionScript 3 Open-Source PDF Library - that provides 100% client side PDF generation

License: MIT.

Supported technology: ActionScript 3.


PDF generation library written on Ruby laguage.

License: License of Ruby.

Supported technology: Ruby.


TCPDF is an Open Source PHP class for generating PDF documents. TCPDF project was started in 2002 and now it is freely used all over the world by millions of people. TCPDF is a Free Libre Open Source Software (FLOSS).

License: LGPL.

Supported technology:PHP.


PDFsharp is the Open Source library that easily creates PDF documents from any .NET language. The same drawing routines can be used to create PDF documents, draw on the screen, or send output to any printer.

License: Open source.

Supported technology: .NET.


libHaru is a free, cross platform, open source library for generating PDF files.

License: ZLIB/LIBPNG License.

Supported technologies: Written on C++, crossplatform.

Apache FOP

Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL formatting objects (XSL-FO) and an output independent formatter. It is a Java application that reads a formatting object (FO) tree and renders the resulting pages to a specified output. Output formats currently supported include PDF, PS, PCL, AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser extent, RTF and TXT. The primary output target is PDF.

License: Apache License, version 2.0. Releases until version 0.20.5 are released unter the Apache License, version 1.1.

Supported technology: Java.

PDF Clown Project

PDF Clown Project is an open source implementation of the Portable Document Format (PDF) specification published by Adobe® Systems Inc., written as a class library in multiple languages (Java™ 1.5 and C# 2.0).

License: Creative Commons Attribution-ShareAlike 2.5 License..

Supported technologies: .NET, Java.


iText# (iTextSharp) is a port of the iText open source java library written entirely in C# for the .NET platform. iText# is a library that allows you to generate PDF files on the fly. It is implemented as an assembly.

License: Apache License, version 2.0. Releases until version 0.20.5 are released unter the Apache License, version 1.1.

License: MPL/LGPL.

Supported technology: .NET.


You've forgotten the Python Reportlab Toolkit: http://www.reportlab.org/rl_toolkit.html

Thanks for the post!

Thanks for including Prawn here!

aww, no python.

a good one for reading pdfs is GhostScript

you left out the community edition of dynamicpdf.com for .NET it is very good and I've been using it for free for years.

I use Prawn and it works well. Glad you mentioned it.

iText is by far the best

Great post, thank you!

Several .NETs - I'd say this is mostly Microsoft centered test. And what exactly makes those "best" ? This is more like a list, than a test to prove it.

How about providing some experiences on what makes these the best and which one you would recommend. This is hardly useful to anyone who knows how to google.

ZLIB/LIBPNG License for LibHaru - what does that mean?
Is it possible to include it in a proprietary commercial project?

Would be more interesting what alternatives one has
to layout a template and create a PDF later. All these libraries are
very native - so comparable to simple drawing operations.

What I would like to see is an overview on alternatives
where I can prepare a template using a WYSIWYG editor
and fill it later programmatically with data to get the PDF.
Something like "JasperReports", "BIRT" ... but not only for

iText rules!! but yes it is very native

I wish there was a roundup comparison of the .NET PDF generators.
Sometimes you need to generate a mass of documents and perfomance is crucial.

You also forgot the Flying Saucer: https://xhtmlrenderer.dev.java.net/

This one works using XHTML/XML and CSS 2 directives, and does so very very well.

It uses iText under the covers to render to PDF.

Thanks man, I'll post my experiences with layouts and fpdf a bit later.

Thank you, very good post.
See you

Thansk admin..Very good site

thank you for share..

iText is not free for commercial use so another alternative for a commercial java library to create PDF document is jPDFWriter. The main class extends the standard Java PrinterJob so that you can create PDF files in the same way that you would print to a physical printer. This allows for reuse of existing printing code and for an application to decide, at runtime, whether to send the output to a printer or to a PDF file.


thanks for sharing, this is needed, thank you very much!

hi admin . i think this post is very good. i like this. can you visit my blogs :
irmik tatl?s?
sütlaç tatl?s?
ygs ve lys sonuçlar?
akçakoca ilçesi

Advertise on this site

Recent Comments