Вы находитесь на странице: 1из 73

dLSoft

2D-Barcode Fonts

By dLSoft

This manual was produced using ComponentOne Doc-To-Help.

Contents
2D-Barcode Fonts 1
Introduction ............................................................................................................................... 1 Aztec barcodes .......................................................................................................................... 2 Security and Layers..................................................................................................... 2 The Aztec font............................................................................................................. 2 The AZTDF DLL........................................................................................................ 3 The Aztec control........................................................................................................ 5 Aztec .NET Managed Component .............................................................................. 6 The dFontAZ Java class .............................................................................................. 9 The Aztec UFL for Crystal Reports ............................................................................ 9 DataMatrix barcodes ............................................................................................................... 11 DataMatrix font......................................................................................................... 12 The DMATDF DLL .................................................................................................. 12 The Datamatrix control ............................................................................................. 15 Datamatrix .NET Managed Component.................................................................... 16 The dFontDM Java class ........................................................................................... 18 The DataMatrix UFL for Crystal Reports ................................................................. 19 GS1 Databar barcodes ............................................................................................................. 21 The Databar Fonts ..................................................................................................... 22 The DBARDF DLL................................................................................................... 23 The Databar control................................................................................................... 24 Databar .NET Managed Component ......................................................................... 26 The Databar UFL for Crystal Reports....................................................................... 28 QR Code barcodes................................................................................................................... 31 Micro QR Code ......................................................................................................... 31 The QR Code Fonts................................................................................................... 31 The DQRDF DLL ..................................................................................................... 32 The QR control.......................................................................................................... 34 QR Code .NET Managed Component....................................................................... 36 The dFontQR Java class............................................................................................ 38 The QR Code UFL for Crystal Reports..................................................................... 39 PDF417 barcodes .................................................................................................................... 41 Encoding Modes........................................................................................................ 41 Security level............................................................................................................. 41 Aspect ratio ............................................................................................................... 42 Micro PDF 417.......................................................................................................... 42 The PDF font............................................................................................................. 43 The PDFDF DLL ...................................................................................................... 43 The PDF417 control.................................................................................................. 46 PDF417 .NET Managed Component ........................................................................ 48 The dFontPDF Java class .......................................................................................... 51 The PDF417 UFL for Crystal Reports ...................................................................... 51 Common DLL features............................................................................................................ 54 ErrorMessXX() ......................................................................................................... 54 EnumModeXX() ....................................................................................................... 54 MaxLevelXX().......................................................................................................... 54

dLSoft 2D-Barcode Fonts

Contents iii

Common .NET component features ........................................................................................ 55 Using .NET Components in Visual Studio.NET....................................................... 55 .NET Information properties ..................................................................................... 57 .NET Component Methods ....................................................................................... 58 Common Control Methods ...................................................................................................... 58 BarSave() .................................................................................................................. 58 BarCopy().................................................................................................................. 59 GetModeName() ....................................................................................................... 59 GetMaxLevel().......................................................................................................... 59 GetError().................................................................................................................. 60 Common Java class features.................................................................................................... 60 Java properties........................................................................................................... 60 Information properties from Java classes .................................................................. 62 Java methods ............................................................................................................. 63 Retrieving the barcode .............................................................................................. 64 Error Codes.............................................................................................................................. 64 Font table................................................................................................................................. 64

Index

67

iv Contents

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts

Introduction
Barcode fonts enable you to print barcodes on high quality graphics printers that can accept fonts (i.e. a Windows supported graphics printer or a PostScript printer that can accept downloaded fonts). However, the user needs to be aware of a number of factors that determine whether printed barcodes can actually be scanned correctly. 1. Just because you are using a barcode font, this does NOT mean that you can type ABC, render it is the barcode font, and produce a scannable barcode image. Barcodes especially 2D barcodes like PDF417 include other "characters" in addition to those which you enter as data. In the case of PDF417 each row of the barcode starts with a start pattern and ends with a stop pattern. Many of the characters in the barcode are actually "error correction digits" designed to enable the barcode to be decoded correctly even if some parts of the image have been damaged. 2. The thickness of bars and spaces in barcodes is important. Some types of barcode use only two thicknesses of bar, others use three thicknesses, and others more. Even when you print a barcode using a dLSoft barcode font, you need to ensure that the barcode has not been printed too small - so that within the resolution of the printer a single thickness bar has been printed at the same size as a double thickness bar. Consequently it is essential that you check that a printed barcode is readable using an appropriate scanner or reader. Barcodes printed by laser or quality ink-jet printer will, in general, be printed correctly, but codes printed by matrix printers must be reproduced at a large enough scale that the barcodes unit size is at least as large as the printer's pins. 3. Bar thickness reduction: Most dLSoft barcode fonts (apart from the GS1 Databar font) are supplied in three bar thicknesses. The Wide font (and its variants - names ending in W) should be suitable for most 600 and 1200 dpi laser printers - it has the bar/space ratio defined at its correct value. The Regular font (names ending in R) has all bars reduced by 5-8% and will probably be a better choice for 300 dpi laser printers and good quality ink-jets. The Narrow font (names ending in N) has all bars reduced by 10-16% and is supplied for users who will be creating master copy which will subsequently be printed using a wet ink technique (in which the ink spreads, so making each bar thicker than in the master). The narrow fonts should only be used if you know that a bar thickness reduction is required. Picking the wrong font usually produces unreadable images! If greater control of bar thickness is needed then an image creating system, such as dBarcode, will be required. The font details and translation DLL calling instructions given in the following sections cover the following font kits: Aztec Font Kit DataMatrix Font Kit GS1 Databar Font Kit PDF417 Font Kit QR Code Font Kit Please see the relevant section for details of your kit. Note that the 64 bit DLLs have names ending in 64, but are otherwise used in the same was as their 32 bit counterparts.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 1

Aztec barcodes
Aztec is a matrix symbology that supports the entire ASCII character set and offers several error checking modes. Aztec symbols are square and may be read at any orientation.

The symbol is made up of squares which "grow" from the centre around a centre mark. The size of the symbol is characterised by the number of "layers" outside the centre mark, and this can range from 1 32.

Security and Layers


In Normal mode the user may select any percentage of the symbol to contain error checking data within the range 1 99%. This is the Level parameter in calls to the AZTDF.DLL functions. If a value of 0 is used then the symbol will actually be produced with the default amount of error correction (which is 23% + 3 codewords). The higher the security level the greater will be the number of layers required to contain the symbol and hence its overall size. In Compact mode the user specifies the number of layers used to contain the symbols information and this is restricted to the range 1 4. The DLL will insert error correction data in the space available. In Full range mode again the user specifies the number of layers allowed for the symbol, but this time the range is 1 32. Again error correction data is used to fill otherwise unused space in the specified number of layers. In Full range mode the maximum capacity of Aztec Code symbols is approximately as follows: Digits only maximum capacity 3800 digits Alphanumeric text maximum capacity 3000 characters* Byte values maximum capacity 1900 bytes (*Note that capital letters, punctuation and new lines/paragraphs reduce this value.) Runes are special Aztec symbols that consist of a single layer and have no security options. Appended symbols are not supported at this time.

The Aztec font


The Aztec font system includes TrueType and PostScript fonts for creating Aztec barcodes by printing characters to generate bars and spaces. Aztec barcodes are made up of bars and spaces that may be 1 or more units wide. The dLSoft Aztec fonts uses the ASCII characters 0 (zero) - z to represent 64 combinations of 6 bars and spaces as shown in the font table at the end of this document, where a 1 is a bar and a 0 is a space. The individual characters are made up of six square in a pattern 3 high by 2 wide, with each square representing a bit of a 6 bit binary value. The dLSoft Aztec fonts are provided in different weights, to allow for ink spread during wet ink printing and the line broadening found in several printers designed for use with personal computers. Font name
AZTW AZTR AZTN

weight
full size 5% width and height reduction 10% width and height reduction

2 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Users should determine which font weight is suitable for their printer by testing each font weight. It should be noted that if gaps between the font squares are clearly visible then the barcode will not scan correctly.

The AZTDF DLL


To convert a string of characters into the bars and spaces required for the barcode requires converting the character string into another string made up of only the 0 - z characters present in the Aztec font. The following DLLs will perform the conversion: AZTDF.DLL 32 bit ANSI version AZTDFU.DLL 32 bit Unicode version AZTDF64.DLL 64 bit ANSI version AZTDF64U.DLL 64 bit Unicode version The DLLs provide three function calls which can either return the required string, copy it to the clipboard, or save it to a named disk file. These functions may be called from Visual Basic (including Visual Basic for Applications in Microsoft Office), Visual C++, Visual Foxpro, Delphi, C++ Builder, and in fact virtually every language that can make DLL calls. The functions are called with parameters that specify the options available for the barcode: szIn is a pointer to a string containing the bytes used as data to create the barcode. While passed as a text string, the string can contain non-text bytes (including ASCII 0) provided that the length parameter (n) is used to specify the length of the data. If n is 0, then the string is assumed to be a null-terminated string. n a pointer to an integer which is either 0 or specified the length of the data in szIn. flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0. level a pointer to an integer specifying the security level of the barcode generated. Allowed values for Aztec codes depend on the mode, and are 0-99 for Normal mode, 1-4 for Compact mode, and 1-32 for Full range mode (the value is ignored for Runes). Note that for Compact and Full range the security level is actually the required number of Aztec layers in the symbol. mode a pointer to an integer specifying the type of Aztec barcode created. The allowed values are shown below. mode parameter
0 1 2 3

Barcode type
Normal Compact Full range Rune

For most applications a mode of 0 is recommended, along with a level of 0 which provides the default value of 23% + 3 codewords.

Aztdf Function calls


The available function calls are:

Bar2Dazf ()
- creates text for Aztec font and returns text in szOut Declared for C as int WINAPI Bar2Dazf(LPSTR szIn,LPINT n, LPINT flags, LPINT level, LPINT mode, LPSTR szOut);

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 3

where szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), flags must be 0 in the present release, mode is the mode for the barcode type (normally 0), and szOut is a pointer to a string which will receive the characters to be rendered in the PDF font. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dazf Lib "aztdf" (ByVal szIn As String, ByRef n As Long, ByRef fl As Long, ByRef lv As Long, ByRef mo As Long, ByRef szOut As String) As Long

Bar2Dazc ()
- creates text for Aztec font and copies text to the Windows clipboard Declared for C as int WINAPI Bar2Dazc(LPSTR szIn,LPINT n, LPINT flags, LPINT level, LPINT mode); where szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), flags must be 0 in the present release, mode is the mode for the barcode type (normally 0). Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dazc Lib "aztdf" (ByVal szIn As String, ByRef n As Long, ByRef fl As Long, ByRef lv As Long, ByRef mo As Long) As Long

Bar2Dazw ()
- creates text for Aztec font and writes text to file szFilename Declared for C as int WINAPI Bar2Dazw(LPSTR szIn,LPINT n, LPINT flags, LPINT level, LPINT mode, LPSTR szFilename); where szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), flags must be 0 in the present release, mode is the mode for the barcode type (normally 0), and szFilename is a pointer to a string that contains the full pathname of the file to receive the text. If the file exists it will be overwritten. If it does not exist it will be created if possible. The call returns the number of bytes written to file, which is 0 in the event of a barcode creation error, or -1 in the event of a file creation error. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dazw Lib "aztdf" (ByVal szIn As String, ByRef n As Long, ByRef fl As Long, ByRef lv As Long, ByRef mo As Long, ByRef szFilename As String) As Long

Bar2Dazd ()
- decodes text strings previously encoded using Bar2Dazf(),Bar2Dazc(), or Bar2Dazw().

4 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Declared for C as int WINAPI Bar2Dazd(LPSTR szIn, LPSTR szOut); where szIn is a pointer to a string containing the barcode which is to be decoded; szOut is a pointer to a string that will receive the decoded output. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dazd Lib "aztdf" (ByVal szIn As String, ByRef szOut As String) As Long

The Aztec control


The AZTOCX control is an Active-X control which simplifies the use of barcodes in Active-X containers such as Visual Basic and MS Access. The AZTOCX control may be placed on a form in most applications which support Active-X controls, such as Visual Basic, Microsoft Access, etc. The Aztec barcode properties may be specified through a series of Properties, either via programming, or by setting the properties in the controls property pages.

Placing the Aztec control on a form

Visual Basic
To add the control to a Visual Basic project select Components from the Project menu, then select AZTOCX Active-X Control module from the list of controls displayed and push the OK button. The modules icon will appear in the Toolbox. The control may then be added to a form by clicking on the controls icon and then drawing a rectangle for the control on the required form. If the control is to be visible then the area allowed should be large enough to hold the largest barcode required. If the control is to be hidden, then the size is irrelevant. Once added to a form, selection of the control will show the available properties in Visual Basics properties window.

VB.NET and C#
The control may be added to the Visual Studio.NET Toolbox by right clicking on the Toolbox and selecting Add/Remove Items (or Choose Items for VS 2005) from the pop-up menu displayed, then checking the control in the list presented. The control will then appear as an icon on the Toolbox.

Access
To add the control to an Access Form or Report, open the form or report in Design view and ensure that the Toolbox is visible (its on the View menu). Select the More controls icon on the Toolbox and then select the AZTOCX Active-X Control module from the list of controls displayed. Draw a rectangle for the control on the from or report. Once added to a form or report, selection of the control will show the available properties in Accesss properties window. The font should be set by right-clicking on the control and choosing the Aztocx control properties from the displayed menu.

Aztec Property pages


The control also has its own property pages which may be accessed by right-clicking on the control and selecting Properties from the displayed menu.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 5

General Property page


This permits the setting of the barcodes mode and security level properties, and allows the control to be set to resize itself each time it is drawn

Data Property page


The edit box on this page shows the data currently being used to generate the barcode image. It is useful only for displayable characters. To provide data which includes non-printable characters the Caption property should be set via programming.

Font Property page


This page allows the user to select the barcode font and font size used to generate the barcode.

Colors Property page


This page allows the user to specify the foreground (the bars) and background color of the barcode generated. In general barcodes should be produced with a black foreground and a white background color.

Aztec Control Properties


The control has the following properties which may be set in the property pages or programmatically with Visual Basic. Caption: (BSTR) the data which will be converted into a barcode AutoSize: (Boolean) if non-zero causes the control to resize itself to contain the barcode. BackColor: (Colorref) the background color CapLength: (integer) normally 0, in which case the length of the data string in the Caption property is determined automatically. If non-zero it is taken to be the number of characters in the Caption property to be used as data. Errorcode: (integer) a non-zero value is returned if the data supplied in the Caption property can be converted into a valid barcode. Flags: (integer) if bit 7 is set (ie 128) the data is encoded as Unicode, otherwise as ANSI. Font: (Font) the font in which the Output characters will be displayed ForeColor: (Colorref) the color of the bars in the barcode Level: (integer) the security level for the generated barcode (see the DLL above for a description) Mode: (integer) the mode used to generate the barcode (see the DLL above for a description) Output: (CString) the characters which when displayed in the correct font, produce the barcode. Note that this string may be much larger than the Caption string. In addition the control supports the normal Active-X properties, such as Visible, Height, Width, etc.

Aztec .NET Managed Component


