QR Code Image Sample - pqScan.com
C#, VB.NET PDF417 Creator Encoding PDF-417 Barcode Image in C# and VB.NET Online Demo Download Trial Purchase Now

How to Generate PDF 417 in C# and VB.NET

back to home  >  .NET Barcode Generator SDK  >  Generate Barcodes in C# & VB.NET  >  Generate PDF-417 in C# & VB.NET

C# and VB.NET PDF417 Creator is one of the generation functions in pqScan Barcode Creator for .NET. It allows users to use C# and VB.NET code to generate PDF417 barcode in any .NET application, creating PDF 417 in web programming and drawing PDf417 in .NET Winforms are both supported excellent.

In this guide, we will show you how to generate PDF 417 in Console application using C#/VB.NET language.

Make and generate PDF417 - C Sharp sample

The first example shows you how to generate PDF-417 barcode image using C# code. The most useful properties Width, Height and PDF417Compact have been lifted, you can make customized barcode image by resetting them.

using System;
using System.Drawing;
using System.Drawing.Imaging;
using PQScan.BarcodeCreator;

namespace PDF417GeneratorInCSharp
{
    classProgram
    {
        staticvoid Main(string[] args)
        {

            //Create an instance of PQScan.BarcodeCreator.Barcode object.
            Barcode pdf417 = new Barcode();
            //Set barcode date to encode
            pdf417.Data = "pqScan123456789";
            //Set barcode type
            pdf417.BarType = BarCodeType.PDF417;
            //Set barcode image width
            pdf417.Width = 300;
            //Set barcode image height
            pdf417.Height = 200;
            //Set pdf417 compact/truncated
            pdf417.PDF417Compact = false;           
            //Set barcode image fore groud color
            pdf417.BarcodeColor = Color.Black;
            //Set barcode image back ground color
            pdf417.BackgroundColor = Color.White;
            //Set barcode image format
            pdf417.PictureFormat = ImageFormat.Png;
            //Save barcode image to file
            pdf417.CreateBarcode("pdf417-csharp.png");     
        }
    }
}

Encode and Create PDF-417 - Visual Basic sample

It's not hard to generate PDF417 barcode image in VB.NET. Look at the following Visual Basic.NET code, it will lend a hand to you.

More two- dimensional barcodes are support: QR Code in C#/VB.NET, Aztec Code in Visual Basic.NET and C#, Data Matrix in C# and VB.NET.

Imports System.Drawing
Imports System.Drawing.Imaging
Imports PQScan.BarcodeCreator

Namespace PDF417GeneratorInVB
    Class Program
        Private Shared Sub Main(args As String())

            'Create an instance of PQScan.BarcodeCreator.Barcode object.
            Dim pdf417 As New Barcode()
            'Set barcode date to encode
            pdf417.Data = "pqScan123456789"
            'Set barcode type
            pdf417.BarType = BarCodeType.PDF417
            'Set barcode image width
            pdf417.Width = 300
            'Set barcode image height
            pdf417.Height = 200
            'Set pdf417 compact/truncated
            pdf417.PDF417Compact = False
            'Set barcode image fore groud color
            pdf417.BarcodeColor = Color.Black
            'Set barcode image back ground color
            pdf417.BackgroundColor = Color.White
            'Set barcode image format
            pdf417.PictureFormat = ImageFormat.Png
            'Save barcode image to file
            pdf417.CreateBarcode("pdf417-vb.png")
        End Sub
    End Class
End Namespace

generate pdf417 in c#/vb.net

.NET Barcode Creator QR Code Creator in C#/VB Data Matrix Creator in C#/VB Aztec Creator in C#/VB EAN 13 Creator in C#/VB EAN 8 Creator in C#/VB UPC A Creator in C#/VB Code 128 Creator in C#/VB Code 39 Creator in C#/VB