- Online Barcode Generator
- How To
- Buy Now
Ketiic Barcode UI ASP.NET AJAX offers users the comprehensive and easy to use barcode creating, barcode customizing as well as barcode image outputting ad saving tools. The barcode creating and defining objects have been discussed in C# barcode type tutorial (particular barcode getting started guides and detailed sample codes), then, in this page, we will talk about how to set barcode output types within ASP.NET barcode creating application.
Technically speaking, the output types of Kettic PerBarcode control can be specified into two versions: SVG_VML and EmbeddedPNG. The former is a vector image format while the latter is a raster image file. In the first case, created barcode image is rendered and saved as SVG file or VML for IE8 and older versions.
This part is designed to demonstrate how to save and output barcode image in PNG image file. And the sample code is Code 128 barcode, of course, users can change to any other compatible barcode type, for instance, Code 11, Codabar, Code 39, Code 128, MSI, Postnet, Code 2 of 5, etc.
Basic information for PNG image: still known as Portable Network Graphics, PNG is a bitmap image file format for the lossless, portable, well-compressed storage of raster (bitmap) images. PNG can be used in many fields, and image-editing and transferring images on the Internet are two major uses.
ASP.NET codes for outputting PNG type:
Sample C# codes for EmbeddedPNG type:
After have been familiar with EmbeddedPNG type, let's come to setting SVG_VML Type. With the rich option from Kettic barcode creating and saving components, we can also create and output barcode in SVG_VML type.
Different from raster PNG image, SVG is a vector image form. SVG, the short form of Scalable Vector Graphics, is an XML-based vector image format for two-dimensional graphics with support for interactivity and animation. And SVG image can keep the same no matter it is magnified in how many times.
See ASP.NET codes for SVG_VML type:
See C# sample codes for outputting SVG_VML type:
PerBarcode1.OutputType = BarcodeOutputType.SVG_VML;
The output image can be created using GetImage() method of the PerBarcode control. Users can get the returned System.Drawing. Bitmap object to save image later and the image size depends on the LineWidth (DotSize) set for the Barcode.
ASP.NET AJAX UI Controls