|
1. Install our PDF417 .NET Control and start Microsoft Visual Studio. Create a new project after that. ![]() 2. Register PDF417 .NET Control in your application. Open Toolbox for that. ![]() 3. Right-click to open the context menu and select Customize Toolbox. ![]() 4. Switch to the .NET Framework Components tab and click the Browse button. Then select the file Barcodes.PDF417.dll. ![]() 5. Now the PDF417 .NET Control is present on the Windows Forms tab. You can put it on the form. ![]() 6. Adjust the properties of the PDF417 .NET Control. ![]() 7. Place the code for using the control. The following code saves the PDF417 image to an image file. The PDF417 barcode will have x-dimension equal to 2 pixels. double w, h;Copies the PDF417 bar code image to the clipboard. pdF417Control1.CopyToClipboard( 400, 200 );The PDF417 barcode can be displayed in any Graphics object or Device Context (HDC). Graphics gr = this.CreateGraphics();This code allows you to print the PDF417 barcode on the printer. private void button4_Click(object sender, System.EventArgs e) { try { PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler( this.OnPrintBarcodePage ); pd.Print(); } catch( Exception ex ) { MessageBox.Show( ex.Message ); } } // The OnPrintBarcodePage event is raised for each page to be printed. private void OnPrintBarcodePage(object sender, PrintPageEventArgs ev) { double wMM, hMM; pdF417Control1.GetPDF417Size( 0.5, (int)ev.Graphics.DpiX, (int)ev.Graphics.DpiY, Barcodes.PDF417.Dimensions.dmMM, Barcodes.PDF417.Dimensions.dmMM, out wMM, out hMM ); // print a PDF417 barcode pdF417Control1.DrawPDF417ToSize(10, 10, wMM, hMM, Barcodes.PDF417.Dimensions.dmMM, ev.Graphics ); } The installation package contains the entire example of how to use our PDF417 .NET Control. The example is written in MS C#. |