TEC-IT
TECIT
Bookmark Me

FAQ: TBarCode in Web Applications

FAQ TBarCode: Delays on the Web Server, Barcode Optimization in Web Applications
 

Authenticity Verification

Delays on the Web Server

When running TBarCode on IIS for Windows behind a firewall, a possible delay of 15-30 seconds may occur when the first page is hit. This is caused by IIS because it is authenticating signed .NET / DLL components.

The solution is to replace all TBarCode DLL files with unsigned versions. These are available on request, please contact the TEC-IT support!

Resolution & Readability

Barcode Optimization in Web Applications

When generating bar codes as image stream, the bars (or spaces) should always be aligned on the pixel grid. The CountModules, XRows, XCols functions can be used for adjustments. Look at the ASP and PHP samples delivered within the setup

Note: Without any scaling images in a browser are always displayed in 96 dpi. A thin bar having 1 pixel is normally 1/96 inch wide.

Principally, you shouldn't have any problems printing 96 dpi image on a laser printer with 600-1200 dpi. There are some printing tolerance which may occur while converting 96 dpi to 600/1200 dpi but they are minimal.

It might eventually be more complex to adjust the barcode to a specific size or to adjust the printing resolution to 300 dpi or lower. In this case, you should adjust the barcode module width to the dot-width of the printer using the width and height attribute of the HTML <img> tag.

See section B 9.3 in the Barcode Reference to learn how to set the module width to 15 mils (0.015 inch). We recommend reading the whole Appendix B

Read permissions

ASP: Library Not Registered

"Server object error 'ASP 0177 : 8002801d' Server.CreateObject Failed (..) - Library not registered"

If you get this error message, you need to change the read permissions of IUSR_MACHINE user account for the type library entry in the registry. Please follow the steps below:

  • Start "regedit" or "RegEdt32.exe"
  • Select HKEY_CLASSES_ROOT
  • TBarCode OCX V8: Search for Type Lib UUID {07EC89D3-07F6-4B94-8A6A-C2347DB5C9EC}.
  • TBarCode OCX V9: Search for Type Lib UUID {E06A2F00-D769-46FE-B2D6-E795C0CEE76E}.
  • Right click on the registry entry and select "Permissions" from the drop down menu. Alternatively, you can also go to Edit -> Permission.
  • On the next dialog, set read permissions of IUSR_MachineName or EveryOne account.

PDF-417

How can I generate a pixel-optimized PDF417 in VB ASP.NET?

Insert this code into the Page_Load event

  Me.BarcodeControl1.Barcode.BarcodeType = BarcodeType.Pdf417
  Me.BarcodeControl1.Barcode.Data = data

  ' TBarCode V7, V8:
  Dim horizModules As Integer
  Dim verticRows As Integer

  horizModules = Me.BarcodeControl1.Barcode.CalculateXColumnsOf2DBarcode()
  verticRows = Me.BarcodeControl1.Barcode.CalculateNumberOfRows()

  Me.BarcodeControl1.Barcode.SizeMode =  SizeMode.FitToBoundingRectangle
  ' for the dpi use at least 3 times the screen res (or >= 300 dpi) 
  Me.BarcodeControl1.Barcode.Dpi = 96 * 3
  Me.BarcodeControl1.Width = New Unit(horizModules)
  ' for the height use a multiplicator of 3 - 5  
  Me.BarcodeControl1.Height = New Unit(verticRows * 5)

End Sub
In TBarCode V9 you can use the new function BCGetOptimalBitmapSize()
TEC-IT

© TEC-IT Datenverarbeitung GmbH, Austria  ++43(0)7252/72720  office@tec-it.com