Link Search Menu Expand Document

Add Barcode To New PDF - C#

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

using Bytescout.BarCode;

namespace SaveToNewPDF
	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.DataMatrix;
            // Set value
            barcode.Value = "Sample barcode";

			// Place barcode at top-right corner of document page
			barcode.DrawToNewPDF("barcode.pdf", 595,842, 500, 50);
            // Open output file in default PDF viewer

Download Source Code (.zip)

Return to the previous page Explore BarCode SDK