Link Search Menu Expand Document

Add Barcode to PDF - VB.NET

BarCode SDK sample in VB.NET demonstrating ‘Add Barcode to PDF’

Program.vb
Imports Bytescout.BarCode

Class Program
	Friend Shared Sub Main()
		' Create new barcode and register it.
		Dim barcode As 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 every document page
		barcode.DrawToPDF("wikipedia.pdf", -1, 500, 50, "result.pdf")

		' Open output file in default PDF viewer
		System.Diagnostics.Process.Start("result.pdf")
	End Sub
End Class

Download Source Code (.zip)

Return to the previous page Explore BarCode SDK