tags:

views:

374

answers:

5

How can I create pdf documents with 2D barcodes (for example QR code http://en.wikipedia.org/wiki/QR_Code) from .NET application?

I will (probably) use iTextSharp for creating the documents. Which component should I use for drawing 2D barcodes?

+2  A: 

Could you not create an Image with the bar code and embed it into the PDF?

Dan
A: 

You can do it by using DevExpress Reports, they are supporting 2D Barcode in there reports, also they are supporting exporting the reports to a lot of formats like PDF.

Wael Dalloul
+2  A: 

iTextSharp supports several barcode standards (as per the tutorial at http://itextsharp.sourceforge.net/tutorial/ch09.html)

* Barcode39:  code 39 and code 39 extended
* Barcode128: code 128 and the special encoding UCC/EAN-128
* BarcodeEAN: EAN13, EAN8, UPCA, UPCE, and EAN with supplemental 5, EAN with supplemental 5, EAN with supplemental 2
* BarcodeInter25: interleaved 2 of 5
* BarcodePostnet: postnet and planet
David
Those are 1D barcodes!
svinto
whoops...that makes my answer suck :/
David
Yeah, almost perfect answer :)
_simon_
Dan's answer is probably best since there is no native iTextSharp method for 2D
David
A: 

Google says http://sourceforge.net/projects/pdf417lib/ though it hasn't been updated since 2005 and is in beta. Please do report back if you use this.

(Feels like 2D barcodes is quite unusual, probably because just having a ID is often sufficient and 1D-scanners are waaaay cheaper.)

svinto
A: 

You can use the Aspose barcode and Aspose pdf components to create a series of documents with barcodes easily.

There's plenty of examples in the forum demonstrating examples of how to do this. In addition, you will also be able to extract the barcode values from the original PDF using these components if that becomes a future requirement.

Brian Scott