Академический Документы
Профессиональный Документы
Культура Документы
2D-Barcode Fonts
By dLSoft
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
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
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.
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.
weight
full size 5% width and height reduction 10% width and height reduction
2 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.
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.
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);
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
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
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.
2D-Barcode Fonts 5
6 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.
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
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.
2D-Barcode Fonts 9
10 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.
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.
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.
12 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.
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, );
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
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.
2D-Barcode Fonts 15
16 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
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.
18 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
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).
20 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.
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 -Expanded encodes the 14 digit GS1/EAN/UCC item identification plus supplementary AI elements.
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,
22 2D-Barcode Fonts
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
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
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
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.
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.
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
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
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.
2D-Barcode Fonts 27
28 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.
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
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
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.
32 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);
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.
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
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.
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.NET Properties
ByteNumber
Type: integer Default: 0 Allowed values: 0 barcode byte capacity
36 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
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.
38 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.
Function parameters
The function is DLQRbars(szIn, szCode,szMode, szLevel) where
40 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.
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.
42 2D-Barcode Fonts
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.
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
44 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);
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
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
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.
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 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
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:
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
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
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.
52 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.
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"
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
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#
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
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).
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
2D-Barcode Fonts 57
3 9
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.
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.
BarSave()
Int BarSave(LPSTR filename)
58 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
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)
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
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
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.
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
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()
2D-Barcode Fonts 63
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
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.
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
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
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
Index 69