Developer versions require the developers serial number to be passed to the component using the Serial property before the Barcode() method is called. The Serial property should be set to the serial number provided for your product, e.g. Aztnet1.Serial="12345" for VB aztnet1.Serial="12345"; for C#

6 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

aztnet1.set_Serial("12345"); for J# Use of an incorrect serial number will result in randomly scrambled symbols. Main properties and methods are shown below; others are listed in the Common .NET component features section

Aztec.NET Properties

AzFlag
Type: bool Default: false Sets the Aztec flag on or off.

AzMenu
Type: bool Default: false Sets the Menu flag on or off.

AzRvideo
Type: bool Default: false Sets the Reverse Video flag on or off.

ByteNumber
Type: integer Default: 0 Allowed values: 0 barcode byte capacity When ByteValue is greater than 0 the Caption string (which is a Unicode string) is unpacked into 8-bit ASCII characters before the data is used to generate the barcode.

Caption
Type: string Default: "0123456789" Allowed values: Any text string. Note: only text strings recognised as valid barcodes will result in a barcode picture. An Illegal character in the text string will cause an Error value to be set.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 7

CodeType
Type: bCode enumeration member Default: bCode.AZT Allowed values: bCode.AZT

CodeTypeValue
Type: integer Default: 0 Allowed values: 0 The barcode type can be set using either the CodeType property or the CodeTypeValue property.

Flag
Type: Boolean Default: false Allowed values: true or false When Flag is set to true the Caption data is treated as a Unicode string and converted to a byte stream. When Flag is false the Caption data is handled as described for the ByteNumber property.

StartMode
Type: integer Default: 0 Allowed values: See 2D Barcodes section for allowed mode setting for specific barcode types.

SecurityLevel
Type: integer Default: 0 Allowed values: See 2D Barcodes section for allowed security level setting for specific barcode types and modes.

Aztec.NET Methods

Barcode()
Return Type: string This method causes a barcode to be created as a sequence of character that, when displayed in the AZTx font will form the barcode symbol. Note that the barcode symbol is determined only when this method is called, so the information properties are not set until this method has been called.

8 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

BarDecode(string bc)
Return Type: string This method returns a string decoded from the barcode passed as parameter bc. Note that bc is a barcode created by the Barcode() method.

The dFontAZ Java class


The dFontAZ Java class may be used to return strings that contain rows of characters that, when displayed in the AZT font form an Aztec symbol. The class may be used directly or through the dFontAZ.jar provided. The class is instantiated with the new command: dFontAZ az1=new dFontAZ(); and the required properties set using the setModeType() and setLevel() methods. The data is supplied to the class using the setCaption() methods and the update) method called to generated the barcode characters. The number of rows of characters in the resulting barcode may be obtained from the getNStrings() method, and each line of the barcode returned using getBarcodeString(i), eg. //g is output graphics screen or printer // ht is the chose font height in points //x and y are the top left coordinated required for the symbol n=az1.getNStrings(); for (i=0; i<n; i++) { g.drawString(az1.getBarcodeString(i),x,(y+i*ht)); } Details of the properties and methods implemented in the java class are given in the Common Java class Features section

The Aztec UFL for Crystal Reports


While a UFL for Crystal Reports is included with the kit, limitations of the Crystal Reports formula model require that larger barcodes should be stored in the underlying database rather than generated through a formula. The Crystal Reports UFL (User Function Library - U2LAZTDF.DLL) is installed into the Windows\System32 directory, and the associated sample files are placed in the installation directory of your Barcode Font kit. Most modern versions of Crystal can access the UFL from the Windows\System32 directory; but if you are using an older version you may need to copy it to a directory where Crystal can find it. Typically this will be the directory holding the Crystal Reports executable file (CRW32.exe), c:\Program Files\Seagate Software\Crystal Reports for CR 8, or \Program Files\Common Files\Crystal Decisions\2.0\bin for CR 9. It is important to note that Crystal Reports sets a limit on the number of characters that can be displayed from a formula. Consequently only relatively small Aztec barcodes (100 characters maximum) may be generated using this UFL. This is not a limitation of the dLSoft Aztec barcode font, but an inherent feature of Crystal Reports. Note that if you add barcode to reports using the Testware version and subsequently upgrade to the full version, you must delete the function and recreate it - otherwise the barcodes will continue to be scrambled.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 9

Running the sample


The sample report included with the kit is "Order Packing ListAz.rpt" which will be found in the crystal subdirectory of the kits installation directory. This is a modified version of the "Order Packing List.rpt" report included with the Crystal Reports Xtreme Mountain Bike Inc samples. If you do not have the samples installed on your system then the modified sample report will not work and you should skip to the section "Creating a barcode on a report" below. Also the report displays barcodes using the AZTW font; if you have not installed that font the report will not display a barcode - but a collection of characters. (You can change the barcode font to one you have installed as described below, and the barcode will then display correctly.) The "Order Packing ListAz.rpt" sample may be run on a machine that contains a full Crystal Reports installation just by double clicking on the report file. A barcode is included on the report with its data taken from the Order ID filed of the data. Switching the report to Design view, Right-clicking on the barcode and selecting Edit Field Object from the drop-down menu displays the Function (DLAzbars) and parameters used to generate the barcode. The first parameter is the barcode data (a string), the second parameter is an integer that specifies the Flags parameter (must be 0 in this release), the third parameter is an integer that specifies the security level, and the final parameter (normally 0) can be used to specify start mode.

Creating an Aztec barcode on a report


To create your own barcode on a report follow the steps below: 1. Open the report in Design view 2. Select Field Object from the Insert menu 3. Select the Formula Fields item in the dialog box; ensure that the item becomes highlighted. 4. Either hold down the Control key and press N, or select the New icon in the toolbar. 5. Enter a name for the formula - such as barcode1 - then push the OK button. The Formula Editor appears. 6. From the list of Functions (normally the middle list) scroll down to the Additional Functions item; the expand this item by click on the + symbol alongside the Additional Items name. 7. Select the DLAzbars function from the list, then either double click on it or press the Enter key; the function then appears in the formula box below the lists, complete with its parameter brackets and commas, and the cursor in the position of the first parameter. ie. DLAzbars (,,,) 8. The first parameter must be a string containing the barcode data. This can be a literal string (ie. data enclosed in quotation marks, such as "1234"), or field data. If field data is to be used it must be text data - so if the required field actually contains numeric data this must be converted into text data. If a required data field contains text data just double click on the field name in the list of Report Fields, and the field name enclosed in curly brackets will be copied to the function's first parameter position. eg. DLAzbars ({@address1&2},,,) If a required field contains numerical data then expand the Strings item in the list of functions and the expand the ToText function; Now select the required function - which will usually be ToText(x,y,z) where the x represent the number to be used as data, y represent the number of decimal places (typically 0) and z is a character used to separate thousands from hundreds etc (which unfortunately defaults to a comma and is generally not wanted in a barcode). Double click on the required version of the ToText function and this will be copied to the first parameter position of the DLAzbars function, with the cursor now placed in the first parameter position of the ToText function, ie. DLAzbars (ToText (, , ),,,) Now double click on the required data source field in the list of Report fields, eg. DLAzbars (ToText ({Orders.Order ID}, , ),,,)

10 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

and fill in the other two ToText parameters with a 0 (the number of decimal places) and a NULL character (two single quotes) respectively, ie. DLAzbars (ToText ({Orders.Order ID},0 ,'' ),,,) 9. Now complete the other three DLAzbars parameters with the flags, level and startmode parameters (see Help file for a complete list of these), both enclosed in quotation marks, eg. DLAzbars (ToText ({Orders.Order ID},0 ,''),"0","0","0") 10. Now click on the Save and Close icon to return to the Field Explorer and the formula named by you will be present in the list. Double-click on the formula name the move the cursor to locate the object (ie. the barcode) where you want it on the report. 11. Finally select the barcode object, right click on it, choose Format Field from the drop down menu, and click on the Font tab in the displayed dialog box. From the list of fonts presented select the AZ.. font you require and select a suitable size (typically 4 - 10 point). The character spacing must be left at 0, otherwise the barcodes will look nice but wont scan. Then click on OK. 12 Return to the report's Preview display and you should have a perfect barcode. If you are using data from a database as the data source for the barcode, then the barcode will change as you navigate around the record source. To make changes to the barcode formula Open the report in Design view, right click on the barcode (or its' empty box) and select Edit Field Object from the drop down menu. Follow the procedure above to replace the formula. Note that invalid barcodes will not be visible.

Aztec Function parameters


The function is DLAzbars(szIn, szFlags, szLevel, szStartMode) where szIn is the string containing the data text for the barcode szFlags is a string version of the flags parameter - which in this release must be "0" szLevel is a string version of the Aztec security level (see Security and layers) szStartMode is a string version of the mode parameter (see Mode)

DataMatrix barcodes
DataMatrix is a two-dimensional matrix symbology that is made up of square modules arranged within a finder pattern. DataMatrix symbols may be square or rectangular.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 11

DataMatrix symbols may include a user-select amount of error-correction, set by the security parameter. For Square symbols the value may range from 0 24. For Rectangular symbols the value may range from 0 - 6. DataMatrix symbols can encode the entire ASCII character set and uses multiple encoding modes, which are, in order of efficiency: Double digits maximum capacity 3100 digits Alphanumeric text maximum capacity 2300 characters* Byte values maximum capacity 1550 bytes *Note that capital letters, punctuation and new lines/paragraphs reduce this value. dLSoft 2D barcode products support only ECC200 symbols the older ECC140 and below are not supported. Also at this time ECI and Appended symbols are not supported. The size of a Datamatrix barcode is determined by its content, and the only control allowed is whether the barcode is square or rectangular.

DataMatrix font
The DataMatrix font system includes TrueType and PostScript fonts for creating DataMatrix barcodes by printing characters to generate bars and spaces. DataMatrix barcodes are made up of bars and spaces that may be 1 or more units wide. The dLSoft DataMatrix fonts uses the ASCII characters 0 (zero) - z to represent 64 combinations of 6 bars and spaces as shown in the font table at the end of this document, where a 1 is a bar and a 0 is a space. The individual characters are made up of six square in a pattern 3 high by 2 wide, with each square representing a bit of a 6 bit binary value. The dLSoft DataMatrix fonts are provided in different weights, to allow for ink spread during wet ink printing and the line broadening found in several printers designed for use with personal computers. Font name
AZTW AZTR AZTN

weight
full size 5% width reduction 10% width reduction

(DataMatrix fonts are the same as the Aztec fonts) Users should determine which font weight is suitable for their printer by testing each font weight. It should be noted that if gaps between the font squares are clearly visible then the barcode will not scan correctly.

The DMATDF DLL


To convert a string of characters into the bars and spaces required for the barcode requires converting the character string into another string made up of only the 0 - z characters present in the Datamatrix font. The following DLLs will perform the conversion:

12 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

DMATDF.DLL 32 bit ANSI version DMATDFU.DLL 32 bit Unicode version DMATDF 64.DLL 64 bit ANSI version DMATDF 64U.DLL 64 bit Unicode version The DLLs provide three function calls which can either return the required string, copy it to the clipboard, or save it to a named disk file. These functions may be called from Visual Basic (including Visual Basic for Applications in Microsoft Office), Visual C++, Visual Foxpro, Delphi, C++ Builder, and in fact virtually every language that can make DLL calls. The functions are called with parameters that specify the options available for the barcode: szIn is a pointer to a string containing the bytes used as data to create the barcode. While passed as a text string, the string can contain non-text bytes (including ASCII 0) provided that the length parameter (n) is used to specify the length of the data. If n is 0, then the string is assumed to be a null-terminated string. n a pointer to an integer which is either 0 or specified the length of the data in szIn. mode a pointer to an integer specifying the type of DataMatrix barcode created. The allowed values are 0 for square barcodes and 1 for rectangular barcodes. flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0.

Dmatdf Function calls


The available function calls are:

Bar2Ddmf ()
- creates text for Datamatrix font and returns the text in szOut Declared for C as int WINAPI Bar2Ddmf(LPSTR szIn,LPINT n, LPINT flags, LPINT mode, LPINT sec, LPSTR szOut); where szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0. mode specifies the shape of the barcode (0=square, 1= rectangular) or whether the symbol is encoded using GS1 Datamatrix encoding rule (2=square GS1, 3=rectangular GS1), sec is the security level and szOut is a pointer to a string which will receive the characters to be rendered in the DataMatrix (AZT) font. The security level has allowed values of 0 24 for square symbols, or 0 6 for rectangular symbols. A negative security level may be used to specify the number of columns in the symbol. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Ddmf Lib "dmatdf" (ByVal szIn As String, ByRef n As Long, ByRef flg As Long, ByRef mo As Long, ByRef sec As Long, ByRef szOut As String) As Long

Bar2Ddmc ()
- creates text for Datamatrix font and copies to the Windows clipboard Declared for C as int WINAPI Bar2Ddmc(LPSTR szIn,LPINT n, LPINT mode, LPINT sec, );

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 13

where szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), mode specifies the shape of the barcode (0=square, 1= rectangular) or whether the symbol is encoded using GS1 Datamatrix encoding rule (2=square GS1, 3=rectangular GS1), and sec is the security level The security level has allowed values of 0 24 for square symbols, or 0 6 for rectangular symbols. A negative security level may be used to specify the number of columns in the symbol. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Ddmc Lib "dmatdf" (ByVal szIn As String, ByRef n As Long, ByRef mo As Long, ByRef sec As Long) As Long

Bar2Ddmw ()
- creates text for Datamatrix font and writes to file szFilename Declared for C as int WINAPI Bar2Ddmw(LPSTR szIn,LPINT n, LPINT mode, LPINT sec, LPSTR szFilename); where szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), mode specifies the shape of the barcode (0=square, 1= rectangular) or whether the symbol is encoded using GS1 Datamatrix encoding rule (2=square GS1, 3=rectangular GS1), sec is the security level and szFilename is a pointer to a string that contains the full pathname of the file to receive the text. If the file exists it will be overwritten. If it does not exist it will be created if possible. The security level has allowed values of 0 24 for square symbols, or 0 6 for rectangular symbols. A negative security level may be used to specify the number of columns in the symbol. The call returns the number of bytes written to file, which is 0 in the event of a barcode creation error, or -1 in the event of a file creation error. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Ddmw Lib "dmatdf" (ByVal szIn As String, ByRef n As Long, ByRef mo As Long, ByRef sec As Long, ByRef szFilename As String) As Long

Bar2Ddmd ()
- decodes text strings previously encoded using Bar2Ddmf(),Bar2Ddmc(), or Bar2Ddmw(). Declared for C as int WINAPI Bar2Ddmd(LPSTR szIn, LPSTR szOut); where szIn is a pointer to a string containing the barcode which is to be decoded; szOut is a pointer to a string that will receive the decoded output. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Ddmd Lib "dmatdf" (ByVal szIn As String, ByRef szOut As String) As Long

14 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

The Datamatrix control


The DMFOCX control is an Active-X control which simplifies the use of barcodes in Active-X containers such as Visual Basic and MS Access. The DMFOCX control may be placed on a form in most applications which support Active-X controls, such as Visual Basic, Microsoft Access, etc. The Datamatrix barcode properties may be specified through a series of Properties, either via programming, or by setting the properties in the controls property pages.

