How to print barcode images with Barcode Professional SDK for .NET


Well-known member
Dec 5, 2005
Programming Experience
As you probably already know, most printing jobs within .NET Framework are performed by using the PrintDocument class under System.Drawing.Printing namespace. The PrintDocument class is used to set the properties that describe what and where to print content such us strings, images and so on.
The main method the PrintDocument class features is Print which starts the document's printing process. After Print method is invoked, the PrintDocument raises a PrintPage event for each page to be printed. Here is where you should add your printing logic to an event handler for that event.
If your application needs to feature barcoding capabilities, it's also probably that printing documents containing barcode images are required as well.
Barcode Professional control features an overloaded method called DrawOnCanvas which lets you to draw the barcode image on any GDI+ Graphics object - an instance of System.Drawing.Graphics class. The PrintDocument's PrintPage event exposes a Graphics object where to paint the page content and here is where that Graphics object must be passed to the DrawOnCanvas method in order to get the barcode image printed.
This guide describes common scenarios regarding barcode printing using the PrintDocument class and Barcode Professional's DrawOnCanvas method:

- How to print barcodes using PrintDocument class
- How to print scaled barcodes using PrintDocument class
- How to print barcodes that need to fit a given area using PrintDocument class

This Demo
More Demos
Download Barcode Professional SDK for .NET
More Information about Neodynamic Barcode Professional SDK for .NET

.NET Components & Controls
Top Bottom