How to Use BC.NetPdfBarcodeGenerator.All
To draw 2d & 1d barcodes and generate barcodes on PDF file pages in various .NET applications.
It's easy to use BC.NetPdfBarcodeGenerator.All library to draw barcode symbologies and generate barcode on PDF file pages in your .NET/C#/VB.NET Class, ASP.NET web application, .NET Windows Forms application, and .NET Console Application. QR Code, Data Matrix, PDF417, Code 128, Code 39, EAN-13, and UPC-A barcodes are supported.
Here we will show you how to generate barcodes on PDF C# & VB.NET in simple steps. Please firstly download and get the free trial library (BC.NetPdfBarcodeGeneratorTrial.All.dll). And the only thing for the integration of our .NET PDF barcode generator library dll is to add your project reference to it.
We take .NET Console Application as an example of how to use BC.NetPdfBarcodeGenerator.All library to generate barcodes on PDF file in C# and VB.NET. For ease of use, you can copy the following simple code examples to generate barcodes on PDF file in C# and VB.NET programming projects.
PLEASE NOTE: A demo project is included in the free trial package of BC.NetPdfBarcodeGenerator.All. You can download a trial to see more.
1. You can draw 2d barcodes (QR Code, Data Matrix, PDF417) and generate barcodes on PDF file using BC.NetPdfBarcodeGenerator.All library. (Sample: PDF QR Code Generating)
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using BC.NetPdfBarcodeGeneratorTrial.All; namespace BC.NetPdfBarcodeGeneratorDemo { class PDFBarcodeGeneratorDemo { public static void CreateQrcodeToPDF() { PdfDoc File = new PdfDoc(); PdfDocPage FilePage = File.AddDocPage(); BCImage Graphics = BCImage.GetFromDocPage(FilePage); BCPdfBarcode barcode = new BCPdfBarcode(); barcode.SetType = BCBarcodeSymbology.Qrcode; barcode.SetData = "www.barcodebc.com"; barcode.SetColor = BCColor.Black; barcode.SetBackgroundColor = BCColor.White; barcode.QrcodeECL = QrcodeECLMode.LevelL; barcode.SetBarcodeLocation = new BCPosition(100, 100); barcode.SetBarcodeSize = new BCSize(200, 200); barcode.GenerateBarcode(Graphics); File.Save("Qrcode.pdf"); Process.Start("Qrcode.pdf"); } } }
Imports System Imports System.Collections.Generic Imports System.Diagnostics Imports System.Linq Imports System.Text Imports System.Threading.Tasks Imports BC.NetPdfBarcodeGeneratorTrial.All Module PDFBarcodeGeneratorDemo1 Class PDFBarcodeGeneratorDemo Public Shared Sub CreateQrcodeToPDF() Dim File As PdfDoc = New PdfDoc() Dim FilePage As PdfDocPage = File.AddDocPage() Dim Graphics As BCImage = BCImage.GetFromDocPage(FilePage) Dim barcode As BCPdfBarcode = New BCPdfBarcode() barcode.SetType = BCBarcodeSymbology.Qrcode barcode.SetData = "www.barcodebc.com" barcode.SetColor = BCColor.Black barcode.SetBackgroundColor = BCColor.White barcode.QrcodeECL = QrcodeECLMode.LevelL barcode.SetBarcodeLocation = New BCPosition(100, 100) barcode.SetBarcodeSize = New BCSize(200, 200) barcode.GenerateBarcode(Graphics) File.Save("Qrcode.pdf") Process.Start("Qrcode.pdf") End Sub End Class End Module
2. You can also generate 1d barcodes on PDF file in C#/VB.NET programming using BC.NetPdfBarcodeGenerator.All library. It supports most popular 1d/linear barcode symbologies, including Code 128, Code 39, EAN-13, and UPC-A. (Sample: PDF Code 39 Generating)
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using BC.NetPdfBarcodeGeneratorTrial.All; namespace BC.NetPdfBarcodeGeneratorDemo { class PDFBarcodeGeneratorDemo { public static void CreateCode39ToPDF() { PdfDoc File = new PdfDoc(); PdfDocPage FilePage = File.AddDocPage(); BCImage Graphics = BCImage.GetFromDocPage(FilePage); BCPdfBarcode barcode = new BCPdfBarcode(); barcode.SetType = BCBarcodeSymbology.Code39; barcode.SetData = "WWW.BARCODEBC.COM"; barcode.SetColor = BCColor.Black; barcode.SetBackgroundColor = BCColor.White; barcode.SetTextVisible = true; barcode.SetBarcodeLocation = new BCPosition(100, 100); barcode.SetBarcodeSize = new BCSize(200, 50); barcode.GenerateBarcode(Graphics); File.Save("Code39.pdf"); Process.Start("Code39.pdf"); } } }
Imports System Imports System.Collections.Generic Imports System.Diagnostics Imports System.Linq Imports System.Text Imports System.Threading.Tasks Imports BC.NetPdfBarcodeGeneratorTrial.All Module PDFBarcodeGeneratorDemo1 Class PDFBarcodeGeneratorDemo Public Shared Sub CreateCode39ToPDF() Dim File As PdfDoc = New PdfDoc() Dim FilePage As PdfDocPage = File.AddDocPage() Dim Graphics As BCImage = BCImage.GetFromDocPage(FilePage) Dim barcode As BCPdfBarcode = New BCPdfBarcode() barcode.SetType = BCBarcodeSymbology.Code39 barcode.SetData = "WWW.BARCODEBC.COM" barcode.SetColor = BCColor.Black barcode.SetBackgroundColor = BCColor.White barcode.SetTextVisible = True barcode.SetBarcodeLocation = New BCPosition(100, 100) barcode.SetBarcodeSize = New BCSize(200, 50) barcode.GenerateBarcode(Graphics) File.Save("Code39.pdf") Process.Start("Code39.pdf") End Sub End Class End Module
Examples for drawing and generating 1D/2D barcodes on PDF file are also provided in our free trial package. You can directly download a free PDF barcode generator trial to see more. We also provide a .NET barcode generator SDK and a .NET Core barcode generator SDK. You may click to see more.
How do you find our .NET pdf barcode generator? Our customers often use search words like how to generate barcode pdf c#, how to generate barcode pdf vb.net, how to generate barcode pdf c# windows application, how to generate barcode pdf c# web application, how to generate barcode pdf c# asp.net, how to generate barcode pdf vb asp.net, how to generate barcode pdf file free, generate barcode pdf free code example, generate barcode pdf file free api vb.net, generate qr code for pdf c#, generate qr code for pdf vb.net, generate qr code for pdf online, generate data matrix for pdf c#, generate pdf417 for pdf c#, generate code128 for pdf c#, generate code39 for pdf c#.net web application, generate ean13 for pdf c#.net windows application, generate upca for pdf c#.net windows application, generate 1d barcode on pdf vb.net web application, generate 2d barcode on pdf c#.net web application, c# generate 2d barcode on pdf file, vb.net generate 1d barcode on pdf file, create qr code on pdf c#, create barcode on pdf c#, create barcode on pdf vb.net, and so on.