Placing the Datamatrix control on a form

Visual Basic
To add the control to a Visual Basic project select Components from the Project menu, then select DMFOCX Active-X Control module from the list of controls displayed and push the OK button. The modules icon will appear in the Toolbox. The control may then be added to a form by clicking on the controls icon and then drawing a rectangle for the control on the required form. If the control is to be visible then the area allowed should be large enough to hold the largest barcode required. If the control is to be hidden, then the size is irrelevant. Once added to a form, selection of the control will show the available properties in Visual Basics properties window.

VB.NET and C#
The control may be added to the Visual Studio.NET Toolbox by right clicking on the Toolbox and selecting Add/Remove Items (or Choose Items for VS 2005) from the pop-up menu displayed, then checking the control in the list presented. The control will then appear as an icon on the Toolbox.

Access
To add the control to an Access Form or Report, open the form or report in Design view and ensure that the Toolbox is visible (its on the View menu). Select the More controls icon on the Toolbox and then select the DMFOCX Active-X Control module from the list of controls displayed. Draw a rectangle for the control on the from or report. Once added to a form or report, selection of the control will show the available properties in Accesss properties window. The font should be set by right-clicking on the control and choosing the Dmfocx control properties from the displayed menu.

DataMatrix Property pages


The control also has its own property pages which may be accessed by right-clicking on the control and selecting Properties from the displayed menu.

General Property page


This permits the setting of the barcodes mode (Square, Rectangular, Square with GS1 encoding or Rectangular with GS1 encoding) and security level properties, and allows the control to be set to resize itself each time it is drawn

Data Property page


The edit box on this page shows the data currently being used to generate the barcode image. It is useful only for displayable characters. To provide data which includes non-printable characters the Caption property should be set via programming.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 15

Font Property page


This page allows the user to select the barcode font and font size used to generate the barcode.

Colors Property page


This page allows the user to specify the foreground (the bars) and background color of the barcode generated. In general barcodes should be produced with a black foreground and a white background color.

The DataMatrix Control Properties


The control has the following properties which may be set in the property pages or programmatically with Visual Basic. Caption: (BSTR) the data which will be converted into a barcode AutoSize: (Boolean) if non-zero causes the control to resize itself to contain the barcode. BackColor: (Colorref) the background color CapLength: (integer) normally 0, in which case the length of the data string in the Caption property is determined automatically. If non-zero it is taken to be the number of characters in the Caption property to be used as data. Errorcode: (integer) a non-zero value is returned if the data supplied in the Caption property can be converted into a valid barcode. Flags: (integer) if bit 7 is set (ie 128) the data is encoded as Unicode, otherwise as ANSI. Font: (Font) the font in which the Output characters will be displayed ForeColor: (Colorref) the color of the bars in the barcode Columns: (integer) the number of columns in the symbol; may be overridden by the security level. Level: (integer) the security level for the generated barcode (see the DLL above for a description) A negative Level may be used to specify the number of columns in the symbol. Mode: (integer) the mode used to generate the barcode; 0 produces Square barcodes, 1 produces rectangular barcodes. Output: (CString) the characters which when displayed in the correct font, produce the barcode. Note that this string may be much larger than the Caption string. In addition the control supports the normal Active-X properties, such as Visible, Height, Width, etc.

Datamatrix .NET Managed Component


Developer versions require the developers serial number to be passed to the component using the Serial property before the Barcode() method is called. The Serial property should be set to the serial number provided for your product, e.g. Dmfnet1.Serial="12345" for VB dmfnet1.Serial="12345"; for C# dmfnet1.set_Serial("12345"); for J# Main properties and methods are shown below; others are listed in the Common .NET component features section

16 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Datamatrix.NET Properties

ByteNumber
Type: integer Default: 0 Allowed values: 0 barcode byte capacity When ByteValue is greater than 0 the Caption string (which is a Unicode string) is unpacked into 8-bit ASCII characters before the data is used to generate the barcode ie. Only the low-order byte of each character is used. When ByteNumber is 0 the Caption string is converted to bytes according to the length of each character in the string. (see also Flag)

Caption
Type: string Default: "0123456789" Allowed values: Any text string. Note: only text strings recognised as valid barcodes will result in a barcode picture. An Illegal character in the text string will cause an Error value to be set.

CodeType
Type: bCode enumeration member Default: bCode.DMT Allowed values: bCode.DMT

CodeTypeValue
Type: integer Default: 0 Allowed values: 0 The barcode type can be set using either the CodeType property or the CodeTypeValue property

Flag
Type: Boolean Default: false Allowed values: true or false When Flag is set to true the Caption data is treated as a Unicode string and converted to a byte stream. When Flag is false the Caption data is handled as described for the ByteNumber property.

GS1_Flag
Type: Boolean

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 17

Default: false Allowed values: true or false When GS1_Flag is set to true the Caption data is encoded using GS1 Datamatrix rules, scanned for valid Application Identifiers (AIs), and brackets removed. If GS1_Flag is false the symbol is created using standard Datamatrix rules. Note that making the first data character FNC1 (ASCII 232) has the same effect as setting the GS1_Flag to true.

StartMode
Type: integer Default: 0 Allowed values: 0 (for Square symbols) or 1 (for Rectangular symbols). Note that rectangular symbols have a much smaller capacity than square ones!.

SecurityLevel
Type: integer Default: 0 Allowed values: See 2D Barcodes section for allowed security level setting for specific barcode types and modes. A negative SecurityLevel may be used to specify the number of columns in the symbol.

Datamatrix.NET Methods

Barcode()
Return Type: string This method causes a barcode to be created as a sequence of character that, when displayed in the AZTx font will form the barcode symbol. Note that the barcode symbol is determined only when this method is called, so the information properties are not set until this method has been called.

BarDecode(string bc)
Return Type: string This method returns a string decoded from the barcode passed as parameter bc. Note that bc is a barcode created by the Barcode() method.

The dFontDM Java class


The dFontDM Java class may be used to return strings that contain rows of characters that, when displayed in the AZT font form a DataMatrix symbol. The class may be used directly or through the dFontDM.jar provided.

18 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

The class is instantiated with the new command: dFontDM dm1=new dFontDM(); and the required properties set using the setModeType() and setLevel() methods. The data is supplied to the class using the setCaption() methods and the update) method called to generated the barcode characters. The number of rows of characters in the resulting barcode may be obtained from the getNStrings() method, and each line of the barcode returned using getBarcodeString(i), eg. //g is output graphics screen or printer // ht is the chose font height in points //x and y are the top left coordinated required for the symbol n=dm1.getNStrings(); for (i=0; i<n; i++) { g.drawString(dm1.getBarcodeString(i),x,(y+i*ht)); } Details of the properties and methods implemented in the java class are given in the Common Java class Features section

The DataMatrix UFL for Crystal Reports


While a UFL for Crystal Reports is included with the kit, limitations of the Crystal Reports formula model require that larger barcodes should be stored in the underlying database rather than generated through a formula. The Crystal Reports UFL (User Function Library - U2LDMATDF.DLL) is installed into the Windows\System32 directory, and the associated sample files are placed in the installation directory of your Barcode Font kit. Most modern versions of Crystal can access the UFL from the Windows\System32 directory; but if you are using an older version you may need to copy it to a directory where Crystal can find it. Typically this will be the directory holding the Crystal Reports executable file (CRW32.exe), c:\Program Files\Seagate Software\Crystal Reports for CR 8, or \Program Files\Common Files\Crystal Decisions\2.0\bin for CR 9. It is important to note that Crystal Reports sets a limit on the number of characters that can be displayed from a formula. Consequently only relatively small DataMatrix barcodes (100 characters maximum) may be generated using this UFL. This is not a limitation of the dLSoft Aztec/DataMatrix barcode font, but an inherent feature of Crystal Reports. Note that if you add barcode to reports using the Testware version and subsequently upgrade to the full version, you must delete the function and recreate it - otherwise the barcodes will continue to be scrambled.

Running the sample


The sample report included with the kit is "Order Packing ListDm.rpt" which will be found in the crystal subdirectory of the kits installation directory. This is a modified version of the "Order Packing List.rpt" report included with the Crystal Reports Xtreme Mountain Bike Inc samples. If you do not have the samples installed on your system then the modified sample report will not work and you should skip to the section "Creating a barcode on a report" below. Also the report displays barcodes using the AZTW font; if you have not installed that font the report will not display a barcode - but a collection of characters. (You can change the barcode font to one you have installed as described below, and the barcode will then display correctly.) The "Order Packing ListDm.rpt" sample may be run on a machine that contains a full Crystal Reports installation just by double clicking on the report file. A barcode is included on the report with its data taken from the Order ID filed of the data. Switching the report to Design view, Right-clicking on the barcode and selecting Edit Field Object from the drop-down menu displays the Function (DLDmbars) and parameters used to generate the barcode. The first parameter is the

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 19

barcode data (a string), the second parameter is an integer that specifies the security level, and the final parameter can be used to specify start mode (0 for square, 1 for rectangular).

Creating a DataMatrix barcode on a report


To create your own barcode on a report follow the steps below: 1. Open the report in Design view 2. Select Field Object from the Insert menu 3. Select the Formula Fields item in the dialog box; ensure that the item becomes highlighted. 4. Either hold down the Control key and press N, or select the New icon in the toolbar. 5. Enter a name for the formula - such as barcode1 - then push the OK button. The Formula Editor appears. 6. From the list of Functions (normally the middle list) scroll down to the Additional Functions item; the expand this item by click on the + symbol alongside the Additional Items name. 7. Select the DLDmbars function from the list, then either double click on it or press the Enter key; the function then appears in the formula box below the lists, complete with its parameter brackets and commas, and the cursor in the position of the first parameter. ie. DLDmbars (,,) 8. The first parameter must be a string containing the barcode data. This can be a literal string (ie. data enclosed in quotation marks, such as "1234"), or field data. If field data is to be used it must be text data - so if the required field actually contains numeric data this must be converted into text data. If a required data field contains text data just double click on the field name in the list of Report Fields, and the field name enclosed in curly brackets will be copied to the function's first parameter position. eg. DLDmbars ({@address1&2},,) If a required field contains numerical data then expand the Strings item in the list of functions and the expand the ToText function; Now select the required function - which will usually be ToText(x,y,z) where the x represent the number to be used as data, y represent the number of decimal places (typically 0) and z is a character used to separate thousands from hundreds etc (which unfortunately defaults to a comma and is generally not wanted in a barcode). Double click on the required version of the ToText function and this will be copied to the first parameter position of the DLDmbars function, with the cursor now placed in the first parameter position of the ToText function, ie. DLDmbars (ToText (, , ),,) Now double click on the required data source field in the list of Report fields, eg. DLDmbars (ToText ({Orders.Order ID}, , ),,) and fill in the other two ToText parameters with a 0 (the number of decimal places) and a NULL character (two single quotes) respectively, ie. DLDmbars (ToText ({Orders.Order ID},0 ,'' ),,) 9. Now complete the other two DLDmbars parameters with the mode ( 0=square, 1=rectangular, 2=square GS1, 3=rectangular GS1) and security level parameters (see above for a complete list of these), both enclosed in quotation marks, eg. DLDmbars (ToText ({Orders.Order ID},0 ,''),"0","0") 10. Now click on the Save and Close icon to return to the Field Explorer and the formula named by you will be present in the list. Double-click on the formula name the move the cursor to locate the object (ie. the barcode) where you want it on the report.

20 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

11. Finally select the barcode object, right click on it, choose Format Field from the drop down menu, and click on the Font tab in the displayed dialog box. From the list of fonts presented select the AZ.. font you require and select a suitable size (typically 4 - 10 point). The character spacing must be left at 0, otherwise the barcodes will look nice but wont scan. Then click on OK. 12 Return to the report's Preview display and you should have a perfect barcode. If you are using data from a database as the data source for the barcode, then the barcode will change as you navigate around the record source.

To make changes to the barcode formula


