Coding Tips & Tricks


Home > PDF

Create Barcodes and Pdf's in C# with iTextSharp

An easy way to create PDF files is to use iTextSharp. It is an opensource PDF library that allows to you generate PDF files on the fly. It's great if you need to dynamically create a PDF using dynamic data. Also, I found that this is a great tool to easily make barcodes. You can create common barcodes such as Code 128, Code 39, EAN 128, and Code 39 ext.

Barcode

You can download a copy of the library here. There are also a load of tutorials which can be located on the site.

I've included a copy of a small project that I've whacked together using the library which shows how to create a barcode in a PDF.








Comments

Davinder - 1/23/2010
Thank you for your post! I was looking for something like this.

merritt - 8/13/2010
thank you for the example project. it's a bit trickier when you want to apply to an existing pdf. there is a discussion on stack overflow about stamping images, which is applicable for barcodes: http://stackoverflow.com/questions/583629/how-can-i-insert-an-image-with-itextsharp-in-an-existing-pdf

andy - 9/25/2014
A few days ago,I generated a barcode in C# by myself.I'd like to share my experience witn you guys.And do you have any good ideas?I want to try an easier way,thanks. http://www.keepautomation.com/how_to/csharp/


Add your comment

300 Characters left


Please fill this in to confirm that you are human