Tbarcode11 Ocx User en
Tbarcode11 Ocx User en
Tbarcode11 Ocx User en
28
9.1 General 28
9.2 InfoPath 2003 28
9.2.1 Activate the Design Mode 28
9.2.2 Add TBarCode to the Custom Controls 28
9.2.2.1 Specify Data Source Type 30
9.2.2.2 Finish Adding the Custom Control 32
9.2.3 Insert Barcode 33
9.2.4 Change Binding 33
Page 3 of 73
TBarCode User Manual
9.2.5 Adjust Barcode Parameters 34
9.3 InfoPath 2010 / InfoPath 2013 34
9.3.1 Add TBarCode to the Custom Controls 35
9.3.1.1 Specify Data Source Type 36
9.3.1.2 Finish Adding the Custom Control 38
9.3.2 Insert Barcode 39
9.3.3 Change Binding 39
9.3.4 Adjust Barcode Parameters 40
10 The Property Pages 41
10.1 Introduction 41
10.2 Property Page Barcode 41
10.2.1 Barcode Type (Symbology) 41
10.2.2 Button Adjust 41
10.2.3 Barcode Data 42
10.2.4 Encoding Mode 42
10.2.5 Code page 42
10.2.6 Format/Subset 42
10.2.7 Check Digit 43
10.2.7.1 Check Digit Override 43
10.2.8 Compression 43
10.2.9 Suppress Error Messages 44
10.2.10 Translate Escape Sequences 44
10.2.11 Button License 44
10.2.12 Button About 44
10.3 Property Page Appearance 45
10.3.1 General 45
10.3.1.1 Orientation 45
10.3.1.2 Print Ratio 45
10.3.1.3 Back Style 45
10.3.1.4 Bar Width Reduction [%] 46
10.3.1.5 Bearer Bars 46
10.3.1.6 Bearer Bar Width [1/1000 mm] 46
10.3.1.7 Draw Mode 46
10.3.1.8 Quiet Zone 47
10.3.2 Text Options 47
10.3.2.1 Print Text 47
10.3.2.2 Above Symbol 47
10.3.2.3 Alignment 48
10.3.2.4 Text Distance 48
10.3.3 Barcode Size and Module Width 48
10.3.3.1 Mode 48
10.3.3.2 Module Width [1/1000 mm] 48
10.3.3.3 Resolution 49
10.3.3.4 Custom Resolution (DPI) 49
10.3.3.5 Decoder 49
10.3.4 Display Error if Barcode is clipped 50
10.4 Property Page Font 50
10.4.1 Properties 50
10.4.2 Font 50
10.4.3 Size 50
10.4.4 Effects 50
10.4.5 Sample Text 51
10.5 Property Page Color 51
10.5.1 Properties 51
10.5.2 Color Set 52
10.5.3 Color Palette 52
10.5.4 Edit Custom Color 52
10.6 Adjust 52
10.7 Adjust Properties: Aztec Code 53
10.7.1 Format / Format Specifier 53
10.7.2 Symbol Size 53
10.7.3 Enforce binary encoding 53
10.7.4 Enable Aztec Runes 53
10.7.5 Error Correction in % [0-90] 54
10.7.6 Structured Append 54
10.7.6.1 Use structured append 54
10.7.6.2 Number of all symbols [AZ] 54
10.7.6.3 Index of this symbol [116] 54
10.7.6.4 Message ID 54
10.8 Adjust Properties: Codablock-F 54
10.8.1 Rows [2..44] 54
10.8.2 Columns [4..62] 54
10.8.3 Row height [1/1000 mm] 55
Page 4 of 73
TBarCode User Manual
10.8.4 Separator height [1/1000 mm] 55
10.8.5 Code format 55
10.9 Adjust Properties: Data Matrix 55
10.9.1 Code Format 55
10.9.2 Symbol Size 56
10.9.3 Enforce Binary Encoding 56
10.9.4 Show as Rectangle 56
10.9.5 Structured Append 56
10.9.5.1 Use structured append 56
10.9.5.2 Number of all symbols [216] 56
10.9.5.3 Index of this symbol [116] 56
10.9.5.4 File-ID [164516] 56
10.10 Adjust Properties: DotCode 56
10.10.1 Format / Format Specifier 57
10.10.2 Size Mode 57
10.10.3 Ratio/Size 57
10.10.4 Print Direction 57
10.10.5 Enforce Binary Encoding 57
10.10.6 Mask 58
10.10.7 Structured Append 58
10.10.7.1 Use Structured Append 58
10.10.7.2 Number of all Symbols [235] 58
10.10.7.3 Index of this Symbol [135] 58
10.11 Adjust Properties: Han Xin Code 58
10.11.1 Symbol Version (Size) 58
10.11.2 Enforce Binary Encoding 58
10.11.3 Error Correction Level 59
10.11.4 Mask Pattern 59
10.12 Adjust Properties: MaxiCode 59
10.12.1 Mode 60
10.12.2 Undercut [0..100 %] 60
10.12.3 Preamble Options 60
10.12.3.1 Use Preamble 60
10.12.3.2 Preamble date (099) 60
10.12.4 Structured Append 60
10.12.4.1 Use structured append 60
10.12.4.2 Number of all symbols [28] 60
10.12.4.3 Index of this symbol [18] 60
10.12.5 Structured Carrier Message (SCM) 60
10.12.5.1 Service class [0...999] 61
10.12.5.2 Country code [0...999] 61
10.12.5.3 Postal code [9 digits] 61
10.13 Adjust Properties: PDF417 61
10.13.1 PDF417 61
10.13.1.1 Rows [3..90] 62
10.13.1.2 Row height [1/1000 mm] 62
10.13.1.3 Columns [1..30] 62
10.13.1.4 Error Correction Level 62
10.13.1.5 Encoding Mode 63
10.13.2 MicroPDF417 63
10.13.2.1 Mode 63
10.13.2.2 Version 63
10.13.3 Macro PDF417 (structured append) 63
10.14 Adjust Properties: QR-Code / QR-Code 2005 64
10.14.1 Format / Application Indicator 64
10.14.2 Symbol Version (Size) 64
10.14.3 Error Correction Level 65
10.14.4 Mask Pattern 65
10.14.5 Compaction 65
10.14.6 Structured Append 65
10.14.6.1 Use Structured Append 65
10.14.6.2 Parity Byte [0255] 66
10.14.6.3 Number of all Symbols [216] 66
10.14.6.4 Index of this Symbol [116] 66
10.15 Adjust Properties: Micro QR-Code 66
10.15.1 Symbol Version (Size) 66
10.15.2 Error Correction Level 66
10.15.3 Mask Pattern 67
10.15.4 Compaction 67
10.16 Adjust Properties: Composite/GS1 DataBar (RSS) 67
10.16.1 Composite Component 67
10.16.1.1 Data Input for the GS1 Composite Symbology 68
10.16.2 Segments per Row 68
Page 5 of 73
TBarCode User Manual
11 Licensing 69
11.1 License Types 69
11.2 Entering your License Data 69
11.2.1 License Dialog 69
12 Contact and Support Information 70
Appendix A : Related Downloads 71
A.1 Developer Manuals 71
A.2 Sample Applications 71
A.3 Barcode Reference 71
Appendix B : TBarCode INI-File 72
B.1 Compatible Draw Mode 72
B.2 Site Lock (OCX only) 72
B.3 License TBarCode 72
Appendix C : FAQ 73
1.1 List of Figures
Figure 1: Insert Barcode using the Menu (Microsoft Word) 11
Figure 2: Insert Barcode using the Control Toolbox (Microsoft Word) 12
Figure 3: Excel 2007: Excel Options - Show Developer tab 13
Figure 4: Excel 2007: More Controls 14
Figure 5: Excel 2007: Select TBarCode11 14
Figure 6: Excel 2010: Excel Options - Show Developer tab 16
Figure 7: Excel 2010: More Controls 17
Figure 8: Excel 2010: Select TBarCode11 17
Figure 9: Property Pages (Microsoft Word) 20
Figure 10: Property List (Microsoft Word) 21
Figure 11: Data Binding in Microsoft Excel 23
Figure 12: Data Binding in Microsoft Access 24
Figure 13: Add TBarCode to the Custom Controls in Microsoft InfoPath 2003 (1) 29
Figure 14: Add TBarCode to the Custom Controls in Microsoft InfoPath 2003 (2) 30
Figure 15: Add TBarCode to the Custom Controls in Microsoft InfoPath 2003 (3) 32
Figure 16: Insert TBarCode in a Microsoft InfoPath 2003 Document 33
Figure 17: Adjust Barcode Properties in Microsoft InfoPath 2003 34
Figure 18: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (1) 35
Figure 19: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (2) 35
Figure 20: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (3) 36
Figure 21: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (4) 38
Figure 22: Insert TBarCode in a Microsoft InfoPath 2010 Document 39
Figure 23: Adjust Barcode Properties in Microsoft InfoPath 2010 40
Figure 24: Property Page Barcode 41
Figure 25: Property Page Appearance 45
Figure 26: Quiet Zone Adjustment 47
Figure 27: Property Page Font 50
Figure 28: Property Page Color 51
Figure 29: Adjust 52
Figure 30: Advanced Properties: Aztec Code 53
Figure 31: Advanced Properties: Codablock-F 54
Figure 32: Advanced Properties: Data Matrix 55
Figure 33: Advanced Properties: DotCode 57
Figure 34: Advanced Properties: Han Xin Code 58
Figure 35: Advanced Properties: MaxiCode 59
Figure 36: Advanced Properties: PDF417 61
Figure 37: Advanced Properties: QR-Code 64
Figure 38: Advanced Properties: Micro QR-Code 66
Figure 39: Advanced Properties: Composite/GS1 DataBar 67
Page 6 of 73
TBarCode User Manual
1.2 List of Tables
Table 1: Compression 42
Table 2: Compression 44
Table 3: Bearer Bars 46
Table 4: Draw Mode 46
Table 5: Text Alignment 48
Table 6: Size Mode 48
Table 7: Resolution 49
Table 8: Decoder 49
Table 9: Codablock-F Code Formats 55
Table 10: Data Matrix Code Formats 56
Table 11: DotCode Formats 57
Table 12: DotCode Mask Patterns 58
Table 13: Han Xin Code Error Correction Levels 59
Table 14: Han Xin Code Mask Patterns 59
Table 15: MaxiCode Compaction Modes 60
Table 16: PDF417 Error Correction Levels 62
Table 17: Micro PDF417 Compaction Modes 63
Table 18: QR-Code Formats 64
Table 19: QR-Code Error Correction Levels 65
Table 20: QR-Code Mask Patterns 65
Table 21: QR-Code Compaction Modes 65
Table 22: Composite Component Format 67
Page 7 of 73
TBarCode User Manual
2 Disclaimer
The actual version of this product (document) is available as is. TEC-IT declines all warranties
which go beyond applicable rights. The licensee (or reader) bears all risks that might take place
during the use of the system (the documentation). TEC-IT and its contractual partner cannot be
penalized for direct and indirect damages or losses (this includes non-restrictive, damages through
loss of revenues, constriction in the exercise of business, loss of business information or any kind of
commercial loss), which is caused by use or inability to use the product (documentation), although
the possibility of such damage was pointed out by TEC-IT.
We reserve all rights to this document and the information contained therein. Reproduction,
use or disclosure to third parties without express authority is strictly forbidden.
Fr dieses Dokument und den darin dargestellten Gegenstand behalten wir uns alle Rechte
vor. Vervielfltigung, Bekanntgabe an Dritte oder Verwendung auerhalb des vereinbarten
Zweckes sind nicht gestattet.
1998-2013
TEC-IT Datenverarbeitung GmbH
Hans-Wagner-Str. 6
A-4400 Austria
t.: +43 (0)7252 72720
f.: +43 (0)7252 72720 77
http://www.tec-it.com
Page 8 of 73
TBarCode User Manual
3 Introduction
3.1 What is TBarCode SDK?
TBarCode SDK is a set of professional tools for the generation of barcodes. More than 100
different symbologies (linear barcodes, 2D barcodes and stacked barcode variants) can be printed
or exported as graphics files. All industry formats are supported. The barcodes can be generated in
the highest possible resolution and quality.
TBarCode SDK is available in several versions for different operating systems, applications and
programming environments. The following versions are included in this setup:
TBarCode OCX A Microsoft
ActiveX
ActiveX
Microsoft Access
Microsoft InfoPath
Microsoft SharePoint
Microsoft Visio
Microsoft Visual Basic
Microsoft Visual C++
Microsoft ASP (VBScript
)
Microsoft Internet Explorer
Microsoft Visual FoxPro
Microsoft Dynamics Nav
Navision Financials
PHP 4.x, PHP 5.x
Borland C++ Builder
Borland Delphi
Borland Quick Reports
Sybase
PowerBuilder
Crystal Reports
8
ActiveReports (Data Dynamics)
IBM
Object REXX
Alpha Five Database (XBasic)
ASNA Visual RPG
And a lot of more applications
3.4 Restrictions of the Demo Version
In the demo version the barcodes will be drawn with a demo-hint. That means that the word Demo
or the phrase www.tec-it.com is drawn partially over the barcode. The demo-hint does not influ-
ence the readability of the barcode in a negative way.
In special cases (e.g. very small or high-resolution barcodes) you may want to test the pro-
duct without restrictions. To obtain a temporary license key contact [email protected].
For enabling the full-featured version (without the demo hints) you can obtain a license key
from TEC-IT (http://www.tec-it.com/order/).
For more information on licensing TBarCode, please refer to chapter 11.
3.5 Important Security Notice
Version 8.0 and newer versions include a fix which was implemented in response to a
security leak (a malicious web-site in conjunction with Internet Explorer and an installed
TBarCode ActiveX). Up to now no real threat is known, but it is strongly recommended to
update all TBarCode installations as soon as possible.
1
For applications not supporting ActiveX technology you may use other TEC-IT Barcode Tools (e.g. Barcode Studio).
Page 10 of 73
TBarCode User Manual
4 Installation
4.1 Requirements
The following operating systems are supported:
Microsoft Windows XP
Microsoft Windows Server 2003
Microsoft Windows Vista
Microsoft Windows Server 2008
Microsoft Windows 7
Microsoft Windows 8
Microsoft Windows Server 2012
TBarCode OCX was tested with the following Microsoft Office versions (in particular with Microsoft
Word, Excel, Access, Visio and InfoPath):
Microsoft Office 2003
Microsoft Office 2007
Microsoft Office 2010 (32-bit and 64-bit)
Microsoft Office 2012 (32-bit and 64-bit)
4.2 Download and Setup
Download TBarCode SDK from http://www.tec-it.com/Download TBarCode SDK and execute
the setup application. Depending on your selection one or more of the following components are
installed along with documentations and sample applications:
TBarCode OCX
A barcode ActiveX control for Microsoft Office users and for software developers. User
manual and API reference are included in the setup.
TBarCode Library
For software developers. Developer manual and API reference are included in the setup.
TBarCode .NET
For .NET developers. Developer manual and API reference are included in the setup.
Administrative rights are required to install TBarCode SDK.
TBarCode OCX is an ActiveX control. ActiveX controls must be registered within the Micro-
soft Windows operating system before they can be used. This registration is executed auto-
matically by the setup application. On demand you can register the OCX file manually with
the command line tool regsvr32.exe.
Page 11 of 73
TBarCode User Manual
5 Insert Barcode into Microsoft Office
5.1 General
This and the following chapters will explain how to use TBarCode in Microsoft Office applications.
For the following three products the usage of the TBarCode control is basically the same (see
TBarCode QuickStart manual):
Microsoft Word 2003 (and earlier versions)
Microsoft Excel 2003 (and earlier versions)
Microsoft Access 2003 (and earlier versions)
In Office 2007 / Office 2010 / Office 2013 inserting the TBarCode control has slightly changed. How
to do this is explained in the sections 5.3, 5.4:
Insert Barcode in Microsoft Word 2007/2010
Insert Barcode in Microsoft Excel 2007/2010
Insert Barcode in Microsoft Access 2007/2010
Finally, the usage of TBarCode in Microsoft InfoPath is explained in chapter 9.
5.2 Microsoft Office 2003
5.2.1 Insert Barcode in Word 2003 using the Menu
Figure 1: Insert Barcode using the Menu (Microsoft Word)
Application How to insert
Word Select Insert Object from the menu (O).
O
O
O
Page 12 of 73
TBarCode User Manual
Excel
Select TBarCode11 from the list of object types O and confirm with OK.
A new barcode object will be inserted (O).
Access Open your report (or form) in the design mode (see 6.2).
Select Insert ActiveX Control from the menu.
Select TBarCode11 from the list of object types and confirm with OK.
A new barcode object will be inserted.
InfoPath Please refer to section 9.2.3.
5.2.2 Insert Barcode in Word 2003 using the Control Toolbox
Figure 2: Insert Barcode using the Control Toolbox (Microsoft Word)
Please note: In Word and Excel the toolbar is named Control Toolbox, in Access just Tool-
box.
Application How to insert
Word If the Control Toolbox O is not visible, please open it as follows:
- right-click on one of the visible toolbars and select Control Toolbox or
- select View Toolbars Control Toolbox from the menu.
Click on the More Controls iconO. A list with available controls will
appear (seeO).
Select the entry TBarCode11.
Now move the mouse cursor to the desired position and click the left
mouse button. The TBarCode control O will be inserted.
Excel
Access
InfoPath Please refer to section 9.2.3.
5.3 Microsoft Office 2007
5.3.1 Insert Barcode in Word 2007
You can also insert a barcode as follows:
Click the Office button on the top left of the Word window and then select Word Options.
O
O
O
O
Page 13 of 73
TBarCode User Manual
Enable the Developer tab in the Ribbon:
Then go to the Developer tab and click Legacy Tools More Controls. Select TBarCode11
from the list of ActiveX Controls and confirm with OK. The barcode will be inserted at the
current cursor position.
5.3.2 Insert Barcode in Excel 2007
Enable the Developer tab in the Ribbon (Excel Options)
Figure 3: Excel 2007: Excel Options - Show Developer tab
Go to the Developer tab and select Insert More Controls
Page 14 of 73
TBarCode User Manual
Figure 4: Excel 2007: More Controls
Figure 5: Excel 2007: Select TBarCode11
Select TBarCode11 from the list of object types and confirm with OK.
Now move the mouse cursor to the desired position and draw a rectangle to the position
where the bar code should be. A TBarCode control will be inserted.
Please note: In Word 2007 and Excel 2007 the Control Toolbox can be found in the
Developer tab, in Access 2007 inside the Design Tab.
For inserting barcodes in Microsoft Excel 2003 use the TBarCode QuickStart manual provided in
the Windows start menu.
5.3.3 Insert Barcode in Access 2007
Open a new report in Design View.
Click the ActiveX Controls symbol in the Design tab Controls section.
Page 15 of 73
TBarCode User Manual
Select TBarCode11 from the list of ActiveX Controls and confirm with OK.
A TBarCode control will be inserted.
For adjusting the barcode properties right click the bar code control and select TBarCode11
Object Properties from the context menu (see also 6.3).
For inserting barcodes in Microsoft Access 2003 use the TBarCode QuickStart manual provided in
the Windows start menu.
5.4 Microsoft Office 2010 / Office 2013
5.4.1 Insert Barcode in Word 2010 / Word 2013
Select File Options.
Go to the page Customize Ribbon and check the list entry Developer.
Page 16 of 73
TBarCode User Manual
Then go to the Developer tab and click Legacy Tools More Controls. Select TBarCode11
from the list of ActiveX Controls and confirm with OK. The barcode will be inserted at the
current cursor position.
5.4.2 Insert Barcode in Excel 2010 / Excel 2013
Enable the Developer tab in the Ribbon (File Options Customize Ribbon)
Figure 6: Excel 2010: Excel Options - Show Developer tab
Page 17 of 73
TBarCode User Manual
Go to the Developer tab and select Insert More Controls
Figure 7: Excel 2010: More Controls
Figure 8: Excel 2010: Select TBarCode11
Select TBarCode11 from the list of object types and confirm with OK.
Now move the mouse cursor to the desired position and draw a rectangle to the position
where the bar code should be. A TBarCode control will be inserted.
Please note: In Word 2010 and Excel 2010 the Control Toolbox can be found in the
Developer tab, in Access 2010 inside the Design Tab.
5.4.3 Insert Barcode in Access 2010 / Access 2013
Open a new report in Design View (Create Report Design).
Click the ActiveX Controls symbol in the section Design Controls.
Page 18 of 73
TBarCode User Manual
Select TBarCode11 from the list of ActiveX Controls and confirm with OK.
A TBarCode control will be inserted.
For adjusting the barcode properties right click the bar code control and select TBarCode11
Object Properties from the context menu (see also 6.3).
5.5 Insert Barcode per Code
Using VBA (Visual Basic for Applications) you can insert the barcode per code. For more informa-
tion, please refer to section 8.3.
Page 19 of 73
TBarCode User Manual
6 Adjust Barcode Parameters
6.1 General
TBarCode offers the possibility to change all barcode related settings (barcode type, barcode data,
check digit method, barcode appearance, etc.) to your needs. There are three different methods for
changing barcode parameters. These methods are explained in section 6.3.
Please keep in mind:
In order to select, move, resize, edit and program the TBarCode control you have to be in
Design Mode. When leaving the design mode, the control is locked and cannot be edited.
6.2 Activate the Design Mode
Application How to activate the Design Mode
Word See section 6.2.1.
Excel
Access See section 6.2.2.
InfoPath See section 9.2.
6.2.1 Microsoft Word or Excel
Switch to Design Mode by clicking on the
triangle symbol O in the Developer Ribbon.
If this ribbon is not visible, please refer to
chapter 5.
6.2.2 Microsoft Access
You can activate the Design Mode when opening
the form (or report):
Open the desired form (or report) by
double-click and choose Design View O
from the menu.
or
Right-click on the form/report name and
select Design View (O) from the pop-up
menu.
O
O
O
Page 20 of 73
TBarCode User Manual
6.3 Barcode Parameters
The barcode parameters can be adjusted either by using the Property Pages, the Property List or
VBA Code.
Except for some special settings (which are available in the property list or via code only) TEC-IT
recommends the use of the property pages. The property pages are designed for easy adjustment
of the TBarCode properties.
6.3.1 Property Pages
Figure 9: Property Pages (Microsoft Word)
Application How to open the Property Pages
Word Make sure that you are in Design Mode (see section 6.2).
Right-click on the TBarCode object O.
Select TBarCode11 Object Properties from the pop-up menu (O).
The property pages O will appear.
Excel
Access
InfoPath Make sure that you are in Design Mode.
Right-click on the TBarCode object and select TBarCode11
Properties
For detailed information about the property pages and about the available settings, please
refer to chapter 10.
O
O
O
Page 21 of 73
TBarCode User Manual
6.3.2 Property List
Figure 10: Property List (Microsoft Word)
Application How to open the Property List
Word Make sure that you are in Design Mode (see section 6.2).
Right-click on the TBarCode object O and select Properties (O) from
the pop-up menu.
As an alternative you can also select the barcode and click on the
Properties icon O in the Control Toolbox.
The property pages O will appear.
Excel
Access
InfoPath No property list available.
Some properties in particular data binding (Linked Cell in Excel or Control Source in
Access) are available in the property list only. For more information on data binding,
please refer to section 7.3.
6.3.3 Adjust Parameters per Code
Using VBA (Visual Basic for Applications) you can adjust the barcode parameters per code. For
more information, please refer to section 8.4.
O
O
O
O
Page 22 of 73
TBarCode User Manual
7 Set Barcode Data (Data Binding)
7.1 General
The barcode data can be provided in three ways:
Manually
Via Data Binding
Via VBA (Visual Basic for Applications)
7.2 Specify Data Manually
You can specify the barcode data in the property pages or the property list:
7.2.1 Property Pages
Open the property pages (see section
6.3.1).
Select the Barcode tab.
Enter the desired text in O.
7.2.2 Property List
Open the property list (see
section 6.3.2).
Select the Text property.
Enter the desired text in O.
7.3 Data Binding
Some Microsoft Office applications provide the option to bind the content of a specified data field to
the TBarCode control (data binding). This means that the barcode control will use the content of
the data field as barcode data. Whenever you change the content of the data field the barcode
symbol will be updated as well.
Application Data Binding
Word Not available.
Excel See section 7.3.1.
Access See section 7.3.2.
InfoPath See sections 9.2.2 to 9.2.4.
7.3.1 Microsoft Excel
Data binding can be enabled via the property LinkedCell:
O
O
Page 23 of 73
TBarCode User Manual
Make sure that you are in Design Mode (see section 6.2).
Select the TBarCode object O.
Then click on the Properties icon O in the Control Toolbox.
The property list O will appear.
Select the property LinkedCell and enter the name of the cell that you want to bind to the
TBarCode control (see O). In this sample B4 O is used.
Figure 11: Data Binding in Microsoft Excel
7.3.2 Microsoft Access
The barcode control is likely to be used in reports and forms. Barcode data can be added manually
or automatically by binding it to a table column. In the second case the barcode changes according
to the data record which is currently being displayed.
In order to bind the barcode to a data source, please execute the following steps:
Right-click on the TBarCode object O.
Select Properties from the pop-up menu O.
Select the Data tab O.
For the property Control Source select the data field (or the query) that serves as source for
the barcode content (see O).
This step is only possible if you have previously defined a data-source for the report/form.
You can do this by opening the properties dialog for the entire report.
O
O
O
O
O
Page 24 of 73
TBarCode User Manual
Figure 12: Data Binding in Microsoft Access
Please ensure that the barcode type corresponds with the data that you want to encode. If
the source string contains characters which cannot be encoded with the selected symbolo-
gy, an error message will be displayed instead of the barcode.
Hint: You can also enter a fixed value or an expression as data source.
Example: The expression "=[ArticleNo]+[Price]" could be used for concatenating the data
fields ArticleNo and Price for the EAN13 P5.
7.3.3 Specify Data via VBA Code
Using VBA (Visual Basic for Applications) you can specify the barcode data per code. For more
information, please refer to section 8.4.
O
O
O
O
Page 25 of 73
TBarCode User Manual
8 Programming TBarCode (VBA)
8.1 General
TBarCode can be used in Microsoft Office and all other applications (e.g. development environ-
ments) which support ActiveX controls. The TBarCode object can be inserted as part of any form,
document, report or spreadsheet, and it can be created as (invisible) instance which is used for
printing only.
This chapter gives basic introductions on how to use the TBarCode OCX with VBA. For additional
information and sample applications check out Appendix A.
8.2 Microsoft Office and VBA
In Microsoft Office all barcode properties (barcode type, barcode data, barcode size, etc.) and
methods can be accessed directly via VBA code.
Upon insertion the TBarCode control is usually named
TBarCode11n (where n is a consecutive number).
This name can be used for addressing the TBarCode
control in the VBA code.
You can view (and also edit) this name by right-clicking
on the respective barcode symbol. Then select
Properties from the pop-up menu. The name of the
control is shown in O.
To edit and to program the TBarCode control the design mode is required. For accessing
the control in your VBA code use the name as assigned in O.
Hint: If you double-click the control in design mode the VBA editor is opened (not shown).
For a list of available properties and methods and for a detailed description of the TBarCode
programming interface, please refer to the developer documentation (see Appendix A).
8.3 Insert Barcode
The following code samples can be used to create and to insert a barcode object in Office applica-
tions. You can execute the code with a macro or you can trigger it with a control event (e.g. button-
click).
Application How to Insert Barcode
Word See section 8.3.1.
Excel See section 8.3.2.
Access No example available.
InfoPath No VBA supported.
O
Page 26 of 73
TBarCode User Manual
8.3.1 Microsoft Word
This sample shows how to insert a Code-128 symbol at the actual cursor position. The barcode
data will be set to 1234567890.
Dim oShape As InlineShape
Dim oTBC As Object
' Insert a shape containing a barcode object at the actual cursor position.
Set oShape = Selection.InlineShapes.AddOLEObject(ClassType:="TBarCode11.TBarCode11.1", _
FileName:="", LinkToFile:=False, DisplayAsIcon:=False)
' Activate the barcode object.
oShape.OLEFormat.Activate
' Adjust the size of the barcode by adjusting the shape.
' (The barcode object extends to the size of the shape by default).
oShape.Width = 200
oShape.Height = 100
' Get the barcode object within the shape.
Set oTBC = oShape.OLEFormat.Object
' Adjust the barcode object properties (barcode type, barcode data...)
oTBC.BarCode = 20 ' select Code-128 (TBarCode11Lib.eBC_Code128)
oTBC.Text = "1234567890" ' set barcode data
This samples inserts TBarCode as OLE Object. To insert the barcode as OLE Control you
have to use the command AddOLEControl.
8.3.2 Microsoft Excel
This sample shows how to insert a Code-128 symbol in cell C3 on the current spreadsheet. The
barcode data will be set to 123456 and the size of the human readable text to 8 points.
Dim TargetCell As Variant ' The cell, in which you want to insert the barcode
Dim CellHeight As Variant ' Height of the target cell
Dim CellWidth As Variant ' Width of the target cell
Dim CellTop As Variant ' Top coordinates of the target cell
Dim CellLeft As Variant ' Left coordinates of the target cell
Dim BCObject As OLEObject ' The TBarCode container object
TargetCell = "C3"
' Make sure that the cell height has 30 pixels minimum
If (Range(TargetCell).RowHeight < 30) Then
Range(TargetCell).RowHeight = 30
End If
' Get target cell dimensions
CellHeight = Range(TargetCell).Height
CellWidth = Range(TargetCell).Width
CellTop = Range(TargetCell).Top
CellLeft = Range(TargetCell).Left
' Insert barcode object into selected cell
Set BCObject = ActiveSheet.OLEObjects.Add(ClassType:="TBarCode11.TBarCode11.1", _
Left:=CellLeft, _
Top:=CellTop, _
Width:=CellWidth, _
Height:=CellHeight)
' Adjust the barcode object properties (barcode type, barcode data...)
BCObject.Object.BarCode = 20 ' select Code-128 (TBarCode11Lib.eBC_Code128)
BCObject.Object.Text = "123456" ' set barcode data
BCObject.Object.FontSize = 8 ' set size of human readable text
Via VBA code the barcode can only be inserted as OLE Object (not as OLE Control).
Page 27 of 73
TBarCode User Manual
8.4 Adjust Barcode Parameters and Barcode Data
Application How to Adjust Barcode Parameters
Word See section 8.4.1.
Excel
Access See section 8.4.2.
InfoPath No VBA supported.
8.4.1 Microsoft Word or Excel
The example below shows basic TBarCode method calls. The barcode object is identified by the
name TBarCode111 (see section 8.2).
TBarCode111.BarCode = TBarCode11Lib.eBC_DataMatrix ' select the barcode type Data Matrix
TBarCode111.Text = "Hello World!" ' set the barcode data
8.4.2 Microsoft Access
To access the barcode properties and methods you have to use the "object" interface.
The example below sets the barcode data (text property) of TBarCode. The barcode object is
identified by the name TBarCode111 (see section 8.2)
TBarCode111.Object.Text = "1234567890" ' set the barcode data
8.5 License TBarCode
Call the method LicenseMe() from within your application. Do this before barcodes are generated or
printed. Before calling this function the TBarCode OCX control must be instantiated, otherwise an
error message will be received.
To license TBarCode use the following VBA call:
TBarCode111.LicenseMe "Licensee", eLicKindDeveloper, 1, "LicenseKey", eLicProd1D
Page 28 of 73
TBarCode User Manual
9 Barcodes in Microsoft InfoPath
9.1 General
In order to use TBarCode in Microsoft InfoPath you have to perform the following steps:
Open your form in Design Mode (see section 9.2).
Add TBarCode to the Custom Controls (see section 9.2.2). This step is required only once.
It enables Microsoft InfoPath to use TBarCode.
During this step you have to specify the data source type for TBarCode. You have to decide
whether you want to encode:
- the content of single data fields or
- the underlying InfoPath XML document (or parts of the XML document).
Insert the barcode (see section 9.2.3).
Change the data binding (optional) see section 9.2.4.
Adjust barcode parameters (see section 9.2.5).
9.2 InfoPath 2003
9.2.1 Activate the Design Mode
Please note: you have to be in Design Mode to add barcodes to a form design, to select, move,
resize and to adjust the barcode parameters.
You can activate the Design Mode by clicking on
the triangle symbol O in the Standard toolbar.
The design view will be opened in a separate
window.
9.2.2 Add TBarCode to the Custom Controls
To add TBarCode to the Custom Controls, please follow the steps below:
Make sure that you are in Design Mode (see 9.2).
Open the Task Pane O. Therefore select View Task Pane from the menu (see O).
O
Page 29 of 73
TBarCode User Manual
Figure 13: Add TBarCode to the Custom Controls in Microsoft InfoPath 2003 (1)
In the Task Pane click on Controls O.
Then click on Add or Remove Custom Controls at the bottom of the updated pane view
(see O). A dialog will appear. This dialog shows a list of installed custom controls.
Click the Add button O to open the Add Custom Control Wizard.
Locate and select TBarCode11 in list O, then click Next.
On the following wizard pages you have to specify the data source type for TBarCode. This
selection determines, how the barcode control can be used in InfoPath later on.
For more information, please see below.
O
O
O
Page 30 of 73
TBarCode User Manual
Figure 14: Add TBarCode to the Custom Controls in Microsoft InfoPath 2003 (2)
9.2.2.1 Specify Data Source Type
In the Add Custom Control Wizard you have to decide which kind of data you want to encode:
If you plan to encode single data fields (e.g. the content of an input box), please follow the
instructions in section 9.2.2.1.1.
If you plan to encode the underlying InfoPath XML document (or parts of the XML docu-
ment), please follow the instructions in section 9.2.2.1.2.
O
O
O
Page 31 of 73
TBarCode User Manual
9.2.2.1.1 Encode Single Data Fields
Perform these steps if you plan to encode single data fields:
Select the binding property
Text (see C).
Click Next.
On the next page (Specify and
Enable or Disable Property)
select the entry Enabled.
Click Next.
In C select Field (element or
attribute).
Then select all data types (by
clicking each single line in C).
Leave the default data type C
as Text (string).
Then click Finish.
9.2.2.1.2 Encode Complete or Partial Form Content (XML Data)
Perform these steps if you plan to encode XML data:
Select the binding property
Value (see C).
Click Next.
On the next page (Specify and
Enable or Disable Property)
select the entry Enabled.
Click Next.
C
C
C
C
C
Page 32 of 73
TBarCode User Manual
In C select Field or Group
(any data type).
Then click Finish.
9.2.2.2 Finish Adding the Custom Control
After you have completed the wizard, the TBarCode control will be listed in O.
Click OK (O).
TBarCode11 appears in the list of available controls (O).
Figure 15: Add TBarCode to the Custom Controls in Microsoft InfoPath 2003 (3)
O
O
C
O
Page 33 of 73
TBarCode User Manual
9.2.3 Insert Barcode
After you added TBarCode OCX to the Custom Controls in Microsoft InfoPath (see section 9.2.2)
you can add a barcode to your document by performing the following steps:
Place the cursor where you want to insert the barcode and click on the TBarCode control in
the Task Pane (O).
Before the barcode is actually inserted a dialog named TBarCode11 Binding appears.
Select the required field ( ) or group ( ) as data source (see O). The content of the
selected entry will be encoded as barcode.
Please note:
If you have selected single data fields as data source type (see 9.2.2.1.1) you can select
fields only (no groups!).
Press OK. A new barcode object will be inserted.
Figure 16: Insert TBarCode in a Microsoft InfoPath 2003 Document
9.2.4 Change Binding
To change the binding which was specified upon insertion
of TBarCode (see Figure 16, O), right-click on the bar-
code and select Change Binding from the pop-up menu.
The TBarCode11 Binding dialog appears.
Select a field (or group) from the tree view and confirm
with OK.
O
O
Page 34 of 73
TBarCode User Manual
9.2.5 Adjust Barcode Parameters
The barcode parameters can be adjusted using the Property Pages (a Property List is not avail-
able). Please open the property pages as follows:
Right-click on the barcode object O.
Select TBarCode11 Properties from the pop-up menu (O).
The property pages O will appear.
For detailed information about the property pages and about the available settings, please
refer to chapter 10.
Figure 17: Adjust Barcode Properties in Microsoft InfoPath 2003
9.3 InfoPath 2010 / InfoPath 2013
Open InfoPath Designer in order to perform the steps described below. Open a form that can be
filled with InfoPath Filler.
O
O O
Page 35 of 73
TBarCode User Manual
9.3.1 Add TBarCode to the Custom Controls
Figure 18: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (1)
To add TBarCode to the Custom Controls, please follow the steps below:
Click on Controls Add or Remove Custom Controls (O). A dialog will appear, which
shows a list of installed custom controls.
Click the Add button O to open the Add Custom Control Wizard.
In Dialog Control Type choose ActiveX Control (O), click Next.
Locate and select TBarCode11 in list O, then click Next.
Figure 19: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (2)
O
O
Page 36 of 73
TBarCode User Manual
Figure 20: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (3)
Choose whether you want to use a .cab file, click Next.
On the following wizard pages you have to specify the data source type for TBarCode. This
selection determines, how the barcode control can be used in InfoPath later on.
For more information, please see below.
9.3.1.1 Specify Data Source Type
In the Add Custom Control Wizard you have to decide which kind of data you want to encode:
If you plan to encode single data fields (e.g. the content of an input box), please follow the
instructions in section 9.3.1.1.1.
If you plan to encode the underlying InfoPath XML document (or parts of the XML docu-
ment), please follow the instructions in section 9.3.1.1.2.
9.3.1.1.1 Encode Single Data Fields
Perform these steps if you plan to encode single data fields:
Select the binding property
Text (see C).
Click Next.
On the next page (Specify and
Enable or Disable Property)
select the entry Enabled.
Click Next.
O
O
C
Page 37 of 73
TBarCode User Manual
In C select Field (element or
attribute).
Then select all data types (by
clicking each single line in C).
Leave the default data type C
as Text (string).
Then click Finish.
9.3.1.1.2 Encode Complete or Partial Form Content (XML Data)
Perform these steps if you plan to encode XML data:
Select the binding property
Value (see C).
Click Next.
On the next page (Specify and
Enable or Disable Property)
select the entry Enabled.
Click Next.
C
C
C
C
Page 38 of 73
TBarCode User Manual
In C select Field or Group
(any data type).
Then click Finish.
9.3.1.2 Finish Adding the Custom Control
After you have completed the wizard, the TBarCode control will be listed in O.
Click OK (O).
TBarCode11 appears in the list of available controls (O).
Figure 21: Add TBarCode to the Custom Controls in Microsoft InfoPath 2010 (4)
C
O
O
O
Page 39 of 73
TBarCode User Manual
9.3.2 Insert Barcode
After you added TBarCode OCX to the Custom Controls in Microsoft InfoPath (see section 9.3.1)
you can add a barcode to your document by performing the following steps:
Place the cursor where you want to insert the barcode and click on the TBarCode control in
the Controls Pane (O).
Before the barcode is actually inserted a dialog named TBarCode11 Binding appears.
Select the required field ( ) or group ( ) as data source (see O). The content of the
selected entry will be encoded as barcode.
Please note:
If you have selected single data fields as data source type (see 9.3.1.1.1) you can select
fields only (no groups!).
Press OK. A new barcode object will be inserted.
Figure 22: Insert TBarCode in a Microsoft InfoPath 2010 Document
9.3.3 Change Binding
To change the binding which was specified upon insertion
of TBarCode (see Figure 22, O), right-click on the bar-
code and select Change Binding from the pop-up menu.
The TBarCode11 Binding dialog appears.
Select a field (or group) from the tree view and confirm
with OK.
O
O
Page 40 of 73
TBarCode User Manual
9.3.4 Adjust Barcode Parameters
The barcode parameters can be adjusted using the Property Pages (a Property List is not avail-
able). Please open the property pages as follows:
Right-click on the barcode object O.
Select TBarCode11 Properties from the pop-up menu (O).
The property pages O will appear.
For detailed information about the property pages and about the available settings, please
refer to chapter 10.
Figure 23: Adjust Barcode Properties in Microsoft InfoPath 2010
O
O
O
Page 41 of 73
TBarCode User Manual
10 The Property Pages
10.1 Introduction
The property pages of TBarCode (and all settings which can be adjusted within the property pages)
are described in detail below. See section 6.3.1 about opening the property pages.
10.2 Property Page Barcode
The first property page is the Barcode tab. It contains basic barcode adjustments like Barcode
Type (Symbology), Barcode Data, etc. For most applications adjusting these settings will be suffi-
cient. Additional parameters can be changed on demand (button Adjust, tabs Appearance,
Multiple Barcodes, Font and Color).
Figure 24: Property Page Barcode
10.2.1 Barcode Type (Symbology)
Select the barcode type that you want to create. Common linear barcode types are UPC (USA),
EAN (Europe), Code 128, Code 39, 2 of 5 Interleaved. Common 2D barcode types are Data Matrix,
PDF417, and QR-Code.
For information on the different barcode types (symbologies), please refer to the Barcode Refe-
rence (see Appendix A).
10.2.2 Button Adjust
The Adjust button will open a barcode specific properties dialog (for the selected barcode type /
symbology). This button is available for 2D barcodes and for composite symbologies only!
Barcode specific settings are described in sections 10.6 to 10.16.
Page 42 of 73
TBarCode User Manual
10.2.3 Barcode Data
The content of this textbox will be encoded as barcode. Depending on the selected barcode type
you can encode different kinds of data:
Some barcodes can be used to encode digits only.
Others allow the usage of digits and a limited number of special characters like / or *.
Again, others can be used to encode arbitrary alphanumeric data.
For more information on barcode types and on codeable data, please refer to the Barcode Refe-
rence (see Appendix A). The number of letters that the data currently contains is shown below
Barcode Data.
If the Barcode Data cannot be represented with the selected symbology, a big "X" is drawn
instead of the barcode. Additionally an error code and a short error description are
displayed.
10.2.4 Encoding Mode
The Encoding Mode specifies how the input data should be interpreted.
Data is always passed as UNICODE stream to TBarCode OCX. As UNICODE characters
always consist of 2 bytes and most of the barcode types are only able to encode one byte
per character, it is not always clear how the input data should be interpreted. So we give you
the possibility to decide yourself.
Per default the input data is converted to the selected Code Page (see below). If other kinds
of interpretations are needed, you have to change this property.
You have following possibilities:
Value Description
Convert to Code Page Converts the input data to the code page, which is selected in the
property Code Page. (default)
No conversion (Lower bytes only) Considers only the lower bytes of the input characters, the higher
bytes are ignored.
Bytestream (Lower before higher byte) The data is passed as it is. No conversion is done. Both bytes are
considered. The lower byte is passed before the higher byte.
Bytestream Reverse (Higher before lower byte) Consider both bytes but change the order of lower and higher byte.
That means the higher byte is encoded before the lower byte.
As Hexadecimal Characters Converts the input data, which must consist of hexadecimal values,
to binary data. Pairs of hexadecimal values are converted to
according byte values.
Table 1: Compression
10.2.5 Code page
The code page is related to the property Encoding Mode. It is only considered if the encoding mode
is set to Convert to Code Page. You can choose among several pre-defined code pages (e.g. ANSI,
ISO 8559-1 Latin I, UTF-8, Shift-JIS) or add the ID of a custom code page.
10.2.6 Format/Subset
The format string is used for formatting the utilizable data of the barcode prior to encoding it.
The format string is built upon placeholders, which can be combined with constant data characters
to build the final data string. Certain control characters make it possible to change the Subsets for
Code 128, EAN 128 and UCC 128 or to define the desired start/stop character of CODABAR.
For detailed information on format strings, please refer to the Barcode Reference (see Appendix A).
Page 43 of 73
TBarCode User Manual
10.2.7 Check Digit
Here you can change the calculation method of the check digit. Whether you need a check digit or
not depends on your application and on the selected barcode type.
By default the appropriate check digit is selected automatically (entry Default), which means that
the check digit is calculated according to the barcode specification. Any other suitable calculation
method can be selected via the combo box.
Why check digits? In order to guarantee that the barcode data is read properly, a check digit is
inserted (usually) at the end of the utilizable data. A comparison of the barcode content and the
check digit informs the scanning device about the correctness of the scan. It causes the device
to accept or to reject (repeat) the scan. The check digit calculation method is standardized for
certain common barcodes.
A change of the check digit method is admissible for special applications or for barcodes
with selectable check digit methods only.
For some barcodes the standard is no check digit. However, using a check digit is recom-
mended (e.g. LOGMARS or Code39). You can use the combo box for enabling check digit
calculation.
10.2.7.1 Check Digit Override
Some barcodes with a predefined number of utilizable data characters (like all EAN, UPC, Postnet
and RSS-14 codes) include a check digit on a fixed position in the barcode data.
Example:
The EAN13 code permits 12 utilizable digits plus 1 check digit at the
last position (O).
If you enter 12 digits as barcode data this last digit (the check digit) will
be calculated and inserted automatically. However, you can also enter
all 13 digits and therefore override the calculated check digit.
Note: If the check digit is supplied within the barcode data, the internal check digit calcula-
tion will be switched off.
TBarCode does not check the correctness of the check digit supplied by your application.
Check digit override was primarily designed for use with article databases, in which the check digit
is already included in the article numbers. However, the check digit override can also be used to
calculate and to provide your own check digits (usually by program code) or to use all possible
digits for utilizable data (in non-standard applications).
Under normal circumstances you should not use this feature we recommend the automatic cal-
culation of check digits by TBarCode.
10.2.8 Compression
To increment the capacity of barcodes you can compress the Barcode Data. This means that the
data provided by the user will be compressed before it is encoded as barcode.
The compression is only available for barcodes which allow the encoding of arbitrary binary data
and a variable length of input data. By default the compression is set to None.
O
Page 44 of 73
TBarCode User Manual
Value Description
None The barcode data will not be compressed. It will be stored in the barcode as is (default).
Deflate (RFC 1951) The barcode data will be compressed using the Deflate algorithm.
We recommend using this algorithm if data compression is required.
GZip (RFC 1952) The barcode data will be compressed using the GNU zip algorithm.
ZLib (RFC 1950) The barcode data will be compressed using the ZLib algorithm.
Table 2: Compression
Note: When reading compressed barcode data, you will have to decompress it in order to
restore the original input data. Decompression can be done through the TBarCode InForm
software decoder (which restores the uncompressed data automatically). Or you can use
any third party software library for decompression.
10.2.9 Suppress Error Messages
If the barcode data contains invalid characters (e.g. letters for code 2 of 5 Interleaved), or if the
wrong number of input characters is provided, an error message is displayed (instead of the bar-
code).
If Suppress error message is enabled, this error message will be suppressed. Only blank space is
displayed instead of any error information.
10.2.10 Translate Escape Sequences
Selects whether escape sequences (like \n) are translated or not (default: no).
The use of escape sequences is useful if you need to encode control characters such as Carriage
Return or FNC1. For encoding binary data (e.g. Data Matrix) this feature may be very useful as well.
For more information on escape sequences, please refer to the Barcode Reference (see Appendix
A).
10.2.11 Button License
Opens the license dialog. For more information on how to license the product, please refer to
chapter 11.
10.2.12 Button About
Opens the about dialog. The About dialog shows the product version and copyright information to
the user.
Page 45 of 73
TBarCode User Manual
10.3 Property Page Appearance
Figure 25: Property Page Appearance
10.3.1 General
10.3.1.1 Orientation
Specifies the orientation of the barcode. Selectable values are 0, 90, 180 and 270. The barcode
is rotated counter-clockwise.
Please note: Some fonts (for the human readable text) do not support rotation (e.g. some
bitmap fonts). If rotation is required we recommend selecting a TrueType
font.
10.3.1.2 Print Ratio
The print ratio is the relationship between the bar-widths and the space-widths of a barcode.
Another term for print ratio is bar width ratio or bar/space width ratio.
By default there is no need to change the print ratio, unless needed for any special appli-
cation. Please consider: Barcodes may become unreadable when manipulating this value!
The print ratio must be specified in a specific format. This format depends on the number of
different bar- and space-widths used in the selected symbology.
Example: If a barcode element has 4 different bar widths and 4 different space widths, the print ratio
looks like this (Code 128): 1:2:3:4:1:2:3:4. In the first part ("1:2:3:4") the width ratio of the bars is
set, in the second part the relation of the spaces is set (in our case, they are the same). The small-
est bar is "1" wide, the next larger is "2" wide (thus twice as wide as the smaller bar) and so on.
For more information on print ratios, please refer to the Barcode Reference (see Appendix A).
10.3.1.3 Back Style
The barcode can be painted with transparent background (default, background shines through) or
with opaque background (background is drawn in the adjusted color).
Page 46 of 73
TBarCode User Manual
If the back style is set to Transparent, the adjusted background-color will be ignored.
10.3.1.4 Bar Width Reduction [%]
Sets the bar width reduction in percent.
When printing on inkjet printers, the ink that is absorbed by the paper tends to diffuse. Setting the
bar width reduction allows you to work against this spreading of ink. But also for laser printers with
high toner saturation this property is useful.
The bar width reduction can be specified in percent of the module width. Thus when set to 20 all
bars will be narrowed by 20 percent of the module width.
Be careful: Setting the bar width reduction to more than 50 percent might leave the bar code
unreadable! When using this feature we recommend you to do some test-scans to make
sure that the bar code can be scanned correctly. A common value to start with is 15%.
10.3.1.5 Bearer Bars
Usually, bearer bars are used with the ITF-14 (or sometimes with the Interleaved 2 of 5) or the DPD
symbology only. The bearer bars were introduced to equalize the pressure exerted by the printing
plate over the entire surface of soft materials. They also enhance the reading reliability by helping to
reduce the probability of misreads by skewed scanning beams.
For some types (like UPC and EAN) the bearer bars must be set to None.
Value Description
None Do not print bearer bars.
Top and Bottom Print bearer bars at the top and the bottom of the symbol.
Rectangle Print bearer bars on all 4 sides of the symbol.
For rectangular bearer bars, the quiet zone (see section 10.3.1.7) must be at least 12
times the module width. Otherwise no bearer bars will be printed.
Top Print bearer bars at the top of the symbol.
Bottom Print bearer bars at the bottom of the symbol.
Table 3: Bearer Bars
10.3.1.6 Bearer Bar Width [1/1000 mm]
Sets the width of the bearer bars in 1/1000 mm.
The minimum width of the bearer bars is two times the module width (which is also used as
default value). If any smaller value is entered, the minimum width will be used instead.
Note: If the bearer bar width is set to zero, no bearer bars are printed.
10.3.1.7 Draw Mode
Due to problems with certain printer drivers, TBarCode is able to use different methods to draw bar-
codes. You can choose between following modes:
Value Description
Default The bar codes are drawn in the advanced mode. This provides the best quality.
Advanced
Compatible The bar codes are drawn in the compatible mode. This decreases the quality slightly,
but is supported by the most printers.
Dual The bar codes are drawn in the dual mode. This is a combination of the Advanced and
Compatible mode.
Table 4: Draw Mode
Page 47 of 73
TBarCode User Manual
If you want to use the Compatible draw mode as preferred setting you can specify this in an ini-
file. For more information, please refer to Appendix B.
10.3.1.8 Quiet Zone
The quiet zone is an empty area outside the barcode. It helps the scanner to read the barcode
correctly. Clicking the Adjust button opens the following dialog:
Figure 26: Quiet Zone Adjustment
In this dialog you adjust the quiet zone for all four sides of the barcode. Possible units are: Modules,
Millimeters, Mils and Pixels. Default: No quiet zone is added.
For most 1D barcodes a quiet zone should be maintained directly before and after the barcode
symbol. As a rule of thumb, the quiet zone should be ten times the dimension of the module width
or at least 1/4 inch (6.5 mm). The exact value depends on the selected barcode type.
Please note: A few barcode types provide the required quiet zone automatically. These bar-
codes are: EAN-8, EAN-13, UPC-A, UPC-E and ISBN. Changing the quiet zone for these
symbologies will add an additional white space.
10.3.2 Text Options
The text options allow the adjustment of the human readable text. The human readable text is
usually printed below the barcode symbol and shows the content of the barcode.
Not all barcode specifications support the printing of human readable text. If human readable
text is not supported, the following setting will be ignored.
10.3.2.1 Print Text
Specifies whether the barcode data is printed as human readable text or not. Default: Yes.
10.3.2.2 Above Symbol
Prints the human readable text above the symbol (default: below).
For some barcodes, like UPC and EAN, the adjustment Above symbol is not permitted.
Page 48 of 73
TBarCode User Manual
10.3.2.3 Alignment
Changes the alignment of the human readable text.
Value Description
Default Uses the default text alignment (= Center).
Left Aligns the human readable text to the left.
Right Aligns the human readable text to the right.
Center Centers the human readable text.
Table 5: Text Alignment
10.3.2.4 Text Distance
Allows you to specify the distance between the human readable text and the barcode (in 1/1000
mm). If "Default" is marked, the minimum text distance is used. Otherwise the given value will be
added.
10.3.3 Barcode Size and Module Width
10.3.3.1 Mode
This option selects the calculation method for the barcode size.
Value Description
Default - Fit to bounding rectangle Draws the biggest possible barcode which fits into the bounding rectangle. Resizing
the bounding rectangle directly resizes the barcode.
Custom - Specify module width Uses the specified module width for drawing the barcode (see section 10.3.3.2).
Minimal - Optimize for readability Creates the smallest possible barcode for the selected Resolution (see section
10.3.3.3) and for the selected Decoder type (see section 10.3.3.5).
Furthermore the module width of the barcode will be optimized for ensuring best
readability.
Table 6: Size Mode
Please note: The size modes Custom and Minimal influence the horizontal(!) size of a
barcode only! The barcode height is always given by the height of its bounding rectangle.
Only a few 2D barcodes, like Data Matrix, QR-Code or Composite symbologies require a
fixed width to height ratio. For these barcodes the height will be calculated accordingly.
10.3.3.2 Module Width [1/1000 mm]
If the size mode is set to Custom Specify module width, this input box lets you specify the size of
one module (in 1/1000 mm).
A module is the smallest element of a barcode. The widths of all bars and spaces are multiples
of one module width.
Sometimes the Module Width is also called Narrow Bar Width.
A constant module width is recommended if you have a varying amount of input data and if the
optical data density should remain constant. Furthermore, some label specifications require a cons-
tant module width.
Please note: When specifying a custom module width the barcode may grow bigger than the
bounding rectangle for big module widths or for a large amount of input data. Please make
sure that the bounding rectangle is wide enough to display the whole barcode symbol.
To ensure that no regions of the barcode are clipped, you can enable the option Display
error if barcode is clipped (see section 10.3.4).
Page 49 of 73
TBarCode User Manual
10.3.3.3 Resolution
The size mode Minimal - Optimize for readability requires the Resolution of the printer/scanner to
be selected: As value select the lowest resolution, which is used within the chain of barcode
processing (printing, scanning). Additionally you have to select the decoding solution from the
Decoder combo box below. So it can be guaranteed that the printed barcode will be readable for
the selected configuration.
Examples:
If the barcode is printed with 600 dpi and then scanned with a hardware scanner, the
resolution should be set to 600 dpi (Good print quality). As decoder select Hardware.
If the barcode is printed with 600 dpi, transmitted with a fax device (200 dpi) and then
scanned with a hardware scanner, the resolution should be set to 200 dpi (Fax). As
decoder select Hardware.
If the barcode is printed with a laser printer (600 dpi) and if it is then scanned with a flatbed
scanner (150 dpi) and then decoded via software you should select a custom resolution of
150 dpi. As decoder select Software.
Value Description
96 dpi (Screen) Specifies the default screen resolution.
200 dpi (Fax) Specifies the default fax resolution.
202 dpi (Thermo transfer) This resolution is used by thermo transfer printers (e.g. by Zebra
printers).
300 dpi (Poor print quality) Specifies a low printer resolution.
600 dpi (Good print quality) Specifies the standard printer resolution.
Custom dpi Specifies any other resolution.
The dpi value can be entered in the input box on the right (see section 10.3.3.4).
Table 7: Resolution
10.3.3.4 Custom Resolution (DPI)
Specifies the custom dpi value for the size mode Minimal - Optimize for readability if Resolution is
set to Custom dpi.
10.3.3.5 Decoder
Specifies, which kind of decoder is used for reading the barcode content (size mode Minimal -
Optimize for readability).
Value Description
Both Hardware and Software Select this option if you do not know which type of barcode decoder will be used.
Based on the adjusted resolution (see section 10.3.3.4), TBarCode OCX will automati-
cally choose a barcode size which can be read with both decoder types, Software and
Hardware.
If you are unsure about the resolution, we recommend a setting of 200 dpi (?). This
should be readable in most cases.
Hardware Select this option if the barcode is scanned (and decoded) via a scanning device (e.g.
handheld scanner).
This setting guarantees a minimal module width of 0.254 mm for linear barcodes and
0.5 mm for 2D barcodes. These values are recommended for most hardware scanners.
Software Select this option if the barcode symbol is received as an image (e.g. via flat bed
scanner, camera, fax software, etc.) and decoded via software solution.
This setting guarantees a minimal module width of 5 pixels. This value ensures reada-
bility by most software decoders.
TBarCode InForm Select this option if you plan to use the (upcoming) TBarCode software solution for
decoding the barcode symbol.
Table 8: Decoder
Page 50 of 73
TBarCode User Manual
10.3.4 Display Error if Barcode is clipped
For certain configurations, it is possible that the barcode grows bigger than the bounding rectangle.
In this case all bars which extend the size of the bounding rectangle are clipped by default.
To make sure that the barcode does not remain unreadable (because of clipped regions), you can
check the option Display error if barcode is clipped. If this property is set, and if the barcode
extends the size of the bounding rectangle, no barcode will be drawn at all. Instead an error is dis-
played.
This option may help you to avoid truncated barcodes; incorrect printouts can be detected immedi-
ately.
10.4 Property Page Font
In this menu you can adjust the font for the human readable text.
Figure 27: Property Page Font
10.4.1 Properties
The entry Font is pre-selected.
10.4.2 Font
Selects the font type. The combo box lists all fonts which are available under your operating
system.
Please consider that some fonts cant be rotated. Therefore, if rotation is required we
recommend selecting a TrueType
font.
10.4.3 Size
Specifies the font size in points.
10.4.4 Effects
Applies additional text effects. Please, check the corresponding option to create bold, italic, under-
lined and/or stroked-out text.
Page 51 of 73
TBarCode User Manual
10.4.5 Sample Text
Shows a preview of the selected font.
10.5 Property Page Color
The colors of the barcode, of the human readable text and of the background can be set here.
Figure 28: Property Page Color
In order to change the color for one of the barcode components (background, foreground, human
readable text), you have to select the corresponding property in O first. Then click on the desired
color in O.
Please note: The color in O will only be updated when switching between the list entries.
10.5.1 Properties
Select the property that you want to change:
BackColor
The background color of the barcode (color of the spaces). If the back style is set to
Transparent, the adjusted background-color will be ignored.
ForeColor
The foreground color of the barcode (color of the bars).
TextColor
The color of the human readable text.
QuietZoneColorLeft
The color of the quiet zone left of the barcode. If the back style is set to Transparent, the
adjusted color will be ignored.
QuietZoneColorBottom
The color of the quiet zone below the barcode. If the back style is set to Transparent, the
adjusted color will be ignored.
QuietZoneColorRight
The color of the quiet zone right of the barcode. If the back style is set to Transparent, the
adjusted color will be ignored.
O
O
Page 52 of 73
TBarCode User Manual
QuietZoneColoTop
The color of the quiet zone above the barcode. If the back style is set to Transparent, the
adjusted color will be ignored.
10.5.2 Color Set
You can choose between Standard Colors and Windows System Colors. Each of these color
sets offers a different color palette.
10.5.3 Color Palette
Clicking on one of the list entries assigns the color to the selected property.
10.5.4 Edit Custom Color
Clicking this button opens a dialog which lets you select a color for the list entry <Custom>.
Alternatively you can also double-click on the <Custom> list entry.
10.6 Adjust
Depending on the selected barcode type TBarCode offers additional barcode specific adjustments.
You can access these adjustments by clicking on the Adjust button in the Barcode tab. This
button is available for Aztec Code, Codablock-F, Data Matrix, DotCode, Han Xin Code, MaxiCode,
MicroPDF417, PDF417, PDF417 Truncated, QR-Code, Micro QR-Code and all Composite
Symbologies.
Figure 29: Adjust
The following sections 10.7 to 10.16 will give an overview over barcode specific properties.
Please take care when modifying these properties. Some settings may result in unreadable
barcodes. Always make a test scan in case of doubt!
Page 53 of 73
TBarCode User Manual
10.7 Adjust Properties: Aztec Code
Aztec Code is a 2-dimensional Matrix Code. Characteristic for the Aztec Code is the finder in the
center of the symbol which contains of 3 to 5 lapping squares.
Figure 30: Advanced Properties: Aztec Code
10.7.1 Format / Format Specifier
You can choose from:
Value Description
Default The standard format of Aztec Code.
UCC/EAN Special format defined by UCC and EAN. Used for encoding so-called Application Identifiers.
FNC1 is added at first position.
Industry For special industry formats. If you choose this value, you have to fill in a Format Specifier (2
digits or 1 letter). It determines which industry format the barcode data corresponds to.
FNC1 is inserted at second position.
10.7.2 Symbol Size
Defines the size of the Aztec Code symbol. Possible values range from (1) 15 x 15" to (33) 151 x
151" modules. If the property is set to default, the size is computed automatically based on the
length of the barcode data.
Additionally you can select one of three reader mode: 19x19 reader, 23x23 reader, 27x27 reader.
These modes are often used to program the barcode scanners.
10.7.3 Enforce binary encoding
If checked binary mode is used for encoding (no input data analysis). This mode is recommended if
you want to encode binary input data.
10.7.4 Enable Aztec Runes
The Aztec Runes mode is a special mode of the Aztec Code. You can encode only values between
0 and 255. Aztec Runes can be displayed in a very compact way and are highly readable due to
Reed Solomon error correction.
Page 54 of 73
TBarCode User Manual
10.7.5 Error Correction in % [0-90]
Unlike other barcode types the error correction level of an Aztec Code is not described in pre-
defined levels but can be specified in percent of the data amount. Default error correction level is
23% (which is recommended), but it may be in the range from 0 up to 90%.
10.7.6 Structured Append
If you want to connect several Data Matrix symbols in order to encode larger quantities of data,
you can use Structured Append".
10.7.6.1 Use structured append
Activates structured append (symbol-chaining) with this option.
10.7.6.2 Number of all symbols [AZ]
Enter the total number of chained Data Matrix symbols here. A maximum of 26 symbols may be
used within one chain, where A stands for 1 and Z stands for 26.
10.7.6.3 Index of this symbol [116]
A symbol identification number which is entered in the index field must be assigned to each
Data Matrix symbol. Its value can range from A (1) to Z (26). This index indicates the order in
which the data is joined after the reading/scanning process.
10.7.6.4 Message ID
The Message ID has to be the same for all symbols within a chain.
10.8 Adjust Properties: Codablock-F
Codablock-F is a stacked symbology (like PDF417) based upon the Code 128 character set. Each
row consists of a Code 128 symbol, but extended with row indicators (row count and sequence
number) and an additional check digit.
Figure 31: Advanced Properties: Codablock-F
10.8.1 Rows [2..44]
Specifies the number of rows used for encoding. The value must be between 2 and 44. Default: the
number of lines is calculated automatically depending on the number of input characters.
10.8.2 Columns [4..62]
Defines the number of columns of the generated bar code. The value must be between 4 and 62.
Start-, stop- and line-indicator columns, as well as code subset selectors are not taken into account.
Page 55 of 73
TBarCode User Manual
Default: the number of columns is calculated automatically depending on the number of input
characters.
10.8.3 Row height [1/1000 mm]
Sets the height of an individual row in 1/1000 mm. Default: The row height is calculated automati-
cally.
10.8.4 Separator height [1/1000 mm]
Sets the height of the row separator in 1/1000 mm. Default: The height of the separator is calcu-
lated automatically.
10.8.5 Code format
You can choose one of the following formats:
Value Description
Default Standard format.
UCC/EAN Special format defined by UCC and EAN to be used in UCC/EAN applications. Used for encoding
so-called Application Identifiers (AIs). A FNC1 is encoded at first position automatically.
Table 9: Codablock-F Code Formats
10.9 Adjust Properties: Data Matrix
Please note: TBarCode always encodes data using the newest ECC200 error correction
method.
In this dialog you can set Data Matrix specific properties.
Figure 32: Advanced Properties: Data Matrix
10.9.1 Code Format
Sets the code format which is used for encoding the barcode data.
Value Description
Default The standard format of Data Matrix (no special header included).
GS1/UCC/EAN Special format defined by GS1 for encoding Application Identifiers. This format adds the function
character FNC1 at 1st position in the symbol.
Page 56 of 73
TBarCode User Manual
Industry This setting supports peculiar industry formats. It adds FNC1 at 2nd position.
Macro 05 [)>Rs05Gs is encoded at the beginning of the code.
Macro 06 [)>Rs06Gs is encoded at the beginning of the code.
Reader
Programming
This setting activates the reader programming mode.
DP Postmatrix Special format defined by Deutsche Post. A special finder pattern is drawn on the left side of the bar
code.
Table 10: Data Matrix Code Formats
10.9.2 Symbol Size
Defines the size of the symbol in terms of rows and columns. Possible sizes are "10 x 10" to "144 x
144" modules for a square symbol and "8 x 18" to "16 x 48" for a rectangular symbol. When set to
default the minimal square size is used (depending on input data).
10.9.3 Enforce Binary Encoding
If checked binary mode is used for encoding (no input data analysis). This mode is recommended if
you want to encode binary input data.
10.9.4 Show as Rectangle
Determines if the Data Matrix symbol should be displayed as rectangle (checked) or square
(unchecked default).
10.9.5 Structured Append
If you want to connect several Data Matrix symbols in order to encode larger quantities of data,
you can use Structured Append".
10.9.5.1 Use structured append
Activates structured append (symbol-chaining) with this option.
10.9.5.2 Number of all symbols [216]
Enter the total number of chained Data Matrix symbols here. A maximum of 16 symbols may be
used within one chain.
10.9.5.3 Index of this symbol [116]
A symbol identification number which is entered in the index field must be assigned to each
Data Matrix symbol. Its value can range from 1 to 16. This index indicates the order in which the
data is joined after the reading/scanning process.
10.9.5.4 File-ID [164516]
The File ID has to be the same for all symbols within a chain.
10.10 Adjust Properties: DotCode
DotCode is a 2D dot code symbology, which means that 2 dots are always separated by at least on
space.
Page 57 of 73
TBarCode User Manual
Figure 33: Advanced Properties: DotCode
10.10.1 Format / Format Specifier
You can choose from:
Value Description
Auto Auto discriminate between UCC/EAN/GS1 format and generic format. If the data starts with 2
digits data is handled as GS1 format, otherwise it is handled as generic format.
Generic Data is handled as generic format. If it starts with 2 digits FNC1 is added on first position.
GS1/UCC/EAN Special format defined by GS1. Used for encoding so-called Application Identifiers. FNC1 is
added at first position.
Industry For special industry formats. If you choose this value, you have to fill in a Format Specifier (2
digits or 1 letter). It determines which industry format the barcode data corresponds to.
FNC1 is inserted at second position.
Macro 05 [)>Rs05Gs is encoded at the beginning of the code.
Macro 06 [)>Rs06Gs is encoded at the beginning of the code.
Macro 12 [)>Rs12Gs is encoded at the beginning of the code.
Custom Macro [)>Rs is encoded at the beginning of the code. The rest has to be added by the user.
Reader Programming This setting activates the reader programming mode.
Table 11: DotCode Formats
10.10.2 Size Mode
The Size Mode specifies either the Ratio between Height and Width, or the number of rows (Fixed
Height) or columns (Fixed Width). Default specifies a ratio of 4:3.
10.10.3 Ratio/Size
Depending on the Size Mode this setting defines either the aspect ratio (width : height) or the
number of columns or rows.
10.10.4 Print Direction
Set the print direction for which the DotCode symbol is to be optimized, regarding the robustness of
the symbol. It has only effect, if Size Mode is either Default or Ratio Width/Height.
10.10.5 Enforce Binary Encoding
If checked binary mode is used for encoding (no input data analysis). This mode is recommended if
you want to encode binary input data.
Page 58 of 73
TBarCode User Manual
10.10.6 Mask
Selects the mask pattern, which is applied to the encoded data (XOR masking). The goal of the
mask pattern is to distribute the bar-space transitions evenly over the symbol in order to improve
the readability of the barcode.
Value Description
Default Selects the mask pattern automatically (recommended).
0..3 Selects one of the mask patterns (0 to 3) manually.
Manual selection may be useful, if you want to generate many symbols within minimal computa-
tion time. The algorithm for identifying the optimal mask automatically is complex (and resource
consuming). However, the readability of the barcode may suffer when using manual selection.
Table 12: DotCode Mask Patterns
10.10.7 Structured Append
10.10.7.1 Use Structured Append
Activates structured append (symbol-chaining) with this option.
10.10.7.2 Number of all Symbols [235]
Enter the total number of chained DotCode symbols here. A maximum of 35 symbols may be used
within one chain.
10.10.7.3 Index of this Symbol [135]
A symbol identification number which is entered in the index field must be assigned to each
DotCode symbol. Its value can range from 1 to 35. This index indicates the order in which the data
is joined after the reading/scanning process.
10.11 Adjust Properties: Han Xin Code
Han Xin Code is a 2D matrix code like Data Matrix and QR-Code. It implements special support for
Chinese characters (character set GB18030), but supports also western character sets (like Latin I)
and byte encoding.
Figure 34: Advanced Properties: Han Xin Code
10.11.1 Symbol Version (Size)
Defines the version (=size) of a symbol. Possible sizes are "Version1 (23 x 23)" to "Version 84 (189
x 189)". When set to default the minimal square size for given input data is used.
10.11.2 Enforce Binary Encoding
If checked binary mode is used for encoding (no input data analysis). This mode is recommended if
you want to encode binary input data.
Page 59 of 73
TBarCode User Manual
10.11.3 Error Correction Level
Defines the error correction level.
Value Description
L1 Lowest level (Default). Data recovery capacity is approximately up to 8%.
L2 Up to 15%
L3 Up to 23%
L4 Highest level. Up to 30%
Table 13: Han Xin Code Error Correction Levels
10.11.4 Mask Pattern
Selects the mask pattern, which is applied to the symbol matrix (XOR masking). The goal of the
mask pattern is to distribute the bar-space transitions evenly over the symbol in order to improve
the readability of the barcode.
Value Description
Default Selects the mask pattern automatically (recommended).
0..3 Selects one of the mask patterns (0 to 3) manually.
Manual selection may be useful, if you want to generate many symbols within minimal computa-
tion time. The algorithm for identifying the optimal mask automatically is complex (and resource
consuming). However, the readability of the barcode may suffer when using manual selection.
Table 14: Han Xin Code Mask Patterns
10.12 Adjust Properties: MaxiCode
MaxiCode represents data by drawing hexagonal items which are arranged around a circular center
(bulls eye). The internal data structure is regulated by different modes. The "Structured Carrier
Message" mode was defined by the United Parcel Service UPS