Open the report in Design view, right click on the barcode (or its' empty box) and select Edit Field Object from the drop down menu. Follow the procedure above to replace the formula. Note that invalid barcodes will not be visible.

Function parameters
The function is DLDmbars(szIn, szStartMode, szLevel) where szIn is the string containing the data text for the barcode szMode is a string version of the mode parameter (see Mode) szLevel is a string version of the DataMatrix security level (see Security and layers), or (when negative) the number of columns in a symbol.

GS1 Databar barcodes


The GS1 DataBar symbology - formerly known as EAN.UCC Reduced Space Symbology (RSS) - is a family containing three linear symbologies and three stacked variants, known as GS1-DataBar barcodes. GS1-DataBar-14 encodes the full 14 digit GS1/EAN/UCC item identification in a linear symbol that can be scanned in any direction. GS1-DataBar Limited encodes item identification suitable for use on small items, but not for use at point-of-sale.

GS1-DataBar -Expanded encodes the 14 digit GS1/EAN/UCC item identification plus supplementary AI elements.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 21

GS1-DataBar -14 Stacked is a variant which is stacked in two rows, either as a truncated version used for small item marking,

or as an omni-directional version designed to be read by omnidirectional scanners.

The Databar Fonts


The Databar font system includes TrueType, OpenType and PostScript fonts for creating Databar barcodes by printing characters to generate bars and spaces. Databar barcodes are made up of bars and spaces that may be 1 or more units wide. The dL Databar fonts use the following ASCII characters: A P and a f for the Databar modes Omnidirectional and Expanded (including the stacked variants) 0, 1 for the Truncated mode 2, 3 for the Limited mode 4 9 for the Stacked mode. The minimum height of the bars in relation to the width of the thinnest bar is different for different modes, so for a given point size the width of the characters is different. The height;width ratio for the characters is: A P and a-f: ratio = 1000 : 27 0, 1: ratio = 1000 : 77 2, 3: ratio = 1000 : 100 4 9 : ratio = 1000 : 143

22 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

The DBARDF DLL


To convert a string of characters into the bars and spaces required for the barcode requires converting the character string into another string made up of only the characters present in the dL Databar font. The following DLLs will perform the conversion: DBARDF.DLL 32 bit ANSI version DBARDFU.DLL 32 bit Unicode version DBARDF 64.DLL 64 bit ANSI version DBARDF64U.DLL 64 bit Unicode version The DLLs provide three function calls which can either return the required string, copy it to the clipboard, or save it to a named disk file. These functions may be called from Visual Basic (including Visual Basic for Applications in Microsoft Office), Visual C++, Visual Foxpro, Delphi, C++ Builder, and in fact virtually every language that can make DLL calls. The functions are called with parameters that specify the options available for the barcode: pMode a pointer to an integer which specifies the type of Databar symbol required: 0 for Omnidirectional 1 for Truncated 2 for Limited 3 for Stacked 4 for Omnidirectional Stacked 5 for Expanded 6 for Expanded Stacked szIn is a pointer to a string containing the characters used as data to create the barcode. pCols a pointer to an integer which is either 0 or specifies the number of codeword pairs per row of an ExpandedStacked symbol which may be 1 - 7.

Dbardf Function calls


The available function calls are:

Bar2Drsf ()
- creates text for the Databar font and returns the text in szOut Declared for C as int WINAPI Bar2Dqrf(LPINT mode, LPSTR szIn,LPINT cols, LPSTR szOut); where mode is a pointer to an integer that specifies the barcode type required szIn is a pointer to a string containing the text which is to be converted into the barcode; cols is a pointer to an integer that specifies that number of codeword pairs per row in an Expanded-Stacked symbol, and szOut is a pointer to a string which will receive the characters to be rendered in the dL Databar font. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Drsf Lib "dbardf" (ByRef mo As Long, ByVal szIn As String, ByRef co As Long, ByRef szOut As String) As Long

Bar2Drsc ()
- creates text for the dL Databar font and copies it to the Windows clipboard Declared for C as

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 23

int WINAPI Bar2Drsc(LPINT mode, LPSTR szIn,LPINT cols ); where mode is a pointer to an integer that specifies the barcode type required szIn is a pointer to a string containing the text which is to be converted into the barcode; cols is a pointer to an integer that specifies that number of codeword pairs per row in an Expanded-Stacked symbol, Basic Declaration (VB6 & VBA) Private Declare Function Bar2Drsc Lib "dbardf" (ByRef mo As Long, ByVal szIn As String, ByRef co As Long) As Long

Bar2Drsw ()
- creates text for the dL Databar font and writes to file szFilename Declared for C as int WINAPI Bar2Drsw(LPINT mode, LPSTR szIn,LPINT cols, LPSTR szFilename); where mode is a pointer to an integer that specifies the barcode type required szIn is a pointer to a string containing the text which is to be converted into the barcode; cols is a pointer to an integer that specifies that number of codeword pairs per row in an Expanded-Stacked symbol, szFilename is a pointer to a string that contains the full pathname of the file to receive the text. If the file exists it will be overwritten. If it does not exist it will be created if possible. The call returns the number of bytes written to file, which is 0 in the event of a barcode creation error, or -1 in the event of a file creation error. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Drsw Lib "dbardf" (ByRef mo As Long, ByVal szIn As String, ByRef co As Long, ByRef szFilename As String) As Long

The Databar control


The DBAROCX control is an Active-X control which simplifies the use of barcodes in Active-X containers such as Visual Basic and MS Access. The DBAROCX control may be placed on a form in most applications which support Active-X controls, such as Visual Basic, Microsoft Access, etc. The Databar barcode properties may be specified through a series of Properties, either via programming, or by setting the properties in the controls property pages.

Placing the Databar control on a form

Visual Basic
To add the control to a Visual Basic project select Components from the Project menu, then select DBAROCX Active-X Control module from the list of controls displayed and push the OK button. The modules icon will appear in the Toolbox. The control may then be added to a form by clicking on the controls icon and then drawing a rectangle for the control on the required form. If the control is to be visible then the area allowed should be large enough to hold the largest barcode required. If the control is to be hidden, then the size is irrelevant.

24 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Once added to a form, selection of the control will show the available properties in Visual Basics properties window.

VB.NET and C#
The control may be added to the Visual Studio.NET Toolbox by right clicking on the Toolbox and selecting Add/Remove Items (or Choose Items for VS 2005) from the pop-up menu displayed, then checking the control in the list presented. The control will then appear as an icon on the Toolbox.

Access
To add the control to an Access Form or Report, open the form or report in Design view and ensure that the Toolbox is visible (its on the View menu). Select the More controls icon on the Toolbox and then select the DBAROCX ActiveX Control module from the list of controls displayed. Draw a rectangle for the control on the from or report. Once added to a form or report, selection of the control will show the available properties in Accesss properties window. The font should be set by right-clicking on the control and choosing the Dbarocx control properties from the displayed menu.

Databar Control Property pages


The control also has its own property pages which may be accessed by right-clicking on the control and selecting Properties from the displayed menu.

General Property page


This permits the setting of the barcodes mode (Omnidirectional, Stacked, etc.) and (for Expanded Stacked symbols) the number of codeword pairs per row, and allows the control to be set to resize itself each time it is drawn

Data Property page


The edit box on this page shows the data currently being used to generate the barcode image. It is useful only for displayable characters.

Font Property page


This page allows the user to select the barcode font and font size used to generate the barcode.

Colors Property page


This page allows the user to specify the foreground (the bars) and background color of the barcode generated. In general barcodes should be produced with a black foreground and a white background color.

The Databar Control Properties


The control has the following properties which may be set in the property pages or programmatically with Visual Basic. Caption: (BSTR) the data which will be converted into a barcode AutoSize: (Boolean) if non-zero causes the control to resize itself to contain the barcode. BackColor: (Colorref) the background color

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 25

CapLength: (integer) normally 0. Errorcode: (integer) a non-zero value is returned if the data supplied in the Caption property can be converted into a valid barcode. Font: (Font) the font in which the Output characters will be displayed ForeColor: (Colorref) the color of the bars in the barcode Mode: (integer) the mode of the barcode; Allowed values are: 0 for Omnidirectional 1 for Truncated 2 for Limited 3 for Stacked 4 for Omnidirectional Stacked 5 for Expanded 6 for Expanded Stacked Output: (CString) the characters which when displayed in the correct font, produce the barcode. Note that this string may be much larger than the Caption string. In addition the control supports the normal Active-X properties, such as Visible, Height, Width, etc.

Databar .NET Managed Component


Developer versions require the developers serial number to be passed to the component using the Serial property before the Barcode() method is called. The Serial property should be set to the serial number provided for your product, e.g. Dbarfnet1.Serial="12345" for VB dbarfnet1.Serial="12345"; for C# dbarfcnet1.set_Serial("12345"); for J# Use of an incorrect serial number will result in randomly scrambled symbols. Main properties and methods are shown below; others are listed in the Common .NET component features section

Databar .NET Properties

Caption
Type: string Default: "1234567890123" Allowed values: Any text string. Note: only text strings recognised as valid barcodes will result in a barcode picture. An Illegal character in the text string will cause an Error value to be set.

CodeType
Type: bCode enumeration member Default: bCode.Databar Allowed values: bCode.Databar

26 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

This is the default value and should not be changed.

CodeTypeValue
Type: integer Default: 0 Allowed values: 0 This is the default value and should not be changed.

Flag
Type: Boolean Default: false Allowed values: true or false When Flag is set to true the Caption data is treated as a Unicode string and converted to a byte stream. When Flag is false the Caption data is handled as described for the ByteNumber property.

StartMode
Type: integer Default: 0 Allowed values: 0 = Omnidirectional 1 = Truncated 2 = Limited 3 = Stacked 4 = Omnidirectional Stacked 5 = Expanded 6 = Expanded Stacked

Databar .NET Methods

Barcode()
Return Type: string This method causes a barcode to be created as a sequence of character that, when displayed in the dL Databar font will form the barcode symbol. Note that the barcode symbol is determined only when this method is called, so the information properties are not set until this method has been called.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 27

The Databar UFL for Crystal Reports


A UFL for Crystal Reports is included with the kit. However, limitations of the Crystal Reports formula model to 255 output characters may require that larger Databar Expanded or Expanded Stacked barcodes should be stored in the underlying database rather than generated through a formula. The Crystal Reports UFL (User Function Library - U2LDBARDF.DLL) is installed into the Windows\System32 directory, and the associated sample files are placed in the installation directory of your Barcode Font kit. Most modern versions of Crystal can access the UFL from the Windows\System32 directory; but if you are using an older version you may need to copy it to a directory where Crystal can find it. Typically this will be the directory holding the Crystal Reports executable file (CRW32.exe), c:\Program Files\Seagate Software\Crystal Reports for CR 8, or \Program Files\Common Files\Crystal Decisions\2.0\bin for CR 9. Note that if you add barcode to reports using the Testware version and subsequently upgrade to the full version, you must delete the function and recreate it - otherwise the barcodes will continue to be scrambled.

Running the sample


The sample report included with the kit is "Order Packing ListDb.rpt" which will be found in the crystal subdirectory of the kits installation directory. This is a modified version of the "Order Packing List.rpt" report included with the Crystal Reports Xtreme Mountain Bike Inc samples. If you do not have the samples installed on your system then the modified sample report will not work and you should skip to the section "Creating a barcode on a report" below. Also the report displays barcodes using the dL Databar font; if you have not installed that font the report will not display a barcode - but a collection of characters. (You can change the barcode font to one you have installed as described below, and the barcode will then display correctly.) The "Order Packing ListDb.rpt" sample may be run on a machine that contains a full Crystal Reports installation just by double clicking on the report file. A barcode is included on the report with its data taken from the Order ID field of the data with a prefix to produce the number of characters required to a Databar symbol. Switching the report to Design view, Right-clicking on the barcode and selecting Edit Field Object from the drop-down menu displays the Function (DLDbars) and parameters used to generate the barcode. The first parameter is the barcode data (a string), the second parameter is an integer that specifies the mode, and the final parameter can be used to specify the number of codeword columns in an Expanded Stacked symbol but otherwise should be 0.

Creating a Databar barcode on a report


To create your own barcode on a report follow the steps below: 1. Open the report in Design view 2. Select Field Object from the Insert menu 3. Select the Formula Fields item in the dialog box; ensure that the item becomes highlighted. 4. Either hold down the Control key and press N, or select the New icon in the toolbar. 5. Enter a name for the formula - such as barcode1 - then push the OK button. The Formula Editor appears. 6. From the list of Functions (normally the middle list) scroll down to the Additional Functions item; the expand this item by click on the + symbol alongside the Additional Items name. 7. Select the DLDbars function from the list, then either double click on it or press the Enter key; the function then appears in the formula box below the lists, complete with its parameter brackets and commas, and the cursor in the position of the first parameter. ie. DLDbars (,,)

28 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

8. The first parameter must be a string containing the barcode data. This can be a literal string (ie. data enclosed in quotation marks, such as "1234"), or field data. If field data is to be used it must be text data - so if the required field actually contains numeric data this must be converted into text data. If a required data field contains text data just double click on the field name in the list of Report Fields, and the field name enclosed in curly brackets will be copied to the function's first parameter position. eg. DLDbars ({@address1&2},,,) If a required field contains numerical data then expand the Strings item in the list of functions and the expand the ToText function; Now select the required function - which will usually be ToText(x,y,z) where the x represent the number to be used as data, y represent the number of decimal places (typically 0) and z is a character used to separate thousands from hundreds etc (which unfortunately defaults to a comma and is generally not wanted in a barcode). Double click on the required version of the ToText function and this will be copied to the first parameter position of the DLDbars function, with the cursor now placed in the first parameter position of the ToText function, ie. DLDbars (ToText (, , ),,) Now double click on the required data source field in the list of Report fields, eg. DLQRbars (ToText ({Orders.Order ID}, , ),,) and fill in the other two ToText parameters with a 0 (the number of decimal places) and a NULL character (two single quotes) respectively, ie. DLDbars (ToText ({Orders.Order ID},0 ,'' ),,) In this case we actually require at least 13 digits to create a barcode, so we we artificially enlarge the data by prefixing the Order ID data with 123456789: DLDbars ((123456789 + ToText ({Orders.Order ID},0 ,'' )),,) 9. Now complete the other three DLDbars parameters with the mode and columns parameters, each enclosed in quotation marks, eg. DLDbars ((123456789 + ToText ({Orders.Order ID},0 ,'' )), "4","0") [Mode 4 will created a Stacked Omnidirectional symbol] 10. Now click on the Save and Close icon to return to the Field Explorer and the formula named by you will be present in the list. Double-click on the formula name the move the cursor to locate the object (ie. the barcode) where you want it on the report. 11. Finally select the barcode object, right click on it, choose Format Field from the drop down menu, and click on the Font tab in the displayed dialog box. From the list of fonts presented select the dL Databar font you require and select a suitable size (typically 24 - 48 point in this case). The character spacing must be left at 0, otherwise the barcodes will look nice but wont scan. Then click on OK. 12 Return to the report's Preview display and you should have a perfect barcode. If you are using data from a database as the data source for the barcode, then the barcode will change as you navigate around the record source.

To make changes to the barcode formula


Open the report in Design view, right click on the barcode (or its' empty box) and select Edit Field Object from the drop down menu. Follow the procedure above to replace the formula. Note that invalid barcodes will not be visible.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 29

Function parameters
The function is DLDbars(szIn, szMode,szColumns) where szIn is the string containing the data text for the barcode szMode is a string version of the Mode parameter szColumns is a string version of the Columns parameter

30 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

QR Code barcodes
QR Code is a matrix symbology consisting of a square array of modules with a finder pattern located at three corners. A wide range of symbol sizes is supported along with four levels of error correction, and the symbology is noted for its high data density.

The dLSoft libraries support QR Code Version 2 in Numeric, Alphanumeric and Byte modes. (Kanji mode is supported by some but not all components). The maximum data capacity of the symbols (at Level 0 error correction) are: Numeric data 7089 digits Alphanumeric data 4296 characters Byte data 2953 bytes Note that Alphanumeric includes digits and uppercase letters, the space and the $ % * + - . / : characters only. The Reed-Solomon error correction allows the following recovery of damaged codewords: Level 0: 7% Level 1: 15% Level 2: 25% Level 3: 30%

Micro QR Code
The dLSoft Libraries also support Micro QR Code. Micro QR Code is a very small QR Code that fits applications that require a smaller space and use smaller amounts of data, such as ID of printed circuit boards and electronics parts, etc. The efficiency of data encoding has been increased with the use of only one position detection pattern. The capacity of Micro QR Code symbols at the lowest error correction level is: Numeric data 35 digits Alphanumeric data 21 characters Byte data 15 bytes

The QR Code Fonts


The QR font system includes TrueType and PostScript fonts for creating QR barcodes by printing characters to generate bars and spaces. QR barcodes are made up of bars and spaces that may be 1 or more units wide. The dLSoft QR fonts uses the ASCII characters 0 (zero) - z to represent 64 combinations of 6 bars and spaces as shown in the font table at the end of this document, where a 1 is a bar and a 0 is a space. The individual characters are made up of six square in a pattern 3 high by 2 wide, with each square representing a bit of a 6 bit binary value.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 31

The dLSoft QR fonts are provided in different weights, to allow for ink spread during wet ink printing and the line broadening found in several printers designed for use with personal computers. Font name
AZTW AZTR AZTN

weight
full size 5% width reduction 10% width reduction

(QR Code fonts are the same as the Aztec fonts) Users should determine which font weight is suitable for their printer by testing each font weight. It should be noted that if gaps between the font squares are clearly visible then the barcode will not scan correctly.

The DQRDF DLL


To convert a string of characters into the bars and spaces required for the barcode requires converting the character string into another string made up of only the 0 - z characters present in the QR font. The following DLLs will perform the conversion: DQRDF.DLL 32 bit ANSI version DQRDFU.DLL 32 bit Unicode version DQRDF64.DLL 64 bit ANSI version DQRDF64U.DLL 64 bit Unicode version The DLLs provide three function calls which can either return the required string, copy it to the clipboard, or save it to a named disk file. These functions may be called from Visual Basic (including Visual Basic for Applications in Microsoft Office), Visual C++, Visual Foxpro, Delphi, C++ Builder, and in fact virtually every language that can make DLL calls. The functions are called with parameters that specify the options available for the barcode: Code a pointer to an integer which specifies the code type: 0 for QR Code, or 1 for Micro QR Code. szIn is a pointer to a string containing the bytes used as data to create the barcode. While passed as a text string, the string can contain non-text bytes (including ASCII 0) provided that the length parameter (n) is used to specify the length of the data. If n is 0, then the string is assumed to be a null-terminated ASCII string. flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0. n a pointer to an integer which is either 0 or specified the length of the data in szIn. mode a pointer to an integer specifying the mode of the QR Code barcode created. The allowed values are: 0 for Numeric mode 1 for Alphanumeric mode 2 for Byte mode 3 for Kanji mode.

Dqrdf Function calls


The available function calls are:

32 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Bar2Dqrf ()
- creates text for the QR Code font and returns the text in szOut Declared for C as int WINAPI Bar2Dqrf(LPINT code, LPSTR szIn,LPINT n, LPINT flags, LPINT sec, LPINT mode, LPSTR szOut); where code specifies the barcode type required (0 for QR Code, 1 for Micro QR Code) szIn is a pointer to a string containing the text which is to be converted into the barcode; n is normally 0; otherwise it may be the number of characters in the string if the string is to be interpreted as a byte stream, flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0.. mode specifies the mode, sec is the security level and szOut is a pointer to a string which will receive the characters to be rendered in the QR (AZT) font. The security level has allowed values of 0 3 for all modes for QR Code, or 0 2 for Micro QR Code. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dqrf Lib "dqrdf" (ByRef c As Long, ByVal szIn As String, ByRef n As Long, ByRef flg, ByRef sec As Long, ByRef mo As Long, ByRef szOut As String) As Long

Bar2Dqrc ()
- creates text for the QR font and copies it to the Windows clipboard Declared for C as int WINAPI Bar2Dqrc(LPINT code, LPSTR szIn,LPINT n, LPINT flags, LPINT sec, LPINT mode ); where code specifies the barcode type required (0 for QR Code, 1 for Micro QR Code) szIn is a pointer to a string containing the text which is to be converted into the barcode; n is normally 0; otherwise it may be the number of characters in the string if the string is to be interpreted as a byte stream, flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0.. mode specifies the mode, sec is the security level and szOut is a pointer to a string which will receive the characters to be rendered in the QR (AZT) font. The security level has allowed values of 0 3 for all modes for QR Code, or 0 2 for Micro QR Code. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dqrc Lib "dqrdf" (ByRef c As Long, ByVal szIn As String, ByRef n As Long, ByRef fl, ByRef sec As Long, ByRef mo As Long) As Long

Bar2Dqrw ()
- creates text for the QR font and writes to file szFilename Declared for C as int WINAPI Bar2Dqrw(LPINT code, LPSTR szIn,LPINT n, LPINT flags, LPINT sec, LPINT mode, LPSTR szFilename);

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 33

where code specifies the barcode type required (0 for QR Code, 1 for Micro QR Code) szIn is a pointer to a string containing the text which is to be converted into the barcode; n is normally 0; otherwise it may be the number of characters in the string if the string is to be interpreted as a byte stream, flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0.. mode specifies the mode, sec is the security level. The security level has allowed values of 0 3 for all modes for QR Code, or 0 2 for Micro QR Code. szFilename is a pointer to a string that contains the full pathname of the file to receive the text. If the file exists it will be overwritten. If it does not exist it will be created if possible. The call returns the number of bytes written to file, which is 0 in the event of a barcode creation error, or -1 in the event of a file creation error. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dqrw Lib "dqrdf" (ByRef c As Long, ByVal szIn As String, ByRef n As Long, ByRef fl, ByRef sec As Long, ByRef mo As Long, ByRef szFilename As String) As Long

Bar2Dqrd ()
- decodes text strings previously encoded using Bar2Dqrf(),Bar2Dqrc(), or Bar2Dqrw(). Declared for C as int WINAPI Bar2Dqrd(LPSTR szIn, LPSTR szOut); where szIn is a pointer to a string containing the barcode which is to be decoded; szOut is a pointer to a string that will receive the decoded output. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dqrd Lib "aztdf" (ByVal szIn As String, ByRef szOut As String) As Long

The QR control
The QROCX control is an Active-X control which simplifies the use of barcodes in Active-X containers such as Visual Basic and MS Access. The QROCX control may be placed on a form in most applications which support Active-X controls, such as Visual Basic, Microsoft Access, etc. The QR barcode properties may be specified through a series of Properties, either via programming, or by setting the properties in the controls property pages.

Placing the QR control on a form

Visual Basic
To add the control to a Visual Basic project select Components from the Project menu, then select QROCX Active-X Control module from the list of controls displayed and push the OK button. The modules icon will appear in the Toolbox. The control may then be added to a form by clicking on the controls icon and then drawing a rectangle for the control on the required form.

34 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

If the control is to be visible then the area allowed should be large enough to hold the largest barcode required. If the control is to be hidden, then the size is irrelevant. Once added to a form, selection of the control will show the available properties in Visual Basics properties window.

VB.NET and C#
The control may be added to the Visual Studio.NET Toolbox by right clicking on the Toolbox and selecting Add/Remove Items (or Choose Items for VS 2005) from the pop-up menu displayed, then checking the control in the list presented. The control will then appear as an icon on the Toolbox.

Access
To add the control to an Access Form or Report, open the form or report in Design view and ensure that the Toolbox is visible (its on the View menu). Select the More controls icon on the Toolbox and then select the QROCX Active-X Control module from the list of controls displayed. Draw a rectangle for the control on the from or report. Once added to a form or report, selection of the control will show the available properties in Accesss properties window. The font should be set by right-clicking on the control and choosing the QRocx control properties from the displayed menu.

QR Control Property pages


The control also has its own property pages which may be accessed by right-clicking on the control and selecting Properties from the displayed menu.

General Property page


This permits the setting of the barcodes mode (Numeric, Alphanumeric, Byte) and security level properties, and allows the control to be set to resize itself each time it is drawn

Data Property page


The edit box on this page shows the data currently being used to generate the barcode image. It is useful only for displayable characters. To provide data which includes non-printable characters the Caption property should be set via programming.

Font Property page


This page allows the user to select the barcode font and font size used to generate the barcode.

Colors Property page


This page allows the user to specify the foreground (the bars) and background color of the barcode generated. In general barcodes should be produced with a black foreground and a white background color.

The QR Control Properties


The control has the following properties which may be set in the property pages or programmatically with Visual Basic. Caption: (BSTR) the data which will be converted into a barcode

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 35

CodeType: (integer) 0 specifies QR Code, 1 specifies Micro QR Code. AutoSize: (Boolean) if non-zero causes the control to resize itself to contain the barcode. BackColor: (Colorref) the background color CapLength: (integer) normally 0, in which case the length of the data string in the Caption property is determined automatically. If non-zero it is taken to be the number of characters in the Caption property to be used as data. Errorcode: (integer) a non-zero value is returned if the data supplied in the Caption property can be converted into a valid barcode. Flags: (integer) if bit 7 is set (ie 128) the data is encoded as Unicode, otherwise as ANSI. Note it is not necessary to set this Flag for Kanji mode. Font: (Font) the font in which the Output characters will be displayed ForeColor: (Colorref) the color of the bars in the barcode Level: (integer, 0 - 3) the security level for the generated barcode (see the DLL above for a description) Mode: (integer) the mode used to generate the barcode; 0 for Numeric mode 1 for Alphanumeric mode 2 for Byte mode 3 for Kanji mode. Note: it is not necessary to set the Flags bit 7 when encoding in Kanji mode. Output: (CString) the characters which when displayed in the correct font, produce the barcode. Note that this string may be much larger than the Caption string. In addition the control supports the normal Active-X properties, such as Visible, Height, Width, etc.

QR Code .NET Managed Component


Developer versions require the developers serial number to be passed to the component using the Serial property before the Barcode() method is called. The Serial property should be set to the serial number provided for your product, e.g. Qrcnet1.Serial="12345" for VB qrcnet1.Serial="12345"; for C# qrcnet1.set_Serial("12345"); for J# Use of an incorrect serial number will result in randomly scrambled symbols. Main properties and methods are shown below; others are listed in the Common .NET component features section

QR.NET Properties

ByteNumber
Type: integer Default: 0 Allowed values: 0 barcode byte capacity

36 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

When ByteValue is greater than 0 the Caption string (which is a Unicode string) is unpacked into 8-bit ASCII characters before the data is used to generate the barcode ie. Only the low-order byte of each character is used. When ByteNumber is 0 the Caption string is converted to bytes according to the length of each character in the string. (see also Flag)

Caption
Type: string Default: "0123456789" Allowed values: Any text string. Note: only text strings recognised as valid barcodes will result in a barcode picture. An Illegal character in the text string will cause an Error value to be set.

CodeType
Type: bCode enumeration member Default: bCode.QRCode Allowed values: bCode.QRCode, bCode,MicroQR

CodeTypeValue
Type: integer Default: 0 Allowed values: 0 or 1 The barcode type can be set using either the CodeType property or the CodeTypeValue property

Flag
Type: Boolean Default: false Allowed values: true or false When Flag is set to true the Caption data is treated as a Unicode string and converted to a byte stream. When Flag is false the Caption data is handled as described for the ByteNumber property.

StartMode
Type: integer Default: 0 Allowed values: 0 = Numeric mode 1 = Alphanumeric mode 2= Byte mode 3=Kanji mode

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 37

SecurityLevel
Type: integer Default: 0 Allowed values: 0 - 3. (0 2 for Micro QR Code symbols)

QR.NET Methods

Barcode()
Return Type: string This method causes a barcode to be created as a sequence of character that, when displayed in the AZTx font will form the barcode symbol. Note that the barcode symbol is determined only when this method is called, so the information properties are not set until this method has been called.

BarDecode(string bc)
Return Type: string This method returns a string decoded from the barcode passed as parameter bc. Note that bc is a barcode created by the Barcode() method.

The dFontQR Java class


The dFontQR Java class may be used to return strings that contain rows of characters that, when displayed in the AZT font form a QR Code symbol. The class may be used directly or through the dFontQR.jar provided. The class is instantiated with the new command: dFontQR qr1=new dFontQR(); and the required properties set using the setCodeType(), setModeType() and setLevel() methods. The data is supplied to the class using the setCaption() methods and the update) method called to generated the barcode characters. The number of rows of characters in the resulting barcode may be obtained from the getNStrings() method, and each line of the barcode returned using getBarcodeString(i), eg. //g is output graphics screen or printer // ht is the chose font height in points //x and y are the top left coordinated required for the symbol n=qr1.getNStrings(); for (i=0; i<n; i++) { g.drawString(qr1.getBarcodeString(i),x,(y+i*ht)); } Details of the properties and methods implemented in the java class are given in the Common Java class Features section

38 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

The QR Code UFL for Crystal Reports


While a UFL for Crystal Reports is included with the kit, limitations of the Crystal Reports formula model require that larger barcodes should be stored in the underlying database rather than generated through a formula. The Crystal Reports UFL (User Function Library - U2LQRDF.DLL) is installed into the Windows\System32 directory, and the associated sample files are placed in the installation directory of your Barcode Font kit. Most modern versions of Crystal can access the UFL from the Windows\System32 directory; but if you are using an older version you may need to copy it to a directory where Crystal can find it. Typically this will be the directory holding the Crystal Reports executable file (CRW32.exe), c:\Program Files\Seagate Software\Crystal Reports for CR 8, or \Program Files\Common Files\Crystal Decisions\2.0\bin for CR 9. It is important to note that Crystal Reports sets a limit on the number of characters that can be displayed from a formula. Consequently only relatively small QR barcodes (100 characters maximum) may be generated using this UFL. This is not a limitation of the dLSoft QR barcode font, but an inherent feature of Crystal Reports. Note that if you add barcode to reports using the Testware version and subsequently upgrade to the full version, you must delete the function and recreate it - otherwise the barcodes will continue to be scrambled.

Running the sample


The sample report included with the kit is "Order Packing ListQR.rpt" which will be found in the crystal subdirectory of the kits installation directory. This is a modified version of the "Order Packing List.rpt" report included with the Crystal Reports Xtreme Mountain Bike Inc samples. If you do not have the samples installed on your system then the modified sample report will not work and you should skip to the section "Creating a barcode on a report" below. Also the report displays barcodes using the AZTW font; if you have not installed that font the report will not display a barcode - but a collection of characters. (You can change the barcode font to one you have installed as described below, and the barcode will then display correctly.) The "Order Packing ListQR.rpt" sample may be run on a machine that contains a full Crystal Reports installation just by double clicking on the report file. A barcode is included on the report with its data taken from the Order ID field of the data. Switching the report to Design view, Right-clicking on the barcode and selecting Edit Field Object from the drop-down menu displays the Function (DLQRbars) and parameters used to generate the barcode. The first parameter is the barcode data (a string), the second parameter is an integer that specifies the security level, and the final parameter can be used to specify mode.

Creating a QR barcode on a report


To create your own barcode on a report follow the steps below: 1. Open the report in Design view 2. Select Field Object from the Insert menu 3. Select the Formula Fields item in the dialog box; ensure that the item becomes highlighted. 4. Either hold down the Control key and press N, or select the New icon in the toolbar. 5. Enter a name for the formula - such as barcode1 - then push the OK button. The Formula Editor appears. 6. From the list of Functions (normally the middle list) scroll down to the Additional Functions item; the expand this item by click on the + symbol alongside the Additional Items name. 7. Select the DLQRbars function from the list, then either double click on it or press the Enter key; the function then appears in the formula box below the lists, complete with its parameter brackets and commas, and the cursor in the position of the first parameter. ie. DLQRbars (,,,)

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 39

8. The first parameter must be a string containing the barcode data. This can be a literal string (ie. data enclosed in quotation marks, such as "1234"), or field data. If field data is to be used it must be text data - so if the required field actually contains numeric data this must be converted into text data. If a required data field contains text data just double click on the field name in the list of Report Fields, and the field name enclosed in curly brackets will be copied to the function's first parameter position. eg. DLQRbars ({@address1&2},,,) If a required field contains numerical data then expand the Strings item in the list of functions and the expand the ToText function; Now select the required function - which will usually be ToText(x,y,z) where the x represent the number to be used as data, y represent the number of decimal places (typically 0) and z is a character used to separate thousands from hundreds etc (which unfortunately defaults to a comma and is generally not wanted in a barcode). Double click on the required version of the ToText function and this will be copied to the first parameter position of the DLQRbars function, with the cursor now placed in the first parameter position of the ToText function, ie. DLQRbars (ToText (, , ),,,) Now double click on the required data source field in the list of Report fields, eg. DLQRbars (ToText ({Orders.Order ID}, , ),,,) and fill in the other two ToText parameters with a 0 (the number of decimal places) and a NULL character (two single quotes) respectively, ie. DLQRbars (ToText ({Orders.Order ID},0 ,'' ),,,) 9. Now complete the other three DLQRbars parameters with the codetype, mode and security level parameters, each enclosed in quotation marks, eg. DLQRbars (ToText ({Orders.Order ID},0 ,''),0,"0","2") 10. Now click on the Save and Close icon to return to the Field Explorer and the formula named by you will be present in the list. Double-click on the formula name the move the cursor to locate the object (ie. the barcode) where you want it on the report. 11. Finally select the barcode object, right click on it, choose Format Field from the drop down menu, and click on the Font tab in the displayed dialog box. From the list of fonts presented select the AZ.. font you require and select a suitable size (typically 4 - 10 point). The character spacing must be left at 0, otherwise the barcodes will look nice but wont scan. Then click on OK. 12 Return to the report's Preview display and you should have a perfect barcode. If you are using data from a database as the data source for the barcode, then the barcode will change as you navigate around the record source.

To make changes to the barcode formula


Open the report in Design view, right click on the barcode (or its' empty box) and select Edit Field Object from the drop down menu. Follow the procedure above to replace the formula. Note that invalid barcodes will not be visible.

Function parameters
The function is DLQRbars(szIn, szCode,szMode, szLevel) where

40 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

szIn is the string containing the data text for the barcode szCode is a string version of the CodeType parameter szMode is a string version of the mode parameter szLevel is a string version of the QR Code security level

PDF417 barcodes
PDF417 (Portable Data File 417) is a stacked barcode symbology capable of encoding over a kilobyte of data in a symbol.

PDF417 may include extensive error-correction enabling data to be recovered from a symbol that has been damaged or corrupted. There are 900 different patterns (codewords) which may be incorporated into a PDF417 symbol, and several modes available for encoding.

Encoding Modes
EXC (Extended Alphanumeric Compaction mode) - allows encoding of all printable ASCII characters into about 2 characters per codeword. Within the EXC mode there are several submodes: Binary/ASCII Plus mode - allows encoding of 256 international characters including the full ASCII set plus any 8-bit value in the range 0 - 255. This mode allows encoding approximately 1.2 bytes per codeword and so is considerable less efficient than EXC mode. Numeric mode - allows encoding of a string of digits with a density of approximately 2.95 digits per codeword. Recommended where more than 13 digits are to be encoded. Numeric mode symbols may not contain non-numeric characters. The maximum capacity of PDF417 symbols is approximately as follows: Numeric mode maximum capacity 2700 digits* Alphanumeric text maximum capacity 1800 characters* Byte values maximum capacity 1100 bytes *Note that capital letters, punctuation, mode shifts and new lines/paragraphs reduce these value.

Security level
One of PDF417s most valuable features is its ability to allow correction of errors. This ability is provided by the inclusion of additional codewords within the symbol, so that the data codewords may be reconstructed even if some are defaced or misread.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 41

The number of damaged codewords (Nmax) which may be recovered depends on the security level (which in turn determines the number of additional characters included in the symbol)

Security level
0 1 2 3 4 5 6 7 8

Nmax
0 2 6 14 30 62 126 154 510

Aspect ratio
PDF417 symbols may be reproduced with different number of codewords per row, and therefore in several different height to width ratios. The user may select either target ratio (as the height to width ratio) or the required number of codewords per row. In general tall, thin barcodes read more reliably than short, wide symbols, although there may be restrictions applied by the type of barcode scanner employed. Appended symbols are not supported at this time.

Micro PDF 417


MicroPDF417 is a multi-row symbology based on PDF417 designed for applications requiring a greater area efficiency but lower data capacity than PDF417. A specific and limited set of symbol sizes is available, each size including a fixed level of error correction. MicroPDF417 provides for three encoding modes: Text, Byte and Numeric compaction. Text is for general text, Numeric for encoding data consisting only of digits, and Byte to allow for the first 127 ASCII characters but with a reduced level of efficiency. Four symbol widths are permitted, each specifying the number of data columns (1 4). Within each symbol width a variable number of rows provide for a maximum data capacity of: Text compaction mode 0: 250 characters (2 data characters per codeword) Byte compaction mode 1: 150 characters (1.2 data characters per codeword) Numeric compaction mode 2: 366 characters (2.93 data characters per codeword) The Level parameter for MicroPDF barcodes set the number of data columns within the barcode, which may be 1 4. The industry standard Macro sequences [)>{RS}05{GS} and [)>{RS}06{GS} are supported (where {RS} represents ASCII 30 and {GS} is ASCII 29). The following character translations are made when the value of the mode parameter is increase by 8. String converted to

42 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

{ET} {FS} {GS} {RS}

ASCII 4 ASCII 28 ASCII 29 ASCII 30

Appended symbols are not supported at this time.

The PDF font


The PDF417 font system includes TrueType and PostScript fonts for creating PDF barcodes by printing characters to generate bars and spaces. PDF barcodes are made up of bars and spaces that may be 1 to 8 units wide. The dLSoft PDF fonts uses the characters 0 (zero) - z to represent 64 combinations of 6 bars and spaces as shown in the font table at the end of this document, where a 1 is a bar and a 0 is a space, arranged as a 6 bit binary number. The dLSoft PDF fonts are provided in four element height/width ratios: Font name
PD2x PD3x PD4x PD5x

element height/width ratio


2:1 3:1 4:1 5:1

The dLSoft fonts are also provided in different weights, to allow for ink spread during wet ink printing and the line broadening found in several printers designed for use with personal computers. Font name
PDnW PDnR PDnN

weight
full size 8% width reduction 16% width reduction

Users should determine which font weight is suitable for their printer by testing each font weight.

The PDFDF DLL


To convert a string of characters into the bars and spaces required for the barcode requires converting the character string into another string made up of only the characters present in the PDF font. PDFDF.DLL 32 bit ANSI version PDFDFU.DLL 32 bit Unicode version PDFDF64.DLL 64 bit ANSI version PDFDF64U.DLL 64 bit Unicode version

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 43

The DLLs provide three function calls which can either return the required string, copy it to the clipboard, or save it to a named disk file. These functions may be called from Visual Basic (including Visual Basic for Applications in Microsoft Office), Visual C++, Visual Foxpro, Delphi, C++ Builder, and in fact virtually any language that can make DLL calls. The functions are called with parameters that specify the options available for the barcode: Code a pointer to an integer that specifies the barcode type: Code parameter
0 1 2

Symbol type
PDF417 barcodes MicroPDF barcodes Truncated PDF417

szIn is a pointer to a string containing the bytes used as data to create the barcode. While passed as a text string, the string can contain non-text bytes (including ASCII 0) provided that the length parameter (n) is used to specify the length of the data. If n is 0, then the string is assumed to be a null-terminated ASCII string. n a pointer to an integer which is either 0 or specified the length of the data in szIn. flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0. columns a pointer to an integer which specifies the number of codeword columns in the barcode pattern generated. Allowed values are 0 100. For PDF417 values less than 3 are ignored. For MicroPDF only values 1 4 are permitted. level a pointer to an integer specifying the security level of the barcode generated. Allowed values are shown in the table above. start a pointer to an integer specifying the mode in which the barcode starts. The allowed values are shown below. Start parameter
0 1 2 3 4 5

Start mode
EXC Alpha EXC Lower EXC Mixed EXC Punctuation. Binary/ASCII Plus Numeric mode

For MicroPDF barcodes the Start parameter (or Compaction mode) may be Start Parameter
0 1 2

Start Mode
Text compaction Byte compaction Numeric compaction

Pdfdf Function calls


The available function calls are:

44 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Bar2Dpdf ()
- creates text for PDF font and returns text in szOut Declared for C as int WINAPI Bar2Dpdf(LPINT code, LPSTR szIn,LPINT n, LPINT flags, LPINT columns, LPINT level, LPINT start, LPSTR szOut); where code is a pointer to an integer that holds the codetype either 0 (for PDF417 barcodes), 1 (for MicroPDF barcodes) or 2 (for Truncated PDF417). szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0. columns a pointer to an integer which specifies the number of codeword columns in the barcode pattern generated. Allowed values are 0 100. For PDF417 values less than 3 are ignored. For MicroPDF only values 1 4 are permitted. level is the security level, start is the mode in which the barcode should start (normally 0), and szOut is a pointer to a string which will receive the characters to be rendered in the PDF font. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dpdf Lib "pdfdf" (ByRef cd As Long, ByVal szIn As String, ByRef n As Long, ByRef flg As Long, ByRef ap As Long, ByRef lv As Long, ByRef st As Long, ByRef szOut As String) As Long

Bar2Dpdc ()
- creates text for PDF font and copies to the Windows clipboard Declared for C as int WINAPI Bar2Dpdc(LPINT code, LPSTR szIn,LPINT n, LPINT flags, LPINT columns, LPINT level, LPINT start); where code is a pointer to an integer that holds the codetype either 0 (for PDF417 barcodes), 1 (for MicroPDF barcodes) or 2 (for Truncated PDF417). szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0. columns a pointer to an integer which specifies the number of codeword columns in the barcode pattern generated. Allowed values are 0 100. For PDF417 values less than 3 are ignored. For MicroPDF only values 1 4 are permitted. level is the security level, and start is the mode in which the barcode should start (normally 0). Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dpdc Lib "pdfdf" (ByRef cd As Long, ByVal szIn As String, ByRef n As Long, ByRef flg As Long,ByRef ap As Long, ByRef lv As Long, ByRef st As Long) As Long

Bar2Dpdd ()
- decodes text strings previously encoded using Bar2Dpdf(),Bar2Dpdc(), or Bar2Dpdw(). Declared for C as int WINAPI Bar2Dpdd(LPSTR szIn, LPSTR szOut);

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 45

where szIn is a pointer to a string containing the barcode which is to be decoded; szOut is a pointer to a string that will receive the decoded output. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dpdd Lib "aztdf" (ByVal szIn As String, ByRef szOut As String) As Long

Bar2Dpdw ()
- creates text for PDF font and writes to file szFilename Declared for C as int WINAPI Bar2Dpdw(LPINT code, LPSTR szIn,LPINT n, LPINT flags, LPINT columns, LPINT level, LPINT start, LPSTR szFilename); where code is a pointer to an integer that holds the codetype either 0 (for PDF417 barcodes), 1 (for MicroPDF barcodes) or 2 (for Truncated PDF417). szIn is a pointer to a string containing the text which is to be converted into the barcode; n is the number of characters in the string (or 0 in which case the string may not contain NULL characters), flags may be used in the Unicode versions to force encoding the data as Unicode by setting bit 7 to 1. (ie. 128). Otherwise this value should be 0. columns a pointer to an integer which specifies the number of codeword columns in the barcode pattern generated. Allowed values are 0 100. For PDF417 values less than 3 are ignored. For MicroPDF only values 1 4 are permitted. start is the mode in which the barcode should start (normally 0), level is the security level, and szFilename is a pointer to a string which contains the full pathname of a file to receive the string of characters which represent the barcode when rendered in the PDF font. The call returns the number of bytes written to file, which is 0 in the event of a barcode creation error, or -1 in the event of a file creation error. Basic Declaration (VB6 & VBA) Private Declare Function Bar2Dpdw Lib "pdfdf" (ByRef cd As Long, ByVal szIn As String, ByRef n As Long, ByRef flg As Long, ByRef ap As Long, ByRef lv As Long, ByRef st As Long, ByRef szFilename As String) As Long

The PDF417 control


The PDFOCX control is an Active-X control which simplifies the use of barcodes in Active-X containers such as Visual Basic and MS Access. ThePDFOCX control may be placed on a form in most applications which support Active-X controls, such as Visual Basic, Microsoft Access, etc. The PDF417 barcode properties may be specified through a series of Properties, either via programming, or by setting the properties in the controls property pages.

Placing the PDF417 control on a form

Visual Basic
To add the control to a Visual Basic project select Components from the Project menu, then select PDFOCX Active-X Control module from the list of controls displayed and push the OK button. The modules icon will appear in the

46 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Toolbox. The control may then be added to a form by clicking on the controls icon and then drawing a rectangle for the control on the required form. If the control is to be visible then the area allowed should be large enough to hold the largest barcode required. If the control is to be hidden, then the size is irrelevant. Once added to a form, selection of the control will show the available properties in Visual Basics properties window.

VB.NET and C#
The control may be added to the Visual Studio.NET Toolbox by right clicking on the Toolbox and selecting Add/Remove Items (or Choose Items for VS 2005) from the pop-up menu displayed, then checking the control in the list presented. The control will then appear as an icon on the Toolbox.

Access
To add the control to an Access Form or Report, open the form or report in Design view and ensure that the Toolbox is visible (its on the View menu). Select the More controls icon on the Toolbox and then select the PDFOCX Active-X Control module from the list of controls displayed. Draw a rectangle for the control on the from or report. Once added to a form or report, selection of the control will show the available properties in Accesss properties window. The font should be set by right-clicking on the control and choosing the Pdfocx control properties from the displayed menu.

PDF417 Property pages


The control also has its own property pages which may be accessed by right-clicking on the control and selecting Properties from the displayed menu.

General Property page


This permits the setting of the barcodes type and encoding mode, aspect ratio and security level properties, and allows the control to be set to resize itself each time it is drawn. Note that unlike the DLL the columns value specified on the property pages is the real (floating point) value, eg. 1.0 or 0.5, etc.

Data Property page


The edit box on this page shows the data currently being used to generate the barcode image. It is useful only for displayable characters. To provide data which includes non-printable characters the Caption property should be set via programming.

Font Property page


This page allows the user to select the barcode font and font size used to generate the barcode.

Colors Property page


This page allows the user to specify the foreground (the bars) and background color of the barcode generated. In general barcodes should be produced with a black foreground and a white background color.

The PDF417 Control Properties


The control has the following properties which may be set in the property pages or programmatically with Visual Basic.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 47

CodeType: (integer) 0 for PDF417, 1 for MicroPDF barcodes, or 2 for Truncated PDF. Caption: (BSTR) the data which will be converted into a barcode Columns: (Real, Single precision) the number of dataword columns in the displayed barcode. AutoSize: (Boolean) if non-zero causes the control to resize itself to contain the barcode. BackColor: (Colorref) the background color CapLength: (integer) normally 0, in which case the length of the data string in the Caption property is determined automatically. If non-zero it is taken to be the number of characters in the Caption property to be used as data. Errorcode: (integer) a non-zero value is returned if the data supplied in the Caption property can be converted into a valid barcode. Flags: (integer) if bit 7 is set (ie 128) the data is encoded as Unicode, otherwise as ANSI. Font: (Font) the font in which the Output characters will be displayed ForeColor: (Colorref) the color of the bars in the barcode SecurityLevel: (integer) the security level for the generated barcode (see the DLL above for a description) StartMode: (integer) the mode used to generate the barcode (see the DLL above for a description). Output: (CString) the characters which when displayed in the correct font, produce the barcode. Note that this string may be much larger than the Caption string. In addition the control supports the normal Active-X properties, such as Visible, Height, Width, etc.

PDF417 .NET Managed Component


Developer versions require the developers serial number to be passed to the component using the Serial property before the Barcode() method is called. The Serial property should be set to the serial number provided for your product, e.g. Pdfnet1.Serial="12345" for VB pdfnet1.Serial="12345"; for C# pdfnet1.set_Serial("12345"); for J# Use of an incorrect serial number will result in randomly scrambled symbols. Main properties and methods are shown below; others are listed in the Common .NET component features section

PDF417.NET Properties

ByteNumber
Type: integer Default: 0 Allowed values: 0 barcode byte capacity When ByteValue is greater than 0 the Caption string (which is a Unicode string) is unpacked into 8-bit ASCII characters before the data is used to generate the barcode ie. Only the low-order byte of each character is used. When ByteNumber is 0 the Caption string is converted to bytes according to the length of each character in the string. (see also Flag)

48 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Caption
Type: string Default: "0123456789" Allowed values: Any text string. Note: only text strings recognised as valid barcodes will result in a barcode picture. An Illegal character in the text string will cause an Error value to be set.

CodeType
Type: bCode enumeration member Default: bCode.PDF417 Allowed values: bCode.PDF417, bCode.MicroPDF or bCode.Truncated

CodeTypeValue
Type: integer Default: 0 Allowed values: 0 ( for PDF417) or 1 (for MicroPDF) or 2 (for Truncated) The barcode type can be set using either the CodeType property or the CodeTypeValue property

Columns
Type: integer Default: 3 Allowed values: 3 12 Specifies the number of Data codeword columns in a PDF417 symbol (ie. NOT including the columns of start and stop bars). Note: This does NOT apply to MicroPDF symbols, who shape is determined by the security level.

Flag
Type: Boolean Default: false Allowed values: true or false When Flag is set to true the Caption data is treated as a Unicode string and converted to a byte stream. When Flag is false the Caption data is handled as described for the ByteNumber property.

StartMode
Type: integer Default: 0 Allowed values: For PDF417 symbols:

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 49

Start parameter
0 1 2 3 4 5

Start mode
EXC Alpha EXC Lower EXC Mixed EXC Punctuation. Binary/ASCII Plus Numeric mode

For MicroPDF barcodes the StartMode parameter (or Compaction mode) may be Start Parameter
0 1 2

Start Mode
Text compaction Byte compaction Numeric compaction

SecurityLevel
Type: integer Default: 0 Allowed values: 0 - 8. for PDF417; 1 4 for MicroPDF.

PDF417.NET Methods

Barcode()
Return Type: string This method causes a barcode to be created as a sequence of character that, when displayed in the PDxx font will form the barcode symbol. Note that the barcode symbol is determined only when this method is called, so the information properties are not set until this method has been called.

BarDecode(string bc)
Return Type: string This method returns a string decoded from the barcode passed as parameter bc. Note that bc is a barcode created by the Barcode() method.

50 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

The dFontPDF Java class


The dFontPDF Java class may be used to return strings that contain rows of characters that, when displayed in one of the PDxx fonts form a PDF417 or MicroPDF symbol. The class may be used directly or through the dFontPDF.jar provided. The class is instantiated with the new command: dFontPDF pd1=new dFontPDF(); and the required properties set using the setCodeType(), setColumns(), setModeType() and setLevel() methods. The data is supplied to the class using the setCaption() methods and the update) method called to generated the barcode characters. The number of rows of characters in the resulting barcode may be obtained from the getNStrings() method, and each line of the barcode returned using getBarcodeString(i), eg. //g is output graphics screen or printer // ht is the chose font height in points //x and y are the top left coordinated required for the symbol n=pd1.getNStrings(); for (i=0; i<n; i++) { g.drawString(pd1.getBarcodeString(i),x,(y+i*ht)); }

CodeType property
Type: integer Default: Allowed values: Barcode PDF417 MicroPDF417 CodeType 0 1 0

Columns property
Type: integer Default: 3 Allowed values: 3 - 12 This property specifies the number of data codeword columns (i.e not including the start and stop bar columns) desired in the symbol. Details of the other properties and methods implemented in the java class are given in the Common Java class Features section

The PDF417 UFL for Crystal Reports


While a UFL for Crystal Reports is included with the kit, limitations of the Crystal Reports formula model require that larger barcodes should be stored in the underlying database rather than generated through a formula. The Crystal Reports UFL (User Function Library - U2LPDFDF.DLL) is installed into the Windows\System32 directory, and the associated sample files are placed in the installation directory of your Barcode Font kit. Most modern versions of Crystal can access the UFL from the Windows\System32 directory; but if you are using an older version you may need

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 51

to copy it to a directory where Crystal can find it. Typically this will be the directory holding the Crystal Reports executable file (CRW32.exe), c:\Program Files\Seagate Software\Crystal Reports for CR 8, or \Program Files\Common Files\Crystal Decisions\2.0\bin for CR 9. It is important to note that Crystal Reports sets a limit on the number of characters that can be displayed from a formula. Consequently only relatively small PDF417 barcodes (70 characters maximum) may be generated using this UFL. This is not a limitation of the dLSoft PDF417 barcode font, but an inherent feature of Crystal Reports. Note that if you add barcode to reports using the Testware version and subsequently upgrade to the full version, you must delete the function and recreate it - otherwise the barcodes will continue to be scrambled.

Running the sample


The sample report included with the kit is "Order Packing ListPd.rpt" which will be found in the crystal subdirectory of the kits installation directory. This is a modified version of the "Order Packing List.rpt" report included with the Crystal Reports Xtreme Mountain Bike Inc samples. If you do not have the samples installed on your system then the modified sample report will not work and you should skip to the section "Creating a barcode on a report" below. Also the report displays barcodes using the PD3W font; if you have not installed that font the report will not display a barcode - but a collection of characters. (You can change the barcode font to one you have installed as described below, and the barcode will then display correctly.) The "Order Packing ListPd.rpt" sample may be run on a machine that contains a full Crystal Reports installation just by double clicking on the report file. A barcode is included on the report with its data taken from the Order ID filed of the data. Switching the report to Design view, Right-clicking on the barcode and selecting Edit Field Object from the drop-down menu displays the Function (DLPdfbars) and parameters used to generate the barcode. The first parameter is the barcode data (a string), the second parameter is an integer that specifies the Aspect ratio (times 10), the third parameter is an integer that specifies the security level, and the final parameter (normally 0) can be used to specify start mode.

Creating a barcode on a report


To create your own barcode on a report follow the steps below: 1. Open the report in Design view 2. Select Field Object from the Insert menu 3. Select the Formula Fields item in the dialog box; ensure that the item becomes highlighted. 4. Either hold down the Control key and press N, or select the New icon in the toolbar. 5. Enter a name for the formula - such as barcode1 - then push the OK button. The Formula Editor appears. 6. From the list of Functions (normally the middle list) scroll down to the Additional Functions item; the expand this item by click on the + symbol alongside the Additional Items name. 7. Select the DLPdfbars function from the list, then either double click on it or press the Enter key; the function then appears in the formula box below the lists, complete with its parameter brackets and commas, and the cursor in the position of the first parameter. ie. DLPdbars (,,,,) 8. The first parameter must be a string containing the barcode data. This can be a literal string (ie. data enclosed in quotation marks, such as "12345678"), or field data. If field data is to be used it must be text data - so if the required field actually contains numeric data this must be converted into text data. If a required data field contains text data just double click on the field name in the list of Report Fields, and the field name enclosed in curly brackets will be copied to the function's first parameter position. eg.

52 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

DLPdfbars ({@address1&2},,,,) If a required field contains numerical data then expand the Strings item in the list of functions and the expand the ToText function; Now select the required function - which will usually be ToText(x,y,z) where the x represent the number to be used as data, y represent the number of decimal places (typically 0) and z is a character used to separate thousands from hundreds etc (which unfortunately defaults to a comma and is generally not wanted in a barcode). Double click on the required version of the ToText function and this will be copied to the first parameter position of the DLPdfbars function, with the cursor now placed in the first parameter position of the ToText function, ie. DLPdfbars (ToText (, , ),,,,) Now double click on the required data source field in the list of Report fields, eg. DLPdfbars (ToText ({Orders.Order ID}, , ),,,,) and fill in the other two ToText parameters with a 0 (the number of decimal places) and a NULL character (two single quotes) respectively, ie. DLPdfbars (ToText ({Orders.Order ID},0 ,'' ),,,,) 9. Now complete the other four DLPdfbars parameters with the Code type (0 for PDF417, 1 for MicroPDF), Columns (to specify the number of codeword columns in the symbol, or 0 for automatic), level and startmode parameters (see above for a complete list of these), each enclosed in quotation marks, eg. DLPdfbars (ToText ({Orders.Order ID},0 ,''),"0","0","0","0") 10. Now click on the Save and Close icon to return to the Field Explorer and the formula named by you will be present in the list. Double-click on the formula name the move the cursor to locate the object (ie. the barcode) where you want it on the report. 11. Finally select the barcode object, right click on it, choose Format Field from the drop down menu, and click on the Font tab in the displayed dialog box. From the list of fonts presented select the PD.. font you require and select a suitable size (typically 4 - 8 point). The character spacing must be left at 0, otherwise the barcodes won't scan. Then click on OK. 12 Return to the report's Preview display and you should have a perfect barcode. If you are using data from a database as the data source for the barcode, then the barcode will change as you navigate around the record source.

To make changes to the barcode formula


Open the report in Design view, right click on the barcode (or its' empty box) and select Edit Field Object from the drop down menu. Follow the procedure above to replace the formula. Note that invalid barcodes will not be visible.

PDF417 Function parameters


The function is DLPdfbars(szIn, szCodeType, szColumns, szLevel, szStartMode) where szIn is the string containing the data text for the barcode

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 53

szCodeType is a string version of the codetype parameter, 0 for PDF417 or 1 for MicroPDF, eg. "0" szColumns is a string version of the Columns parameter, and is the desired number of codeword columns for the symbol. szLevel is a string version of the PDF417 security level eg. "0" szStartMode is a string version of the mode parameter eg. "0"

Common DLL features


The following calls is common to several font kit DLLs. The XX in the call name is different for each kit as shown below to avoid problems when more than one DLL is used within an application. Aztec DLLs, XX = AZ Databar DLLs, XX = DB Datamatrix DLLs, XX = DM PDF417 DLLs, XX = PD QRCode DLLs, XX = QR

ErrorMessXX()
The ErrorMessXX() function call to the DLL is declared in C as Int WINAPI ErrorMessXX(LPINT errorcode, LPSTR errortext) And is use to obtain in errortext the text string corresponding to the error code pointed to by errorcode. Note that the buffer pointed to by errortext must be declared as at least 36 characters (ie TCHAR errortext[36]) to received the error messages. Applies to all font kits.

EnumModeXX()
The EnumModeXX() function call to the DLL is declared in C as Int WINAPI EnumModeXX(LPINT mode, LPSTR modename) And is use to obtain in mode the text string corresponding to the mode value pointed to by mode. Note that the buffer pointed to by modename must be declared as at least 36 characters (ie TCHAR errortext[36]) to received the error messages. Calls to EnumModeXX return the value of mode if the mode exists, or -1 otherwise. Applies to all font kits.

MaxLevelXX()
The MaxLevelXX() function call to the DLL is declared in C as Int WINAPI MaxLevelXX(LPINT mode) And returns the maximum value of the sercurity level that may be used with the specified mode, or -1 if the mode does not exist. Applies to Aztec, Datamatrix, PDF417 and QR Code kits.

54 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Common .NET component features


Using .NET Components in Visual Studio.NET
Adding a .NET Component to the ToolBox
To add a 2D-Font kit Component to the Visual Studio ToolBox, display the ToolBox and select the Components tab. Right click on the Components pane and select Add/Remove Items.. from the pop-up menu displayed. A dialog box is displayed listing the currently installed components. Ensure that the .NET Framework Components page is displayed. Push the Browse button and navigate to the location where you have installed or copied your .NET component and select the DLL (e.g. Aztnet.dll). Then push the Open button. The list of installed components is now displayed, including your 2D-font.NET component. Ensure that the checkbox alongside the component name is checked. Now push the OK button. The component appears as an icon on the ToolBox Components pane, with one of the following class names alongside:
Component Aztec Font Kit.NET Datamatrix Font.NET QR Code Font.NET PDF417 Font.NET .NET name Aztnet Dmfnet Qrcnet Pdfnet DLL Aztnet.dll Dmfnet.dll Qrcnet.dll Pdfnet.dll

Adding a .NET component to a project.


With a project's form open in design mode drag the .NET component icon from the toolbox onto the form. The component icon appears on the panel below the form it does NOT appear on the form itself. The instance of the component will be given a default name (eg Aztnet1) which appears in the properties panel when the component is selected. A single Form may contain any number of .NET Components. The first to be added will be called Aztnet1, the second Aztnet2, and so on; the names may be changed by the user by modifying the Name property within the Properties box. The properties panel also displays all other settable properties for the component, and these values will be used as defaults unless properties are changed programmatically within your project.

Setting and retrieving property values programmatically


The .NET Components may be operated entirely by setting or retrieving Property values programmatically. Clicking on the Barcode Component in the panel under the form when Visual Studio's Properties box is displayed will show the current settings for component's available properties. Most of these may be edited using the Properties box, or may have their values set from within the user's program by statements of the kind Aztnet1.Caption="123456789" Abcnet1.Caption="123456789"; Visual Basic C#

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 55

Abcnet1.set_Caption("123456789");

J#

The Component properties that are set AFTER a barcode has been created may be retrieved within user's programs by statements of the kind: x=Aztnet1.Error x=Aztnet1.Error; x=Aztnet1.get_Error() Visual Basic C# J#

Setting properties through the Barcode properties dialog box


Using the Method Properties() causes the Barcode properties dialog to be displayed. This displays all settable properties in a convenient form and enables changes to be made by selecting from drop-down lists or entering values into edit boxes.

Displaying a barcode on a form


To display a barcode on a form a TextBox is used to hold the characters and the Font property of the TextBox set to a suitable size of the relevant font (eg. AZTW or PD3W). For example: Private Sub DoBarcode() Visual Basic Abcnet1.Caption="123456789 TextBox1.Texte=Aztnet1.Barcode() End Sub private void DoBarcode() { aztnet1.Caption="123456789"; textBox1.Text=aztnet1.Barcode(); } C#

private void DoBarcode() { aztnet1.set_Caption("123456789"); textBox1.set_Text(aztnet1.Barcode()); }

Printing a barcode
Printing the text returned by the Barcode() call may be accomplished by any of the printing techniques available for Visual Studio.NET project. However, probably the most useful approach is to use the DrawString() method in a PrintPage handler as illustrated below, and in the example provided with the components: Visual Basic Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim br As Brush

56 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Dim ff As New Font(AZTW, 8, FontStyle.Regular) br = New SolidBrush(Color.Black) e.Graphics.PageUnit = GraphicsUnit.Document ' e.Graphics.DrawString(Aztnet1.barcode(), ff, br, 100.0F, 300.0F) ' Indicate that this is the last page to print. e.HasMorePages = False End Sub While the PageUnit setting can be any of the allowed values, the example above uses the highest resolution setting (Document, equivalent to 300 units per inch).

Licensing the component


The .NET components will behave as Testware versions (generating scrambled barcode and pattern strings) unless correctly licensed. Single computer version of the components are licensed for use only on a single computer. Developer versions permit applications built with the.NET components to be distributed up to a maximum distribution of 10,000 copies. Developer versions require the developers serial number to be passed to the component using the Serial property before the Barcode() method is called. The Serial property should be set to the serial number provided for your product, e.g. Aztnet1.Serial="12345" for VB aztnet1.Serial="12345"; for C# aztnet1.set_Serial("12345"); for J#

.NET Information properties


Note that the barcode symbol is determined only when this Barcode() method is called, so the information properties are not available until this method has been called.

Error
Type: integer Returns a value representing the error code if a valid barcode image cannot be created. Otherwise returns 0. Read only. Do not set this property. The error codes and corresponding Status property values are shown below:

Status
Type: string Returns a string interpreting the value of the Error property. The error codes and corresponding Status property values are shown below: Error 0 1 2 Status OK Illegal character in data Wrong data length

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 57

3 9

Error in barcode data Other error

Read only. Do not set this property.

Pattern
Type: String Returns: symbol. A string containing a pattern of digit characters which represent the bars and spaces in the barcode

Read only. Do not set this property. The pattern string returned for a PDF417 symbol consists of the sequence of digits used to represent the thickness of bars and spaces alternately in the symbol (starting with the first bar), arranged by row. Bar height is at the users choice. Each row is separated by a newline (\n or CHR(10)) characters. The pattern string returned for an Aztec, Datamatrix or QR Code symbol consists of the sequence of characters used to create the symbol, arranged by row, with a 1 for a black square and a 0 for a white square. Each row is separated by a newline (\n or CHR(10)) characters.

.NET Component Methods


Barcode()
Return Type: string This method causes a barcode to be created as a string of characters that, when displayed in the AZTx font will form the barcode symbol. Note that the barcode symbol is determined only when this method is called, so the information properties are not set until this method has been called.

Properties()
Return Type: BOOL Displays the Barcode properties dialog for the component. Returns TRUE if the user exits the dialog by pushing the OK button and sets all component properties to those specified in the dialog. Returns FALSE if the user exits the dialog by pushing the Cancel button.

Common Control Methods


The following methods are common to all font kit OCX controls.

BarSave()
Int BarSave(LPSTR filename)

58 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Causes the control to save the barcode characters into a text file. Filename must be the fully qualified file name, complete with .TXT extension such as that available from the Windows SaveDialog control. The methods returns the number of bytes saved in the file, or 0 if an error occurs. VB Example: Ff$=C:\test.txt BarSave(Ff$)

BarCopy()
Int BarCopy(void) Copies the barcode text to the Windows clipboard, from where it may be pasted into other applications. Note that only the text is copied; pasted text will need to be set into the appropriate font before a barcode will be seen. VB Example BarCopy()

GetModeName()
BSTR GetModeName(LPINT mode) for Aztec and DataMatrix font kits. BSTR GetModeName(LPINT code, LPINT mode) for the PDF font kit, where the code parameter contains 0 for PDF417 barcodes or 1 for Micro PDF barcodes. Return the name of 2D mode for the barcode type. For example, DataMatrix barcodes have the mode name Square for mode=0 and Rectangular for mode=1. An invalid value in mode will return an empty string, so this method may be used for enumerating the available modes; for example: For i = 0 To 10 x$ = Aztocx1.GetModeName(i) If (Len(x$) > 0) Then Combomode.AddItem (x$) Else Exit For End If Next

GetMaxLevel()
Int GetMaxLevel(LPINT mode) for Aztec and DataMatrix font kits. Int GetMaxLevel(LINT code. LPINT mode) for the PDF font kit, where the code parameter contains 0 for PDF417 barcodes or 1 for Micro PDF barcodes. Returns the number of security levels valid for the mode. For example, Aztec in Normal mode can have 99 levels, but in Compact mode has only 4. VB Example

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 59

Mode=0 N=GetMaxLevel(Mode)

GetError()
BSTR GetError(LPINT errorcode) The GetError(Errorcode) method returns the text (a BSTR string) of the error message corresponding to the Errorcode value. So a string variable may be filled with the error message using X$=Uniocx1.GetError(Uniocx.Errorcode)

Common Java class features


Each dFontXX java classes provide methods for determining the barcode features supported and for setting barcode characteristics and retrieving the barcode strings. All properties may be set using methods of the form setProperty(parameter); or, as commonly done in applets, by using the setParam() method with the appropriate property name as a parameter. For example, the CodeType property may be set to 0 using setCodeType(0); or setParam(CODETYPE,0); Note: the setSerial() method must be used to pass the developers serial number to the class BEFORE any barcodes are generated. Without a correct serial number the class will generated randomly scrambled barcodes.

Java properties
ByteNumber
Type: int Default: 0 If this property is greater than 0 then the Caption string is transferred to a byte array and the ByteNumber of bytes in the array is used as the barcode data. This permits an array of bytes to be used as data by constructing the Caption string from a know length byte array using String(byte[] bytes).

CodeType
Type: integer Default: 0 Allowed values: 0, except for dFontPDF.class, where the allowed values are: Barcode CodeType

60 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

PDF417 MicroPDF417

0 1

Columns
Type: integer Default: 0 (value ignored) Allowed values: For Datamatrix symbols the number of columns in the symbol (10 144). For PDF417 symbols the number of codeword columns in the symbol (3 12).

Flag1
Type: Boolean Default false These additional properties are not normally used. However, they do provide additional functions for a limited number of specific barcode types. See Barcodes Help for details. For Aztec barcodes this flag is used for the Aztec Flag setting. For Datamatrix symbols this flag is used to turn on GS1 encoding. For MicroPDF417, when true this flag causes data to have the following character patterns translated into low ASCII codes: String {ET} {FS} {GS} {RS} converted to ASCII 4 ASCII 28 ASCII 29 ASCII 30

These translations are useful because Micro PDF417 supports the industry macro sequences [)>{RS}05{GS} and [)>{RS}06{GS} (where {RS} represents ASCII 30 and {GS} is ASCII 29).

Flag2
Type: Boolean Default false These additional properties are not normally used. However, they do provide additional functions for a limited number of specific barcode types. See Barcodes Help for details. For Aztec barcodes this flag is used for the Aztec Menu setting.

Level
Type: int Default: 0

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 61

Allowed values: depend on barcode type and mode. The number of allowed values may be interrogated using the getMaxLevel() method. A value of 0 implies automatic for many barcode types. This property provides the Security Level for PDF417 and the number of Layers for Aztec symbols. In most cases the higher the level the greater the area of the symbol used for error-correction codes.

ModeType
Type: int Default: 0 Most 2D barcodes have several different modes (eg. DataMatrix can be Square or Rectangular, Aztec has Normal, Compact, Full Range and Rune modes, etc.). The Mode names can be obtained by calling the GetAvailableModeNames() method which returns a string array containing the available modes. The array index is the ModeType.

Rvideo
Type: Boolean Default: false For Aztec barcodes, setting this property to true results in the interchange of foreground and background colours for the barcode elements. Ignored for all other barcode types.

Information properties from Java classes


Error
Type: integer Returns a value representing the error code if a valid barcode image cannot be created. Otherwise returns 0. Read only. Do not set this property. The error codes and corresponding Status property values are shown below:

Status
Type: string Returns a string interpreting the value of the Error property. The error codes and corresponding Status property values are shown below: Error 0 1 2 3 9 Status OK Illegal character in data Wrong data length Error in barcode data Error creating barcode

62 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

Read only. Do not set this property.

Java methods
getAvailableTypeNames()
Parameters: none Return type: String array Returns an array of strings containing the names of the barcode types supported. The array index (zero-based) corresponds to the CodeType value.

getAvailableModeNames()
Parameters: none except for dFontPDF.class, where the method has a single integer parameter specifying the code type (0 for PDF417 or 1 for MicroPDF) Return type: String array Returns an array of strings containing the names of the barcode modes supported. The array index (zero-based) corresponds to the ModeType value.

getMaxLevel()
Parameters: none Return type: int Returns the number of values allowed for the Level property

setSerial()
Parameters: string containing the developers serial number Return type: void The setSerial() method must be used to pass the developers serial number to the class BEFORE any barcodes are generated. Without a correct serial number the class will generated randomly scrambled barcodes.

update()
Parameters: none Return type: void Recalculates the barcode based on the current settings of the Caption, CodeType, Mode and Level. Users program should check for an error using getError()

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 63

Retrieving the barcode


getNStrings()
Parameters: none Return type: int Returns the number of strings available for the current barcode symbol this is the number of lines of characters that need to be displayed or printed in the relevant font to form the symbol. The function returns 0 if there is no current barcode or if an error has been encountered while creating the barcode.

getBarcodeString()
Parameters: int i Return type: String Returns the string corresponding to row i of the barcode symbol.

getBarcode()
Parameters: none Return type: String Returns the complete barcode symbol, with each row of the barcode separated by a newline (\n) character. Note that this can be a large string.

Error Codes
A negative value returned from the Bar2Dxxf() calls indicates one of the following errors: 1 2 3 4 5 6 7 8 9 Invalid data length Invalid code type Invalid parameters Illegal character in data Invalid embedded code Line width too small Font error Error creating image Error creating barcode

Font table
The characters representing the barcode elements are shown in the following Font table. value
0 1

binary
000000 000001

char
0 1

value
21 22

binary
010101 010110

char
E F

value
42 43

binary
101010 101011

char
Z [

64 2D-Barcode Fonts

dLSoft 2D-Barcode Fonts

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

000010 000011 000100 000101 000110 000111 001000 001001 001010 001011 001100 001101 001110 001111 010000 010001 010010 010011 010100 010101

2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

010111 011000 011001 011010 011011 011100 011101 011110 011111 100000 100001 100010 100011 100100 100101 100110 100111 101000 101001 101010

G H I J K L M N O P Q R S T U V W X Y Z

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

101100 101101 101110 101111 110000 110001 110010 110011 110100 110101 110110 110111 111000 111001 111010 111011 111100 111101 111110 111111

\ ] ^ _ ` a b c d e f g h i j k l m n o

Characters < to @ (ANSI 60 64) are reproduced at p to t (ANSI 112-116) Characters [ to (ANSI 91 96) are reproduced at u to z (ANSI 117-122) These alternative characters are used by version 3 of our libraries to avoid difficulties with programs that interpret characters such as < and > and ^ as control characters.

dLSoft 2D-Barcode Fonts

2D-Barcode Fonts 65

Index

Bar2Dqrd () 34 Bar2Dqrf () 33 Bar2Dqrw () 33 Bar2Drsc () 23 Bar2Drsf () 23 Bar2Drsw () 24 Barcode() 8, 18, 27, 38, 50, 58 BarCopy() 59 BarDecode(string bc) 9, 18, 38, 50 BarSave() 58 ByteNumber 7, 17, 36, 48, 60

C .
.NET Component Methods 58 .NET Information properties 57 Caption 7, 17, 26, 37, 49 CodeType 8, 17, 26, 37, 49, 60 CodeType property 51 CodeTypeValue 8, 17, 27, 37, 49 Colors Property page 6, 16, 25, 35, 47 Columns 49, 61 Columns property 51 Common .NET component features 55 Common Control Methods 58 Common DLL features 54 Common Java class features 60 Creating a barcode on a report 52 Creating a Databar barcode on a report 28 Creating a DataMatrix barcode on a report 20 Creating a QR barcode on a report 39 Creating an Aztec barcode on a report 10

2
2D-Barcode fonts 1

A
Access 5, 15, 25, 35, 47 Adding a .NET component to a project. 55 Adding a .NET Component to the ToolBox 55 Aspect ratio 42 AzFlag 7 AzMenu 7 AzRvideo 7 Aztdf Function calls 3 Aztec .NET Managed Component 6 Aztec barcodes 2 Aztec Control Properties 6 Aztec Function parameters 11 Aztec Property pages 5 Aztec.NET Methods 8 Aztec.NET Properties 7

D
Data Property page 6, 15, 25, 35, 47 Databar .NET Managed Component 26 Databar .NET Methods 27 Databar .NET Properties 26 Databar Control Property pages 25 Datamatrix .NET Managed Component 16 DataMatrix barcodes 11 DataMatrix font 12 DataMatrix Property pages 15 Datamatrix.NET Methods 18 Datamatrix.NET Properties 17 Dbardf Function calls 23 Displaying a barcode on a form 56 Dmatdf Function calls 13 Dqrdf Function calls 32

B
Bar2Dazc () 4 Bar2Dazd () 4 Bar2Dazf () 3 Bar2Dazw () 4 Bar2Ddmc () 13 Bar2Ddmd () 14 Bar2Ddmf () 13 Bar2Ddmw () 14 Bar2Dpdc () 45 Bar2Dpdd () 45 Bar2Dpdf () 45 Bar2Dpdw () 46 Bar2Dqrc () 33

E
Encoding Modes 41 EnumModeXX() 54 Error 57, 62 Error Codes 64 ErrorMessXX() 54

dLSoft 2D-Barcode Fonts

Index 67

F
Flag 8, 17, 27, 37, 49 Flag1 61 Flag2 61 Font Property page 6, 16, 25, 35, 47 Font table 64 Function parameters 21, 30, 40

Placing the Datamatrix control on a form 15 Placing the PDF417 control on a form 46 Placing the QR control on a form 34 Printing a barcode 56 Properties() 58

Q
QR Code .NET Managed Component 36 QR Code barcodes 31 QR Control Property pages 35 QR.NET Methods 38 QR.NET Properties 36

G
General Property page 6, 15, 25, 35, 47 getAvailableModeNames() 63 getAvailableTypeNames() 63 getBarcode() 64 getBarcodeString() 64 GetError() 60 GetMaxLevel() 59, 63 GetModeName() 59 getNStrings() 64 GS1 Databar barcodes 21 GS1_Flag 17

R
Retrieving the barcode 64 Running the sample 10, 19, 28, 39, 52 Rvideo 62

S
Security and Layers 2 Security level 41 SecurityLevel 8, 18, 38, 50 setSerial() 63 Setting and retrieving property values programmatically 55 Setting properties through the Barcode properties dialog box 56 StartMode 8, 18, 27, 37, 49 Status 57, 62

I
Information properties from Java classes 62 Introduction 1

J
Java methods 63 Java properties 60

L
Level 61 Licensing the component 57

T
The AZTDF DLL 3 The Aztec control 5 The Aztec font 2 The Aztec UFL for Crystal Reports 9 The Databar control 24 The Databar Control Properties 25 The Databar Fonts 22 The Databar UFL for Crystal Reports 28 The Datamatrix control 15 The DataMatrix Control Properties 16 The DataMatrix UFL for Crystal Reports 19 The DBARDF DLL 23 The dFontAZ Java class 9 The dFontDM Java class 18 The dFontPDF Java class 51 The dFontQR Java class 38 The DMATDF DLL 12 The DQRDF DLL 32 The PDF font 43 The PDF417 control 46 The PDF417 Control Properties 47

M
MaxLevelXX() 54 Micro PDF 417 42 Micro QR Code 31 ModeType 62

P
Pattern 58 PDF417 .NET Managed Component 48 PDF417 barcodes 41 PDF417 Function parameters 53 PDF417 Property pages 47 PDF417.NET Methods 50 PDF417.NET Properties 48 Pdfdf Function calls 44 Placing the Aztec control on a form 5 Placing the Databar control on a form 24

68 Index

dLSoft 2D-Barcode Fonts

The PDF417 UFL for Crystal Reports 51 The PDFDF DLL 43 The QR Code Fonts 31 The QR Code UFL for Crystal Reports 39 The QR control 34 The QR Control Properties 35 To make changes to the barcode formula 21, 29, 40, 53

U
update() 63 Using .NET Components in Visual Studio.NET 55

V
VB.NET and C# 5, 15, 25, 35, 47 Visual Basic 5, 15, 24, 34, 46

dLSoft 2D-Barcode Fonts

Index 69

Вам также может понравиться