The sample source code below will teach you how to add to new PDF in VB.NET. What is ByteScout Barcode SDK? It is the robost library (Software Development Kit) that is designed for automatic generation of high-quality barcodes for printing, electronic documents and pdf. All popular barcode types are supported from Code 39 and Code 129 to QR Code, UPC, GS1, GS-128, Datamatrix, PDF417, Maxicode and many others. Provides support for full customization of fonts, colors, output and printing sizes. Special tools are included to verify output quality and printing quality. Can add generated barcode into new or existing documents, images and PDF. It can help you to add to new PDF in your VB.NET application.
This rich sample source code in VB.NET for ByteScout Barcode SDK includes the number of functions and options you should do calling the API to add to new PDF. In order to implement the functionality, you should copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Code testing will allow the function to be tested and work properly with your data.
Our website provides trial version of ByteScout Barcode SDK for free. It also includes documentation and source code samples.
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 document page barcode.DrawToNewPDF("barcode.pdf", 595,842, 500, 50) ' Open output file in default PDF viewer System.Diagnostics.Process.Start("barcode.pdf") End Sub End Class