Creating PDFs with iTextSharp

Need your data organized into a good looking PDF report?

Many websites now include reporting pieces, or places where you may just want data exported… and what better format than a PDF, which is a widely accepted format for documents to be opened and viewed on any operating system thanks to Adobe Reader.

But, how do these PDF reports get made?

iTextSharp is a free tool that can be integrated into the development process that allows our code to interact with PDF files.  It can create a PDF file from scratch, or open up an existing one and add to it.

The first time I went to use iTextSharp, I wasn’t impressed.  But, I didn’t realize how flexible it was then.  When creating a PDF file from scratch, you do literally have to draw every line at the right spot, or each box, or have each text in the right place with the right font.  At first glance, this is a bit of a daunting task as you have to know exactly the coordinates to put things… but looking back on it after having used it, it really is a powerful tool that lets you get things right where you want them.

But it’s not only for creating new PDF files… it can also open up existing PDFs and can be used to merge data into PDFs that have fields built in already… a powerful “PDF Merge” type of tool that lets you create your own PDFs (in adobe acrobat, or wherever), insert the fields into them there, then have the code via iTextSharp insert your data and make your report!

Anyway, if you’re a developer and interested, you can check out iTextSharp yourself at it’s website off sourceforge: http://itextsharp.sourceforge.net/

And if you’re a client and interested, we’re good at making custom PDF reports from your database data, or merging your data into PDF files you may already have!

Comments are closed.