IDAutomation Data Matrix
Font & Encoder Manual
DEMO NOTICE:
The demo version of this product will produce larger symbols
because the text of "DEMO<CR><LF>" is encoded in each symbol with
the data that is being encoded. In addition, many of the VBA modules
are password protected and the Native Crystal Encoder is not provided.
The
purchased
version does not include these limitations.
INDEX: [Order
Now]
IDAutomation DataMatrix Barcode Font &
Encoder Overview and Features:
Implementation Tutorials:
Specifications:
If hardware is needed to read or verify barcodes, consider the
2D Barcode Scanners
& Imagers IDAutomation offers.
Support Issues and Solutions:
* This is a website link; Internet access is required to view
this item.
|
Data Matrix
Barcode Font & Encoder Overview and Features
|
The IDAutomation Data Matrix Barcode Font & Encoder is
a collection of components that generate Data Matrix symbols with
fonts and graphics.
Large amounts of text and binary data can be
stored in a single barcode symbol with the Data Matrix symbology.
The symbol can withstand some damage without causing loss of data
with Reed Solomon error correction that is a requirement of all
ECC200 symbols. ECC200 is the recommended ISO and AIM standard of
error correction used in the symbols. This high level of error correction
decreases chances of read errors and is far more advanced than
one-dimensional barcodes with check digits. Up to about 850 characters
may be
dependably
encoded and read from each symbol with the Data Matrix symbology.
The version of
Data Matrix
provided in this package includes support for
Structured Append, which allows
thousands of characters to be encoded into multiple symbols. Additionally,
all IDAutomation DataMatrix barcode products support ECC200 by default.
This advanced Data Matrix barcode font uses IDAutomation Vertical
Interleaved Technology™ that allows increased throughput and
printing at smaller X dimensions than competitors' products.
The encoders provided in this package return a text string that,
when printed or displayed with the Data Matrix font, create the
Data Matrix symbol. It is necessary to use the encoder because of
the complexity of the symbology. Please review the
Data Matrix Encoder for Windows® Tutorial for a simple encoder
usage example.
The following barcode
font encoders are provided:
In addition to the font encoders provided, graphic encoders are
also included in this package. The graphic encoders are components
that return a graphic image of the complete symbol instead of text
that needs to be combined with a font.
The following
graphic encoders are provided:
In the event the font encoders
and graphic encoders
provided are not supported in the desired application, there are
a few other implementation options available:
- Data Matrix may be printed on an unsupported system by using
a font encoder to populate
a database with the "text string to print" and by accessing
the database from the other system with the Data Matrix font.
- The source code for any single encoder
(available in Java, C++, C# .NET or Visual Basic 6) will be
supplied with the purchase of the Unlimited Developer
License and a signed
source code license agreement. VB 6 source
code is automatically supplied with any Developer License purchase
and consists of about 5000 lines of code.
- IDAutomation
Barcode
Label Software Professional may be a good alternative. It
is a stand-alone label design application with VB scripting
support and database connectivity.
- IDAutomation
Image Generators
create images one at a time on Windows systems. Command line
options are also available with this product.
Extract the file(s) provided with the product and run the installation
executable. The installation executable will install the files needed
in the application folder under Program Files, and the following
components:
-
Data Matrix Encoder for Windows - An application that provides
an easy method for users to create Data Matrix barcodes and
print or paste them into other applications.
- TrueType Font - The Data
Matrix ECC-200 font named IDAutomationDMatrix.
- Crystal Reports UFL - Allows use
of the Data Matrix fonts from Crystal Reports, compatible with
version 9 and above.
- ActiveX Control - A
graphic encoder for
use in Access, Excel, Visual Basic, Visual Foxpro and C++.
- Windows DLL - This component
is installed in the Windows System32 folder and is used as the
font encoder for Windows applications.
-
Signed ActiveX CAB File - The CAB file may be used with
Infopath, Internet Explorer and FrontPage.
- VBA Module - The module
may be used in Visual Basic, Excel or Access.
- Visual Basic Source Code
- the source code used to create the
Data Matrix Encoder for Windows is also supplied. The source
code for generating Data Matrix from any other single encoder
may be provided with the purchase of the Unlimited Developer
License and a signed
source code agreement.
- Microsoft Office Examples
are provided for Word mail-merge
and Access. Data Matrix fonts cannot be
used directly in Excel because the method Excel uses to display
and print fonts is incompatible with stacked barcodes. To print
barcodes from Excel, it is recommended to use the graphic encoder
ActiveX Control or Word Mail-Merge.
Additionally, IDAutomation offers
Barcode
Label Software that can easily print barcodes from data
in Excel and other databases.
If it is necessary to verify Data Matrix barcodes, consider purchasing
a Data Matrix Symbol
Verifier or a
Data Matrix Imager.
The VBA module is required when using the
font encoders in VB 6, Excel
or Access; it is provided in two forms:
- The IDAutomation_Datamatrix_Macro.bas
module accesses the ActiveX DLL for the encoder function. Created
in C++, the ActiveX DLL is faster than the native VBA code.
However, the installation executable provided in the package
must be installed on each computer using this module for proper
operation.
- The IDAutomation_Native_Datamatrix_Macro.bas
module is the complete encoder function in "native" Visual Basic
form (VBA). With the exception of the Java Encoder, it is the
only encoder that is compatible with both Windows and the Macintosh.
When distributing an application with this module, the ActiveX
DLL does not need to be installed or distributed. This
module is only supplied in the purchased version of the Advantage
Package.
Importing the module:
- Extract the files provided with the product.
- Open VB, Excel or Access.
- If Excel or Access is being used, choose Tools - Macro
- Visual Basic Editor to open the VB editor.
- If the IDAutomation_Datamatrix_Macro.bas
module is to be imported, run the installation executable first.
Then in the Visual Basic Editor, choose File - Import File,
browse to the Program Files/IDAutomation.com DataMatrix Font
and Encoder for Windows folder and select that .bas file.
- In the Visual Basic Editor, if the Project Explorer is not
on the left hand side, click on View, and select Project
Explorer.
- Expand the “Modules” folder and double click on “IDAutomation_Datamatrix_Macro”
to see the code as below:

- Place an apostrophe ( ‘ ) before the lines “Option Compare
Database” and “Option Explicit”

- Then go to Tools – References and select IDAutomation
Data Matrix Barcode, click OK.
-
If the IDAutomation_Native_Datamatrix_Macro.bas
module is to be imported Choose File - Import File and
select the module to import from the VBA folder of the extracted
files. The native module, IDAutomation_Native_Datamatrix_Macro.bas,
is compatible with Windows and Macintosh but is only supplied
in the purchased version of the product.
- If Excel or Access is being used, choose File - Close
to close the VB editor and choose File - Save.
- After the file is imported, the IDAutomation_DataMatrix
function may be called according to the chart below. The zero
digit is the default for all parameters (which are optional)
and is used for automatic mode or a false setting. The one digit
is used for a true setting.
|
IDAutomation_Datamatrix_Macro.bas |
| EncDM(DataToEncode
As String, Optional ProcessTilde,
Optional EncodingMode,
Optional PreferredFormat) |
Example:
=EncDM([Test Data.data])
or
=EncDM([Test Data.data],1,3,0) |
|
IDAutomation_Native_Datamatrix_Macro.bas
(Mac users must include all parameters.) |
| EncNDM(DataToEncode
As String, Optional ProcessTilde,
Optional EncodingMode,
Optional PreferredFormat) |
Example:
=EncNDM([Test Data.data])
or
=EncNDM([Test Data.data],1,3,0) |
|
VBA Macro Parameters |
| Result = (DataToEncode As String, Optional
ProcessTilde, Optional
EncodingMode, Optional
PreferredFormat) |
There are three implementation options in Microsoft Access, two
of which are supported in the IDAutomation Data Matrix Barcode Font
& Encoder Package. When used in reports and forms, the graphic encoder
option may be the easiest product to use.
Graphic encoder implementation:
- Run the installation executable in the package and follow
the instructions to complete the installation.
- Open a report in Design Mode.
- Choose Insert - ActiveX control and choose the IDAutomation
Data Matrix control.
- Move and size the control necessary. To change the properties
of the control such as height and symbology type, right-click
on the control and choose Properties.
- To bind the control to a data source, enter the table and
field or formula in the control source field. The proper barcode
will show up after the report is saved and executed.
- Additional implementation information is provided in the
ActiveX Control Manual.
Font implementation:
- Run the installation executable file in the package and
follow the instructions to complete the installation.
- Import the VBA module into
the database.
- Open a report in Design Mode.
- Add a text field to the report that is to contain the barcode.
Size it appropriately, to be large enough to contain the symbol.
Change the font point size of the field to 8 points.
- Right-click on the text field and enter the function call
as a formula in the control source property. For example:
=IDAutomation_Native_DataMatrix([Test
Data.data])
The following formula combines two fields into a single
symbol and inserts a tab function between them
=IDAutomation_Native_DataMatrix([Test
Data.TextData] & Chr(9) & [Test Data.NumberData])
- Save the report and run it; several numbers should appear
in the text field. This data will create a correct barcode when
combined with the Data Matrix Font.
- Open the report in design mode and select the IDAutomationDMatrix
font for the text field. The recommended
point size is 8 points.
- Save the report and run it; a correct symbol should appear
in the text field.
Graphic encoder embedding:
Although it is not part of this package, the
Data Matrix
Native Barcode Generator for Access is also available, which
creates barcodes without any additional fonts, ActiveX or plug-ins.
Data Matrix barcodes may be created in a Word mail-merge if Excel
is used as the data source with the following procedure:
- Extract the files provided with the product.
- When using Windows, run the installation executable in the
package to install the IDAutomationDMatrix font. Macintosh
users should follow the
Font Installation Procedures to install the IDAutomationDMatrix
font.
- Import the VBA module into
the Excel spreadsheet that will be used as the data source.
When using the Macintosh, the native module,
IDAutomation_Native_DataMatrix_Mac.rtf
must be used. (Because Office 2004 for Mac does not have an
import feature, users will need to copy the RTF file manually
by going to Tools - Macros - Visual Basic Editor. Once the editor
window is open, go to Insert - Module and paste the contents
of the RTF file.)
- Place a title in each column of the spreadsheet on row 1
that will contain the data, and then import the data into the
Excel spreadsheet.
- Select a blank column on row 1, to the right of the last
populated column in the spreadsheet, and title it Barcode.
- Add a formula on row 2 of the Barcode column that calls
the function as a formula.
- For example, the following formula adds columns A and
B to the barcode:
Windows Example:
=SUBSTITUTE(EncNDM(A2&B2),CHAR(10),"")
Macintosh Example:
=SUBSTITUTE(EncNDM(A2&B2,0,0,-1),CHAR(10),"")
- The following formula adds just column A to the barcode,
with some optional parameters:
=SUBSTITUTE(EncNDM(A2,1,0,3),CHAR(10),"")
- The following formula adds columns A, B and C to the
barcode and separates them with a comma delimiter:
Windows Example:
=SUBSTITUTE(EncNDM(A2&","&B2&","&C2),CHAR(10),"")
Macintosh Example:
=SUBSTITUTE(EncNDM(A2&","&B2&","&C2,0,0,-1),CHAR(10),"")
- Highlight the cell with the formula in it and choose
Edit - Copy.
- Select the entire range of cells to paste this formula into
in the Barcode column and choose Edit - Paste.
- Follow the procedures in Word to add this spreadsheet as
the data source the mail merge.
- Add the mail merge field of Barcode to place the
barcode in the document.
- Highlight the «Barcode» merge field and select the
IDAutomationDMatrix font.
- After the mail-merge is performed, the barcodes should appear
in the merged documents.
- A working example is provided in the
Word Mail-Merge.doc file included
with the Windows install package.
IDAutomation provides two
font encoders in this package for Crystal
Reports:
- The
UFL Formula accesses
the ActiveX DLL and Crystal UFL for the font encoder function.
Created in C++, the ActiveX DLL is faster than the native formula.
However, when distributing the report, the Windows installation
executable file must also be installed.
- The
Native Formula
is the complete font encoder function that may be embedded in
a report. It is much slower than the UFL formula. However, when
distributing a report, no other components are required except
the Data Matrix font. Additionally, the slower speed may not
be an issue when encoding less than 40 characters. This
formula is only supplied in the purchased version of the Advantage
Package.
Although not part of this package, IDAutomation offers two other
implementations in Crystal that may be a better solution for the
desired application:
Limitations with
Crystal Reports prior to version 9:
The Crystal Reports UFL is designed to work with Crystal Reports
6.0 and above. However, because of a Crystal Reports limitation
prior to Version 9, only limited information (up to about 40 ASCII
characters) may be encoded; To overcome this limitation, version
9 or greater is required.
Crystal Reports version 9 (and later versions) overcome the 254
character limitation by using a formula that is able to retrieve
the data encoded in 254 byte chunks. A simple example of creating
a Data Matrix barcode in Crystal is included in the Font and Encoder
package. IDAutomation recommends referring to that example if problems
are encountered.
How the Font and Encoder Works with Crystal Reports:
After installing the
Data Matrix
Font and Encoder for Windows, the encoder functions will be
operative in Crystal Reports.
- The IDAutomationDataMatrixEncoderDMSet
function returns the number of data segments contained in the
barcode and sets up the barcode for retrieval. All fields passed
to the encoder set function must be text fields or they must
be converted to text.
- The IDAutomationDataMatrixEncoderDMGet
function returns a string for the designated data segment. A
correct barcode string is achieved when all data segments are
combined.
- When the barcode string is combined with IDAutomation's
Data Matrix font, it will produce a Data Matrix barcode.
How to Create a Data Matrix Barcode with Crystal Reports:
- Choose View - Field Explorer. Select Formula Fields. Right
click and select New. Enter a name to identify the formula created
and choose OK.
- The Formula Editor should now appear.
- When the Native Formula
is used, change the Formula Syntax to Basic Syntax. Copy
and paste the text from the file "Native
Formula for IDAutomation DataMatrix Fonts.txt" into
the Formula Editor dialog box. The
Native Crystal Report Example.rpt
file is provided in this package as an example, and may
be referred to for troubleshooting purposes.
- When the UFL Formula is
used, copy and paste the code below into the Formula Editor
dialog box. The Crystal Reports
Example.rpt file is provided in this package
as an example, and may be referred to for troubleshooting
purposes:
stringVar DataToEncode:=
{Table.Field};
stringVar CompleteBarcodeString:="";
numberVar i:=0;
numberVar Segments:= IDAutomationDataMatrixEncoderDMSet(DataToEncode,0
,0 ,0 );
For i:=0 to Segments Do
(
CompleteBarcodeString := CompleteBarcodeString + IDAutomationDataMatrixEncoderDMGet(i);
);
CompleteBarcodeString
- Change the DataToEncode = section
of the formula so it encodes fields from a database. Save the
formula.
-
The field where the barcode is to be placed on the report
must allow multiple lines, because the formula draws the
symbol line-by-line. Format the field so that all borders
are removed; borders will usually cause scanning problems.
Size the field so that it is large enough to contain the
barcode.
-
Choose File - Print Preview or the Preview tab. A series
of many characters will be visible in the text field; this
is normal.
-
After the font of the field is changed to the Data Matrix
Font (IDAutomationDMatrix) a correct symbol will be created.
There are a number of ways to format the data being encoded.
It is also possible to combine multiple fields and place functions
in a single barcode. The most common functions are
CHR(9) for tab and
CHR(13) for a return.
For example:
- The following formula combines two fields in a single barcode
and places a tab function between them:
stringVar DataToEncode:= {Table1.DataField1}
& CHR(9) & {Table1.DataField2};
- The following formula places a tab function and a return
function after the barcode:
stringVar DataToEncode:= {Table1.DataField1}
& CHR(9) & CHR(13);
- The formula below combines two fields with the date function:
stringVar DataToEncode:= {Table1.DataField1} & CHR(9) & {Table1.DataField2}
& CHR(13) & CurrentDate;
Refer to the
Crystal Reports
documentation for additional information about creating reports
with formulas. If it is necessary to verify barcodes, consider purchasing
a Barcode Verifier
or Hand-Held Scanner.
The Native JavaScript Font Encoder is a complete font encoder
in a single JavaScript file; no other components need to be installed
to create barcodes except the IDAutomationDMatrix font. This product
is only provided in the purchased version of the Advantage Package.
The following describes how to use the Native JavaScript Font Encoder
in HTML:
- Open the HTML document or application that the barcode is
to be integrated with.
- Add the following line at the top of the file just before
the </head> line to load the appropriate
JavaScript file:
<script language="JavaScript" src="IDAutomation_DataMatrix_Font_Encoder.js"></script>
- Add a script where the barcode is to appear in the HTML
document or text object, which is the file name without the
".js":
<font face="IDAutomationDMatrix" size="2">
<script type="text/javascript">
document.write(IDAutomation_DataMatrix_Font_Encoder("Created
with the IDAutomation.com Native JavaScript Font Encoder"));
</script></font><p>
- Modify "DataToEncode" with what is to be encoded in the
barcode. This may be accomplished with a "variable" in JavaScript
or a
dynamically generated webpage.
| JavaScript
Font Encoder Parameters |
| Result = (DataToEncode As String, Optional
ProcessTilde, Optional
EncodingMode, Optional
PreferredFormat, Optional
HTML) |
Example:
IDAutomation_DataMatrix_Font_Encoder("ECC200_123456789012",false,2,29)); |
The HTML property sets the value for
the carriage return that draws the barcode. If HTML is true (the
default setting), the carriage return is <br> for use in HTML only.
If it is false, the carriage return is an ASCII 13 + ASCII 10 which
is a return and line feed.
| Microsoft
.NET Integration
|
Implementation of Data Matrix in .NET applications may be accomplished
with graphic or font encoders. Integration into ASP.NET and other
web applications is best implemented as a graphic encoder with the
ASP.NET Web Component provided in this package. Information
about printing from
the .NET Forms Control without
using the font is provided in the
.NET Forms Control Manual.
.NET Font Encoder Example:
The following is an example that uses the font encoder to obtain
the data, that when printed with IDAutomation's Data Matrix Font,
will create a correct barcode. The source code for this font encoder
example is provided in the package for testing and reference.
- In a .NET project, add a reference to the DLL and place
the import statement in the declarations section of the project.
For example:
Imports
IDAutomation.Windows.Forms.Data MatrixBarcode
- Obtain the string of data, that when printed with IDAutomation's
Data Matrix Font, will create a correct symbol:
Dim
NewBarcode As Data MatrixBarcode
= New Data MatrixBarcode()
TextBox2.Text = NewBarcode.FontEncoder(TextBox1.Text, 0, 0, 0,
False, Data MatrixBarcode.Data
MatrixModes.Text, True)
This section describes the font encoder process in Java. Implementation
in Java as a graphic encoder is described in the
Java User
Manual.
Install the Encoder Class Library:
Copy everything in the "Java Class Encoder" directory to the root
directory of the system's Java classpath. Consult the Java documentation
or the company that provided the Java virtual machine for assistance.
Integrate the Font Encode Method:
After the directories are copied to the classpath root, the
method to format data to the font can then be called from a method
in a Java application as in this example:
import java.io.*; import com.idautomation.fontencoder.datamatrix.*; class DMatrixTest { public static void main ( String [] args ) {br> String dataToEncode = "Data Matrix Test"; DataMatrixEncoder dme=new DataMatrixEncoder(); System.out.println( dme.fontEncode(dataToEncode) ); } }
The data string returned by the fontEncode method will create
a proper Data Matrix symbol when printed with the Data Matrix font.
To install the font on an operating system, consult the OS documentation
or follow IDAutomation's
font installation procedures.
Java Encoder Properties and Methods:
- fontEncode() - The method that formats and returns
a string of data formatted to the Data Matrix Font.
- code - This is the value to be encoded.
- encoding - The encoding
mode; valid values are E_ASCII (default), E_C40, E_TEXT
or E_BASE256.
- preferredFormat - Sets the
preferred format represented
by a number; valid values are from 0 (10X10) to 23 (144X144)
and from 24 (8X18) to 29 (16X48); the default value is -1 which
sets this to automatic.
- processTilde - If true ("Y") the tilde (~) will be
processed.
The IDAutomationDataMatrix.h is an unobfuscated C++ header file that may be
provided, upon request, with the purchase of any Developers License for the
Data Matrix Font & Encoder Advantage Package and a signed
Source Code
Agreement. This header file uses the C++ libraries to return an encoded
string that can be used with the IDAutomationDMatrix. Both the method
declaration and implementation are in the header file, so no .cpp file is
necessary. Include the header file in the source code and it is ready to use.
The header file contains no OS specific code and has been QA tested with G++ on
Ubuntu Linux and Visual Studio versions 6, 2003 and 2005.
The following is an implementation example that will display the encoded text at
the command prompt:
#include <string>
#include <iostream>
#include "IDAutomationDataMatrix.h"
int main()
{
string DataToEncode = "IDAutomation.com";
string EncodedData = "";
int ApplyTilde = 0;
int EncodingMode = 0;
int PreferredFormat = 0;
EncodedData =
IDAutomation_DMFontEncode(DataToEncode,ApplyTilde,EncodingMode,PreferredFormat);
printf("Data Matrix Encoded Data:\n%s\n", EncodedData.c_str());
}
The function declaration is as follows:
string IDAutomation_DMFontEncode(string DataToEncode, int
ApplyTilde, int
EncodingMode, int
PreferredFormat)
Install the Font and Encoder for Windows by running the EXE
file provided in the package. Upon execution, it installs TrueType
fonts, implementation examples and registers the ActiveX DLL. To
register the DLL manually, perform the following: (1) copy the DLL
to the \System directory; (2) Register the DLL by going to the command
prompt, change to the \system directory, and type the following
command: REGSVR32 "IDAutomationDMATRIX.DLL". After the DLL
is installed and registered, it may be accessed by any application
that can retrieve a text string or graphic object from a COM DLL.
When using the COM DLL as a graphic encoder, refer to the instructions
in the
ActiveX Control Manual. When using the COM DLL as a font encoder,
the FontEncode function is used to convert the data to encode into
a string, that when combined with the Data Matrix font, will create
a correct barcode. The following is Visual Basic 6 code that places
the result in the "PrintableBarcodeString" variable:
DataToEncode = InputString.Text
Dim DMFontEncoder As DMATRIXLib.Datamatrix
Set DMFontEncoder = New Datamatrix
DMFontEncoder.FontEncode DataToEncode, 0, 0, 0, Printable_string
PrintableBarcodeString = Printable_string
A Visual Basic project example is included with the package. These
files are placed in the destination directory upon installation.
Distributing IDAutomation's Data Matrix
Barcode Font and Encoder
Note: Redistribution of IDAutomation's
fonts or components requires a Developer License.
When Crystal Reports or Microsoft Access applications are distributed,
the Native Crystal Formula
or the Native Access Encoder provided
in this package may be distributed without any dependencies as the
font encoder function along with the IDAutomationDMatrix font. Other
encoders provided such as the ActiveX DLL, .NET DLL and Java Class
Library do not have any dependencies.
The benefits include high scalability with operating system,
application and printer independence, these are best described in
IDAutomation's
Font
Quality Statement.
Encoding Extended ASCII
Characters
It is possible to scan and encode extended characters provided
these rules are followed:
- Encode the data using BASE256. This option encodes
ASCII 0 to 255 of the ASCII character set. To encode ASCII 0,
the format ~d000 should be used.
When encoding over 1024 characters of data, ASCII 127-160 must
also be encoded in the format ~dNNN.
- Scan the data via the serial interface option (data
bits have to be 8N) on a scanner. Normally, keyboard wedges
and USB scanners do not support extended characters above ASCII
128 and they only can scan characters that are actually on the
keyboard. Contact the scanner vendor for more information on
how to do this; some internal settings may have to be modified
on the scanner.
Amount of Data that may be Encoded
IDAutomation's Data Matrix product will encode the amount of
data specified in the Data Matrix Formats section. However, in most
situations it is difficult to scan
data over 800 characters. The ActiveX and COM DLL provided have
an encoding limitation of about 800 characters, which is necessary
for compatibility with Visual Basic.
The "Structured append" function
is also an option that will allow large amounts of data to be represented
as a sequence of up to 16 symbols. The original data can be reconstructed
regardless of the order of the symbols.
Microsoft Excel Compatibility
Microsoft Excel may be used as a data source for the font; however,
it is difficult to use the Data Matrix font in Excel. To overcome
this problem, the Data Matrix DLL supplied also works as an
ActiveX
Control and may be used in this way when it is not necessary
to use a font. To use it in this manner, see the
ActiveX Control tutorial as an example.
Some implementations of PostScript fonts can cause a small space
to appear between rows in the symbol. The only way to overcome this
issue is to make sure the printing application is not adding additional
line feeds, or in the case of PCL fonts, change the vertical motion
index as indicated below.
When using 12 or 14 point PCL fonts, an adjustment to the vertical
motion index is not usually necessary. However, if other sizes are
being used, an adjustment may be needed to close the gap between
rows. To set the vertical motion index, issue the command before
printing with the Data Matrix font. The code for the vertical motion
index command is Escape "<Ec>" + "&" + lowercase L "l" + Number
Index + Capital "C". Use the chart below to find the command for
the font size desired. The number may be adjusted as necessary for
the printer.
| PCL Font
Point Size |
Vertical
Motion Index Command to Use |
| 10 |
<Ec> &l6.5C |
| 8 |
<Ec> &l5.2C |
| 6 |
<Ec> &l3.9C |
In the example above, the <Ec> represents the escape character
for the software used. In DOS Edit, Ec is represented by holding
down the CTRL key and pressing the letter P, Releasing both keys
and then press the ESC key.
X axis issues or left margin alignment
issues when using the font
This issue may exist if moving the barcode to the right on the
X axis using a programming language such as Visual Basic. When using
the printer.currentX specification to set the X axis, only the first
line of the barcode would print in the new position and the remaining
lines would print at zero (all the way to the left). This is because
the printer.currentX specification is reset every time a return
is performed. A return must be performed to print the font on the
new line
The best solution to this problem is to find a command that could
move the left margin so that a new line will return the insertion
point to the correct position. Since Visual Basic does not have
a command like this, a small piece of code must be written to set
the currentX for each line.
Step 1. Declare and initialize a variable with the desired X
position. Example: my_x = printer.currentX
Step 2. Replace the "Printer.Print OutputString" command with something
similar to the following:
For i = 1 To Len(Output) out1 = out1 & Mid(Output, i, 1) If Mid(Output, i, 1) = Chr(10) Then out1 = Replace(out1, Chr(10), "")r> out1 = Replace(out1, Chr(13), "") Printer.CurrentX = my_x Printer.Print out1 out1 = "" End If Next i
The selected format determines the smallest size of the symbol.
If the data encoded cannot fit in the selected size, a larger symbol
will automatically be generated. Valid values are from -1 (for automatic)
and 0 to 23 (144X144) and from 24 (8X18) to 29 (16X48). The following
table contains the size, the best case capacity and the correction
error features of each format:
|
Format Number |
Size |
Numeric Capacity |
Alphanumeric capacity |
Binary capacity |
Max Correctable Error/Erasure |
| 0 |
10 x 10 |
6 |
3 |
1 |
2 |
| 1 |
12 x 12 |
10 |
6 |
3 |
3 |
| 2 |
14 x 14 |
16 |
10 |
6 |
5/7 |
| 3 |
16 x 16 |
24 |
16 |
10 |
6/9 |
| 4 |
18 x 18 |
36 |
25 |
16 |
7/11 |
| 5 |
20 x 20 |
44 |
31 |
20 |
9/15 |
| 6 |
22 x 22 |
60 |
43 |
28 |
10/17 |
| 7 |
24 x 24 |
72 |
52 |
34 |
12/21 |
| 8 |
26 x 26 |
88 |
64 |
42 |
14/25 |
| 9 |
32 x 32 |
124 |
91 |
60 |
18/33 |
| 10 |
36 x 36 |
172 |
127 |
84 |
21/39 |
| 11 |
40 x 40 |
228 |
169 |
112 |
24/45 |
| 12 |
44 x 44 |
288 |
214 |
142 |
28/53 |
| 13 |
48 x 48 |
348 |
259 |
172 |
34/65 |
| 14 |
52 x 52 |
408 |
304 |
202 |
42/78 |
| 15 |
64 x 64 |
560 |
418 |
278 |
56/106 |
| 16 |
72 x 72 |
736 |
550 |
366 |
72/132 |
| 17 |
80 x 80 |
912 |
682 |
454 |
96/180 |
| 18 |
88 x 88 |
1152 |
862 |
574 |
112/212 |
| 19 |
96 x 96 |
1392 |
1042 |
694 |
136/260 |
| 20 |
104 x 104 |
1632 |
1222 |
814 |
168/318 |
| 21 |
120 x 120 |
2100 |
1573 |
1048 |
204/390 |
| 22 |
132 x 132 |
2608 |
1954 |
1302 |
248/472 |
| 23 |
144 x 144 |
3116 |
2335 |
1556 |
310/590 |
| 24 |
8 x 18 |
10 |
6 |
3 |
3 |
| 25 |
8 x 32 |
20 |
13 |
8 |
5 |
| 26 |
12 x 26 |
32 |
22 |
14 |
7/11 |
| 27 |
12 x 36 |
44 |
31 |
20 |
9/15 |
| 28 |
16 x 36 |
64 |
46 |
30 |
12/21 |
| 29 |
16 x 48 |
98 |
72 |
47 |
14/25 |
The data represented in the symbol may be compressed by changing
the encoding mode, if certain text is being encoded. Valid values
are 0 for BASE256, 1 for C40, 2 for TEXT and
3 for ASCII.
- 0 - BASE256 is used to encode 8 bit values.
- 1 - C40 is used to encode data that mainly contains
numeric and upper case characters. C40 encodes three alphanumeric
data characters into two bytes.
- 2 - TEXT is used to encode data that mainly contains
numeric and lowercase characters. TEXT encodes three alphanumeric
data characters into two bytes.
- 3 - ASCII is used to encode data that mainly contains
ASCII characters (0-127). It encodes one alphanumeric or two
numeric characters per byte. Use this mode when encoding
DOD UID
or ISO/IEC
15434.
All encoding systems can be used to encode any data; however,
encoding binary data with C40 generates much more overhead (a larger
symbol) than with BASE256.
Control Characters and use of the
Tilde
When ProcessTilde is equal to 1 or TRUE, the tilde (~) may be
used to recognize some special characters in the input data. The
following possibilities are available:
- ~dNNN: Represents the ASCII character encoded by the 3 digits
NNN. For example, ~d065 represents the character 'A'.
The IDAutomation DataMatrix barcode font is named IDAutomationDMatrix,
and is included in several formats including TrueType, PostScript,
OpenType and PCL. The IDAutomationDMatrix font should be printed
at 8 points unless it is necessary to create a larger or smaller
symbol.
| Font
Point Size: |
Approximate
X dimensions for Data Matrix Font
|
| 14 |
.122 CM |
48 MILS |
| 12 |
.105 CM |
41 MILS |
| 10 |
.086 CM |
33 MILS |
| 8 |
.061 CM |
24 MILS |
| 6 |
.052 CM |
20 MILS |
| 4 |
.031 CM |
13 MILS |
| 3 |
.026 CM |
10 MILS |
| 2 |
.017 CM |
6 MILS |
Using the Data Matrix Encoder for
other purposes such as with Intelligent
Positioning Drives.
The data returned from the Data Matrix Encoder may
be used for other purposes such as in using
intelligent positioning drives
to stamp codes into metal parts. The images in the characters of
the font are 4 squares stacked on top of each other. The sequence
is a binary 0 (0000) (0 being a white space or no impression and
1 being dark space or an impression) at character "P" to a binary
15 (1111) at character "A". For example, multiple A's (1111) stacked,
create a vertical line of 4 squares.

© Copyright 2000-2009 IDAutomation.com, Inc.,
All Rights Reserved.
Legal Notices.
|
Over 70% of Fortune
100 companies use IDAutomation's products to automate their
businesses.
|
|