Link Search Menu Expand Document

Add Barcode To Image - C#

BarCode SDK sample in C# demonstrating ‘Add Barcode To Image’

using Bytescout.BarCode;

namespace AddBarcodeToImage
	class Program
		static void Main()
            // Create new barcode and register it.
            Barcode barcode = new Barcode();
			barcode.RegistrationName = "demo";
			barcode.RegistrationKey = "demo";

            // Set symbology
            barcode.Symbology = SymbologyType.PDF417;
            // Set value
            barcode.Value = "Sample barcode";

            // Place barcode at bottom-right corner of the image
			barcode.DrawToImage("wikipedia.png", -1, 400, 900, "result.png");

            // Open output file in default image viewer

Download Source Code (.zip)

Return to the previous page Explore BarCode SDK