No one replied? Ok. I happen to read this post which is the topic I am interested in. I have experience of creating barcode in C# ASP.NET. At that time, I used that third party control. Nowadays, I think the easily way to create barcode is to use a third party control. You just need to install that tool into your program and then follow the guides of barcode creation, like this barcode data encoding guide in C#. So barcode creation becomes very easy.
Some time ago I did a implementation with Hatch and QR Code, you can get the source code at http://labs.autodesk.com/utilities/qrcodes/
One additional point, not implemented on the sample above, was to insert the Hatch as a Block, so the user cannot modify it by accident.
Barcodes can be as simple as using a font. QR codes are significantly more complex.
Yes, creating barcode in C# is quite easy with a barcode font. But I think QR Code is not that complex. QR Code is the most commonly used type of barcode.
Check the sample code of how to generate barcode with C# and insert into document:
C# Sample code
BarCode barcode = new BarCode();
barcode.Symbology = KeepAutomation.Barcode.Symbology.Code39;
barcode.CodeToEncode = "111222333";
barcode.ChecksumEnabled = true;
barcode.X = 1;
barcode.Y = 50;
barcode.BarCodeWidth = 100;
barcode.BarCodeHeight = 70;
barcode.Orientation = KeepAutomation.Barcode.Orientation.Degree90;
barcode.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel;
barcode.DPI = 72;
barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Gif;
/* Output barcode images to different objects
Now, try building one. Don't forget the mask.