Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 11 of 15

EasyCoder E4 Direct Protocol 2.01 Programmer's Guide: Chapter 9: Advanced Features

Pages 68 to 73 of 113, from EasyCoder E4 Direct Protocol 2.01 Programmer's Guide

The original document is the PDF (2.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec E4

Page 68

Chapter 9

Advanced Features 1. Specifying Complex Bar Codes

Complex 2-dimensional bar or dot codes, e.g. PDF417, require many specifying parameters. Therefore, there is a complex command that allows all bar code parameters to be specified within a single command. This command can also be used for one-dimensional bar codes (see chapter 4.4). BARSET[#<start parameter>,]["<bar code name>"[,<ratio wide bars> [,<ratio narrow bars>[,<magnification>[,<height> [,<security level> [,<aspect ratio height>[,<aspect ratio width>[,<no. of rows>[,<no. of columns> [,<truncate flag>]]]]]]]]]]]

<start parameter> specifies first parameter in the command (default 1) <bar code name> specifies bar code (default "INT2OF5") <ratio wide bars> specifies ratio wide/narrow bars (default 3) <ratio narrow bars> specifies ratio wide/narrow bars (default 1) <magnification> specifies magnification (default 2) <height> specifies height of bars in dots (default 100) <security level> only used in PDF417 and Maxicode (default 2) <aspect height ratio> only used in PDF417 and Maxicode (default 1) <aspect height width> only used in PDF417 and Maxicode (default 2) <no. of rows> only used in PDF417 and Maxicode (default 0) <no. of columns> only used in PDF417 and Maxicode (default 0) <truncate flag> only used in PDF417 and Maxicode (default 0)

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

67

Page 69

Chapter 9 Advanced Features

2. Using International Character Sets

The data input to text fields and bar codes takes the form of an ASCII string. Even compound data, such as... PRTXT “Label No.”;CNT1$;” Date “;DATE$(“F”) is expanded by the printer into a single ASCII string before any other processing occurs. This ASCII string is then converted to a string of international character codes according to the Unicode standard. Every character, whether it be a Latin “A”, Greek “alpha” or Chinese “ren”, has a unique code in this standard, called its “unicode”. Unicoded fonts The EasyCoder E4 works with Unicoded fonts in either Bitstream Speedo or TrueType format: its font scaler accesses images of characters within these fonts according to the character’s unicode. The printer also supports a number of non-Unicoded fonts. Some care is required when using fonts not built into the printer: • If a font is not Unicoded, the font scaler may access the wrong characters (only some non-Unicoded fonts are supported). • A font may not include all the characters in the current character set, as specified by the NASC command. If a text field contains a character which is not in the current font, then a replacement character will usually be printed instead. The replacement character for Speedo fonts is a space, while for TrueType fonts it is usually an unfilled rectangle. NASC and NASCD tables There are many national and international standards for mapping ASCII strings to strings of unicode. The EasyCoder E4 provides support for virtually all of these. There are two types of mappings: • Single-byte mappings, which map one ASCII character to a unicode. The EasyCoder E4 supports these using “NASC tables”. For example, for each NASC setting listed in chapter 6.11, the EasyCoder E4 has an internally stored NASC table. User defined NASC tables can also be stored in the printer as a file (see later in this chapter). • Double-byte mappings, which map pairs of ASCII characters to unicodes. The EasyCoder E4 supports these using “NASCD tables”. Currently, there are NASCD tables for the most common double-byte mappings used for the large Asian character sets: BIG5, GB, JIS and Shift-JIS.

68

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

Page 70

Chapter 9

2. Using International Character Sets, cont'd.

Advanced Features

To be exact, the double-byte mappings allow an ASCII string to contain a mixture of single-byte and double-bytes codes. For example, in the BIG5 mapping, any ASCII character with value 160 or greater is the first byte of a double-byte code, while the remaining characters form single-byte codes. So, in BIG5, the ASCII string “< 1 6 0 > < 6 4 > < 6 5 > ” splits into the double-byte code “<160><64>” and the single-byte code “<65>”. In the EasyCoder E4, the current NASCD table specifies both how to divide an ASCII string into single-byte and double-byte codes and also how the double-byte codes are mapped to unicodes. The current NASC table specifies how the single-byte codes are mapped to unicodes. The relevant commands are: NASC <character set no.> | <"file name"> NASCD “<NASCD table file>”

<character set no.> one of the values listed in chapter 6.11 <"file name"> one of the character set names listed in chapter 6.11 or the name of a user-defined NASC table (see later in this chapter) <NASCD table file> the file name of a NASCD table. Default: NASCD "" (empty string; disables doublebyte interpretation of ASCII strings) Double-byte fonts As discussed above, the ASCII data input to text fields and human readable parts of bar codes can contain a mixture of single-byte and double-byte codes, which are mapped to unicodes by the NASC and NASCD settings respectively. The characters for the single-byte codes are printed using the current single-byte font, as specified by the FONT command (see chapter 4.3). The characters for the doublebyte codes are printed using the current double-byte font, as specified by the following commands: FONTD | FD “<font file name>” [,<font size>,<font slant>]

<font file name> <font size> <font slant> Reset to default by:

the name of a Speedo or TrueType font file; it must be enclosed by double quotation marks. the height of the characters in points (a point is a standard typographic unit, equal to 1/72 inches). the italic angle of the characters in degrees; a positive value slants the characters clockwise away from the vertical. Default: 0. PRINTFEED|PF

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

69

Page 71

Chapter 9 Advanced Features

2. Using International Character Sets, cont'd.

Label produced by the program example to the right.

The three double-byte font parameters can be specified separately using the following commands: FONTD | FD “<font file name>” FONTDSIZE | FSD <font size> FONTDSLANT | FLD <font slant>

For each parameter, the value specified by these commands will be used in all text fields on the current label, until a new value is specified. These parameters need only be specified if a NASCD file is specified, as otherwise double-byte interpretation is disabled. Example: NASC 1 ↵ NASCD "CARD1:BIG5.NCD" ↵ FONT "Swiss 721 BT",20,0 ↵ FONTD "CARD1:CHINESE.TTF",20,0 ↵ PP 100,100 ↵ PT "NASCD ON: ";CHR$(185);CHR$(235) ↵ NASCD "" ↵ PP 100,200 ↵ PT "NASCD OFF: ";CHR$(185);CHR$(235) ↵ PF ↵ Double-byte fonts can also be used in the human readable parts of barcodes. The corresponding commands are: BARFONTD | BFD “<font file name>”[,<font size>,<font slant>]

<font file name> <font size> <font slant> Reset to default by:

the file name of the double-byte font to be use the height of the font in points. Default 12. the italic angle of the font in degrees clockwise Default: 0. PRINTFEED|PF

The bar code font size and slant can be specified separately using the following commands: BARFONTDSIZE | BFSD <font size> BARFONTDSLANT | BLFD <font slant>

Double-byte interpretation of human readables is disabled unless a NASCD file is specified. Also, note that many double-byte mappings use ASCII characters greater than 127, although these characters are not allowed as input data to many bar code types. PDF 417 is one bar code type that does allow ASCII characters greater than 127 as input. 70

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

Page 72

Chapter 9

2. Using International Character Sets, cont'd.

Advanced Features

User-defined NASC tables A user-defined NASC table can be used in place of one of the builtin NASC settings. It specifies a unicode for each of the 256 ASCII characters, and determines the mapping of single-byte codes in text fields and human readable parts of bar codes. A user-defined NASC table is specified using the command: NASC "<file name>"

<file name> Default:

the name of a file containing a user-defined NASC table. NASC 1 (the built-in Roman 8 NASC table is used)

Such a file can be created using some text editors, or by a userwritten piece of software. It can be sent to the printer using the FILE& LOAD command (see chapter 8.4) or copied onto a MSDOS formatted memory card which can be inserted in one of the printer's PCMCIA slots. It is a binary file 516 bytes long, with the following format: Byte 0: N Byte 1: S Byte 2: C Byte 3: 1 Byte 4: high byte of unicode for ASCII 0 Byte 5: low byte of unicode for ASCII 0 Byte 6: high byte of unicode for ASCII 1 Byte 7: low byte of unicode for ASCII 1 ↓ ↓ ↓ Byte 514: high byte of unicode for ASCII 255 Byte 515: low byte of unicode for ASCII 255.

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

71

Page 73

Chapter 9 Advanced Features

3. Font Scaling

In general, the EasyCoder E4 scales characters “on the fly” into bitmaps ready for printing. It stores as many character bitmaps as possible in a memory cache, to avoid having to rescale characters which are used more than once. Character bitmaps are deleted from the cache automatically by the printer, and so characters which are used often usually need to be rescaled frequently. In some instances it can take a long time for the printer to scale characters, such as when using double-byte TrueType fonts on a card. The user can force the printer to hold character bitmaps in the cache using the following command: PRESCALE | PS "<string of characters>"

<string of char.> an ASCII string specifying all the characters that are to be scaled from the current singleand double-byte fonts. It is interpreted according to the current NASC and NASCD settings.

Example: The 10 digits from a single-byte font and the ren character from a double-byte font are prescaled. NASCD "CARD1:BIG5.NCD" ↵ FONT "Swiss 721 BT",50,10 ↵ FONTD "CARD1:HOMINCHO.TTF" ↵ DIR 2 ↵ MAG 2,1 ↵ PS "0123456789";CHR$(164);CHR$(56)↵ The contents of a character bitmap depend on all of the following settings: • Single-byte character: DIR, MAG, NASC, FONT, FONTSIZE, FONTSLANT • Double-byte character: DIR, MAG, NASCD, FONTD, FONTDSIZE, FONTDSLANT The printer holds prescaled characters for the last 15 combinations of these settings. When a new combination is used, (for example, when the specification of DIR is changed), the prescaled characters for the 15th previous combination are lost. All prescaled characters are lost when the printer is turned off.

72

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1