dBarcode.NET Dual Universal 5.50 Developer/Server Retail
dBarcode.NET Dual Universal 5.50 Developer/Server Retail | 9 Mb
dBarcode .NET products included managed code WinForms Controls and Components that allow barcode images to be created within the developer’s own .NET Windows Form or ASP.NET application. A barcode image may be displayed on screen or printed on a printer, and the image may be passed to any other image-handling component.
dBarcode .NET products are designed to work with Visual Studio 2005-2015 and require the .NET Framework 2.0 (or later) to be installed on any computer using the components. Example code for Windows Forms is provided with each control and component for users of Visual Basic .NET and C#.
dBarcode.NET Dual Universal - supports all of the 1D, 2D and GS1-Composite barcode types of the components below in a single component
Features
Create high resolution metafile or EPS images.
Save to graphics files or memory streams in a variety of formats (BMP, EPS, GIF, JPG, PNG, TIF, WMF).
Barcodes may be rotated through any angle or created as a mirror image.
Margin indicators and bearer bars may be turned on/off for codes which support these features.
Font properties, text justification, bar colour and background colour may be user selected.
Wide/Narrow ratios may be adjusted for barcode type that support this.
Bar width control for wet-ink printing allows 0 - 50% width reduction.
Design-time dialog for easy WinForms setup
Fully serializeable
Using on ASP.NET pages
There are many possible approaches to generating barcode images for ASP.NET pages. Whatever method is chosen it is important to ensure that the image is created at a higher graphics resolution than the normal 96 dpi used for web images - because the width of the bars is important.
One method, suitable for use when the barcode is to be data-dependent, is to use two aspx files, one which creates a memorystream barcode image using one of the dBarcode.NET components and then uses a dummy ASP.NET page as the SRC for an IMG tag to display the image at the correct size, eg.
<script language="vb" runat="server">
sub Page_Load(Sender As Object, E As EventArgs)
…………………..
m_barcode.Unit = GraphicsUnit.Inch
m_barcode.XUnit = 0
m_barcode.Font=m_Font
m_barcode.Orientation=0
m_barcode.AutoCheckdigit=TRUE
m_barcode.BarcodeHeight = tht ' desired height in inches
m_barcode.BarcodeWidth = twd ' desired width in inches
m_barcode.CodeTypeValue = 8
m_barcode.caption = Session("xx")
Session("ms")=m_barcode.sBarcode(300,300,System.Drawing.Imaging.ImageFormat.Png)
if Session("ms").Length>0 then
Session("ht")=m_barcode.ImageHeight*96/300 ' adjust size for the desired image resolution
Session("wd")=m_barcode.ImageWidth*96/300
end if
</script>
</head>
<BODY>
<H1>dLSoft dBarcode.NET - on ASP.NET</H1>
<IMG SRC="page2.aspx" HEIGHT=" <% =Session("ht") %> " WIDTH=" <% =Session("wd") %> ">
<p> dBarcode.NET components can generate barcode images in BMP, GIF, PNG, JPG, TIF and WMF formats, and for more than 50 barcode types.
</BODY>
</HTML>
The Session variables ht and wd contain the actual sizes at which the barcode image is to be drawn on the web page. These are calculated when the page is loaded and used when the IMG SRC calls the second page.
The second file (page2.aspx) serves up the image at the correct size, eg.
<%@ LANGUAGE="VB"%>
<%
Response.ContentType="image/png"
Response.BinaryWrite(Session("ms").GetBuffer())
%>