ELP supports quite some ways of printing bar codes: Bar codes with ELP

This intelligent bar code emulation function is always turned on by default. To turn it off if use the key Barcodes=OFF. All ELP bar code keys

This page describes the way printing bar codes using the industry standard for bar code printing. ELP emulates more ways for bar code printing. Please see here.

Content of this quite long document is:

Presentation

The ELP software emulates almost all 1 dimensional and most of the 2 dimensional bar codes. If you need a more detailed manual, please contact your local distributor. Their address is listed in the info-box at the license tab of the PPADMIN software.

The ELP supports more than 60 bar code formats, from the simplest to the most complex system (interleaved, triple check sum, etc...).

Each of these bar codes can be defined in any height from 1mm to 33 cm with 1/72 inch increments, bar widths can be defined in 1/600 inch units, code value can be printed as text together with code in many different embeddings with 20 different scalable fonts. As a result, you can generate millions of kinds of bar code formats from the module!

NOTES:

  • Printing bar codes can only be performed within PCL5 and with a special setup also with Postscript printing files.
  • ELP also offers an emulation for the Kyocera way of printing bar codes using their printer language Prescribe.
  • In this manual, the escape code is indicated as <Esc>. Those five characters must not be entered as individual symbols, but must be replaced with the unique character of ASCII value 27.

The intelligent bar code functions are not made of scalable fonts. They trace the font alike PCL5 sequences of the data stream. The Hewlett-Packard defined typeface numbers from 24600 to 24800 activate the intelligence. All data mapped to one of those special fonts is analyzed and converted into bar code directly by the emulation.

Those Demo Files are coming with the product:

A_SIMPLE_ELP_TEST.PCL This is usually the file for testing, If a queue was successfully activated. If the printed document show bar codes then all is ok.
Bar code_1D.pcl * Prints a huge list of bar code samples. Bar codes with ELP
Bar code_2D.pcl * Prints an ELP Demo Page of all implemented 2D Bar codes
Bar code_Overview.pcl * Prints samples of bar codes and explains how they can be setup and configured
Bar code_Kyocera.pcl Prints some bar code samples in Kyocera Emulation, Note, that emulation needs to be enabled!

They all are ASCII files, and you can open them into any ASCII editor (Notepad++) to review how they are used. To print them use under MS Windows the test possibility in the Configuration Tab and Install Tab, or direct with the ELP Command Line Arguments: ELP_Software in-File out-File


Implementation

If you want to print special characters (ASCII code < 32) with those bar codes, a "Transparent Print Data" PCL sequence (Esc&p#X) must follow immediately the font selection sequence. This is the only way to know how many characters have to be printed.

The end of bar code data is determined according to the bar code type:

* Bar code data is numeric only: ended by space/CR/LF/FF/Escape code.
* Bar code data is alphanumeric: ended by CR/LF/FF/Escape code.

If you want to print binary information in the bar code, please use the Esc&p#X Length definition sequence, explained right before.

There are some example files provided for your tests. Windows: PPAdmin - Configuration Tab - Test - Select one activated printer - Select the Barcode*.pcl test file you want to print - Print. Linux etc. and ELP is implemented in your spooling system: Simply send the Barcode*.pcl file to your.

Those additional non industry standard keys are available:

Barcodes Turns the bar code function off and on. Possible Values: ON/OFF. The PSi bar code emulation is turned on as well
BarcodeAnalyze Prints automatically an additional document which lists depending upon the selected modes 1,2 or 3, all or all unknown font sequences found in the print document. See Quicksets
Barcode_EraseStartStop The argument needs to be exactly 2 characters. If the bar code information starts with the first and ends with the second character, the two characters are erased from the user information
Barcode_ErrorHandler Value 1: Code 3of9 ignores illegal characters.
Value 2: Code 3of9 ends bar code user information at any illegal character
Value 4: Code 3of9 if illegal character is below 128, ELP switches automatically to 3of9 extended encoding.
Notes: Key has to be set in rule GLOBAL! If needed, values can be added
Barcode_2D_OldVersion Turned on, a possible CR-LF without previous data will NOT be part of the bar code. Also any CR-LF will end the bar code if ELPs voter did not detect a PCL5 data stream
BarcodesPostScript Turns the bar code function for PostScript files off and on. In order to handle this the key Barcodes needs to be set to ON (default value)Only valid in the rule GLOBAL, User-, Printer-, or Port-Name (see Rules theory )
BarcodesPostscriptScalefactor You may set any factor which is only used for the postscript bar code size adaption. The X and Y sizing are both commonly set
Barcode_ReadableTextMargin The space in mm, which the readable text needs to be removed from the start stop signs of the bar code. Default 2 mm, if lowered the text size will increase. May only be seen in bar codes with small width.
Barcode_TextSizeCorrection The readable bar code text is enlarged or reduced by the provided value in Millimeter. Attention, this change will apply to all bar codes with readable text printing.
2of5AutoLenAjustment Turned on, ELP adds required leading zeros to the bar code information in order to make the total amount of user digits even or odd, depending upon check digit is used or not
PrintOnlyOneBarcode Turned on, ELP will stop printing bar codes immediately after each printed bar code. So after the bar code any additional text will be printed as text, even if a wrong or incomplete deselection bar code sequence is used.

 

FONT-LIKE PARAMETERS DESCRIPTION 1-D BAR CODES

P parameter Esc(s#p

Control if/how human-readable (caption) text is printed with bar code

0 Use default value
1 Don't print human readable text
2 Print human readable text embedded
3 Print human readable text half embedded
4 Print human readable text under code
5 Print human readable text above code
6 Print human readable text half above code
7 Print human readable text full embedded above code

Specials:

Add 10 to print UPC/EAN/JAN check sum middle left rather than bottom left of bar code.
Add 10 to print start & end * characters with 39 bar code text

The ELP possibilities for printing bar code


Add 20 to format French and German postal bar codes
Add 100 to print check sum character with text.
Add 124 to print the German Post bar code

Exception: For Australia 4State bar codes, the p parameter specifies if the customer information is digits
0 Encode customer information with N table
1 Encode customer information with C table

H parameter ...#h

Controls what font is used for the human-readable (caption) text

Format: CBA, numeric value, where

C: Style 0 Use Default (Bold)
1 Use Regular
2 Use Italics
3 Use Bold
4 Use Bold Italic
> 9 then the human readable text is printed in a fixed size in mm. The height is the value dived by 10. So if you want to print a 5 mm text height in bold italic, use 54

B: Size
0 Use automatic font size.
1 Print the readable bar code text in the default font style and size of the actual selected font. Only enabled for prining text below the bar code (4p or 24p etc)!
9 External, use macro 31745 to call readable text any time after bar code is printed. You can set position and size, best in HP GL2 commands.

A: Typeface
0 Use Courier to print text (default)
1 Use Letter Gothic to print text
2 Use Univers to print text
3 Use Univers Condensed to print text
4 Use CG-Times to print text
5 Use OCR-B to print text (great with UPC/EAN)

Example: text in Univers Bold Italic, automatic size: Esc(s402H

Note: You may change the size of the text with following 2 non standard keys in your configuration file: Bar code_TextSizeCorrection and Bar code_ReadableTextMargin All ELP bar code keys .

V parameter ....#v

Short bar height in points (1/72 inch). Same unit as fonts. Minimum sizes apply.

Example: Bar code in point size 87: Esc(s87V

Non Standard is the possibility for a negative v parameter.
PCL-Bar codes: This was especially entered for an easier Kyocera bar code handling. The PreScribe language does print the bar codes from the actual position downwards, but the industry standard is upwards. So if a negative size is entered, the bar code is also printed downwards.
PostScript-Bar codes : As the postscript data stream is not really parsed, the page and print orientation settings are not really interpreted. Therefore the bar code output from standard SAP is mirrored. Using a negative height, the bar code printout is mirrored back.

B parameter ....#1,#2[,#3,#4]

Bar Widths

#1, bar width, first (thin) width in dots (1/600 inch)
#2, bar width, second width in dots (1/600 inch)

Only for EAN, UPC and Code 128 Bar codes please extend:
#3, bar width, third width in dots (1/600 inch)
#4 bar width, fourth width in dots (1/600 inch)

Example: Thin bars 4 dots, thick bars 8dots: Esc(s4,8B

S parameter ....#1,#2[,#3,#4]s

Space Widths

#1, space width, first (thin) width in dots (1/600 inch)
#2, space width, second width in dots (1/600 inch)

Only for EAN, UPC and Code 128 Bar codes please extend:
#3, space width, third width in dots (1/600 inch)
#4 space width, fourth width in dots (1/600 inch)

Example: Thin spaces 4 dots, thick spaces expand 4 dots: Esc(s4,8,12,16S

Note: The s and b parameters should be specified together. If this is not possible then please specify only the s parameter

T parameter .....#T

24600, UPC-A
24601, UPC-A +2
24602, UPC-A +5
24620, EAN/JAN-8
24621, EAN/JAN-8 +2
24622, EAN/JAN-8 +5
24610, UPC-E
24611, UPC-E +2
24612, UPC-E +5
24630, EAN/JAN-13
24631, EAN/JAN-13 +2
24632, EAN/JAN-13 +5
24640, 25 interleaved
24641, 25 interleaved + CHK
24650, 25 industrial
24651, 25 industrial + CHK
24642, German Postal 25 Leitcode 13
24643, German Postal 25 Identcode 11
24660, 25 matrix
24661, 25 matrix + CHK
24670, Code 39 (3of9)
24671, Code 39 + CHK
24673, 39+CHK encode space b/a data
24680, 39 extended
24672, 39 encode space before/after data
24681, 39 extended + CHK
24675, Danish PTT 39 bar code
24676, French Postal 39 A/R
24805 Netherlands Post Bar code
24690, 93
24691, 93 extended
24700, 128 auto switch
24701, 128 A
24702, 128 B
24704, 128 C
24710, UCC-128
24720, EAN 128K
24770, ZIP+4 POSTNET 5
24771, ZIP+4 POSTNET 9
24772, ZIP+4 POSTNET 11
24775, Intelligent Mail Bar code (IMB)
23591, USPS ZEBRA
24750, CODABAR
24751, CODABAR +CHKmod16
24644, USPS 25, 11 digits Tray Label
24645, USPS 25, 8 digits Sack Label
24760, MSI
24761, MSI +CHK10
24762, MSI +CHK10+CHK10
24763, MSI +CHK11+CHK10
24785, Australia 4 State 37-CUST
24786, Australia 4 State 52-FF-MET
24787, Australia 4 State 67-FF-MET
24788, Australia 4 State FCC-45 REPLY
24780, Singapore 4 State
24806 RM4SCC of British Post

Non Industry Standard Bar codes:

24823 Decoding the old UPS Bar code 1Z....
24801 German Pharma Zentral Number (PZN7 and PZN8)
24807 German Pharma Zentral Number (PZN8 only, old PZN7 will automatically get a leading ZERO)
24802 US Postal Code FIM Bar code
24803 EAN Velocity
24804 UPC 128 shipping container
24810* Code 11
24811* Code 11 Modulo 10
24812* Code 11 Modulo 10 and 11
24817 Code 11
24818 Code 11 Modulo 10
24819 Code 11 Modulo 10 and 11
24805* Netherlands Post Bar code
24824 Australia 4 State 37-Routing
24821 Australia 4 State 37-REDI
24822 Australia 4 State 67-FF-MAN

* old version: Those parameters should not be used anymore, instead use the 24805,24806 or 24817 to 24819

Note: Bar code parameters must be combined in a unique PCL font escape sequence.

e.g.: <ESC>(s4p305h24v7,21s7,21b24670T

 

Print Extended Characters and leading spaces

Some of the bar codes can print the full ASCII table from 1 to 127. In regular mode, some of the characters below 33 may cause the ELP software to print the code up to this character and maybe even start after the character with a new bar code definition. In order to avoid this, you can add after the full Esc sequence for the code <27>&p####X. The numeric value ### does define the length of the message information in Bytes.

 

2of5 interleave auto adjustment

Depending if check sum is used, this bar code needs always an odd or even amount of digits. If this is not the case, you may automatically add a leading 0 to mach the bar code requirements. The ini-file key 2of5AutoLenAjustment can be used to turn this non standrad function on.

 

Code 128 Control Codes

Code 128 has five non-data special control codes, called FUNCTION CODES, and 2 control codes to switch from one 128 set (A, B or C) to another one. The switching control codes are used by ELP Software to force one 128 set. As an example, the string "123456" can be printed with both sets A, B and C. Inserting a character with ASCII value = 134 at the beginning of the string will force to use the set B of code 128.

Note that both Code 128 auto switch and EAN 128 analyze the data and optimize the bar code length by switching automatically between sets A B and C. EAN128 and UCC-128 already include the FNC1 code as the first character: you should not send it with the data.

Special control codes are inserted by passing the following special decimal characters in the bar code:

133 = CODE A 129 = FNC 1
134 = CODE B 130 = FNC 2
135 = CODE C 131 = FNC 3
128 = SHIFT

The typeface number 24703 is obsolete. If your software needs that typeface please contact our support team.

 

Intelligent Mail Bar code (IMB)

Typeface 24775

The Intelligent Mail Bar code (IMB) allows only digits as bar code data.

The bar code data consists of 20 digits tracking code and 0, 5, 9 or 11 digits routing code.

The tracking code consists of

  • 2 digits bar code ID
  • 3 digits service type ID
  • 6 digits mailer ID
  • 9 digits serial number

These are the main groups:

<TRACKING-CODE><ROUTING-CODE>

The sub-groups:

<BARCODE-ID><SERVICE-ID><MAILER-ID><SERIAL-NO><ROUTING-CODE>

All sub groups´ data can be

  • separated by comma, sample data: 11,222,333333,444444444,55555555555
  • separated by a dash ("-"), sample data: 11-222-333333-444444444-55555555555
  • not separated, sample data: 1122233333344444444455555555555

Supported human readable text parameters <esc>(s#p:

  • 0 = default value (for this code: 1)
  • 1 = no human readable text
  • 4 = human readable text under the code
  • 5 = human readable text above the code

Human readable text font parameters <esc>(s#H:

The fonts Courier, Letter Gothic, Univers, Univers Condensed and CG-Times can be used in regular, italic, bold and bold italic style.
The font OCR-B can only be used in regular style.

The height of the human readable text is set automatically to the height of the bar code, but it will be automatically adjusted to fit the width.

The bar code height and width for Intelligent Mail Bar code is fixed. v-, b- and s-parameters will be ignored.

Sample usages:

With comma as group separator:
<esc>(s4p105h24775T11,222,333333,444444444
<esc>(s4p105h24775T11,222,333333,444444444,55555
<esc>(s4p105h24775T11,222,333333,444444444,555555555
<esc>(s4p105h24775T11,222,333333,444444444,55555555555

With dash as group separator:
<esc>(s4p105h24775T11-222-333333-444444444
<esc>(s4p105h24775T11-222-333333-444444444-55555
<esc>(s4p105h24775T11-222-333333-444444444-555555555
<esc>(s4p105h24775T11-222-333333-444444444-55555555555

Without group separators:
<esc>(s4p105h24775T11222333333444444444
<esc>(s4p105h24775T1122233333344444444455555
<esc>(s4p105h24775T11222333333444444444555555555
<esc>(s4p105h24775T1122233333344444444455555555555

 

2-D BARCODES

24800 UPS Maxicode
24820 Datamatrix
24830 Aztec Code(TM)
24850 PDF417
24860 QR-Code(TM) Model I
24861 QR-Code(TM) Model II
24862 Swiss QR Code

 

PDF417

The PDF417 is a high-density 2D bar code created by Symbol Technology and now an ANSI/AIM USA standard. This bar code is composed of a stack of rows with small black rectangles arranged in columns. The number of rows and columns can be user defined or set automatically to fit a ratio (2:3 is the most common ratio).

PDF417 features built-in error correction capability, automatic data compression and full ASCII character set. It can encode up to 1848 characters of information per bar code, based on the compression level achieved. PDF 417 exists in two modes: ASCII and Binary modes. ASCII mode has a better data density than the binary mode (maximum 106 versus 177 bytes per square cm) and can encode much more data than the binary mode (maximum 1848 bytes versus 1108 bytes).
PDF417 has extensive error correction capabilities.

PDF417 bar codes are read with laser scanner and CCD cameras.

Number of rows (min/max): 3/90
Number of columns (min/max): 1/30

There are many options for the PDF-417 symbol, activated using the p, b, and s parameters of the font-like PCL sequence.

Note: Some parameters override some other (i.e., the size ratio and line/rows definitions override each other). The last option in the escape sequence has the priority.

FONT-LIKE PARAMETERS DESCRIPTION

P parameter Esc(s#p

1 to 8: defines the ECC level
1000 to 1400: defines the ECC level based on the size of the codeword relative to the data size, in percent (0 to 400). The matching ECC level is automatically calculated

B parameter .....#1,#2,#3[,#4]b

#1, Maximum number of columns for the PDF symbol
#2, Maximum number of lines for the PDF symbol
#3, =1 #1 and #2 are the mandatory size for the PDF symbol =0 or not specified: #1 and #2 are maximum size (default)
#4, =1 The PDF-417 symbol is truncated on its right side =0 The PDF-417 symbol is not truncated (default)

Example: 8 columns, 10 lines mandatory size, none truncated: 8,10,0

S parameter ....#1,#2[,#3,#4]s Symbol format parameters

#1, Symbols black/white module height (1 to 10). Unit=minimum module width (default=3)
#2, X parameter for the symbol X/Y size ratio (default: 2 for 2/3)
#3, Y parameter for the symbol X/Y size ratio (default: 3 for 2/3)
#4, Symbol module width (1 to 100). Unit=1/100 inch (default value=10).

Example: square PDF, minimum module width: 1,1,1

If #3 and #4 is negative, then the actual print position will be top left bar code edge. Otherwise Bar code is printed from bottom left corner up.

T parameter ....#T (Typeface)

24850

 

Aztec Code (TM)

The Atztec Code is a 2D bar code created by Welch Allyn.
The name was derived from the Aztec pyramid.

ELP supports four-level error corrections and a wide range of symbol sizes.

It's als known as ISO/IEC 24778:208 standard.

The advantage is that it uses less space than other codes because no blank zone must surroud it.

FONT-LIKE PARAMETERS DESCRIPTION

P parameter Esc(s#p

Defines the ECC level
#0: Default of 23% + 3 Codewords
#1 to 99: Closest value to 10%, 23%, 36% or 50% + 3 Codewords


B parameter Esc(s#b

#1: Small module height in dots (1/600 inch)


T parameter ....#T (Typeface)

24830

Example usage:

<esc>(s50p24830Tstethos Systemhaus GmbH

 

QRCode (TM)

QR-Code is a two-dimensional matrix symbol developed by DENSO Corporation. It is available in the enhanced Model 2.

ELP supports four-level error corrections and a wide range of symbol sizes.

The code size can be scaled with the definition of the small black square height/width.

A QR-Code symbol can include numeric and alphanumeric data with high compression, binary. In the current implementation Kana and Kanji data is NOT supported.

FONT-LIKE PARAMETERS DESCRIPTION

P parameter Esc(s#p

0: Default ECC (error correction) level of 5% (M)
1: Low ECC/ High Density level (L)
2: Standard ECC level (M)
3: High reliability/ECC level (Q)
4: Ultra High reliability/ECC level (H)

V parameter Esc(s#v

0: Normal
1: Reverse video

B parameter Esc(s#b

Small module height in dots (1/600 inch)

S parameter Esc(s#s

Symbol set for input data
0: Use default (Automatic: JIS/ShiftJIS)
1: Numeric (0to9)
2: Alphanumeric (0to9, uppercase A to Z, space $%*+-. /: )
3: Binary 8-bits/byte data (JIS 8-bit character set (Latin and Kana) in accordance with JISX0201)
4: (Not supported!) Kanji characters (Shift JIS values 8140h to 9FFCh and E040h to EAA4h shifted from JIS X0208)

T parameter ....#T (Typeface)

24860 QR Code(TM) Model I*
24861 QR Code(TM) Model II

*Model I is not implemented, ELP switches automatically the 24860 parameter to 24861.

 

Swiss QR Code

The Swiss QR Code is a special version of the regular QR Code(TM) Model II which has a Swiss cross in the middle of the code.

It will always be printed with a fixed edge length of 46 mm.

Before it is printed, there will be a white square printed underneath the code with a fixed edge length of 56 mm.

This will cause a white border of 5 mm around the code to sustain full readability.

The current cursor position will be the starting position of the bar code (bottom left corner of the code), so the white square will start 5 mm to the left and 5 mm to the bottom.

 

 

FONT-LIKE PARAMETERS DESCRIPTION

T parameter ....#T (Typeface)

24862 Swiss QR Code

All other parameters will be ignored.

Data structure:

All data fields of the code are separated by <CR><LF>, therefore the usage of the Transparent Print Data command is mandatory.

If the header group "SPC<CR><LF>0100<CR><LF>1<CR><LF>" is missing it will be added automatically.

Example usage:

<esc>(s24862T<esc>&p111X4711<CR><LF>
stethos Systemhaus GmbH<CR><LF>
Weimarer Str. 48<CR><LF>
71065<CR><LF>
Sindelfingen<CR><LF>
D<CR><LF>
EUR<CR><LF>
4711,00<CR><LF>
EUR<CR><LF>
2017-06-21<CR><LF>
etc etc

 

Datamatrix

Data Matrix is a high density 2-D matrix code developed by RVSI - Acuity CiMatrix that can encode a lot of information in a very small space.

The Data Matrix symbology has extensive error correction capabilities using ECC200 error checking. A Data Matrix symbol can store between one and 3116 numeric or 2335 alphanumeric characters, and is scalable between a 1-mil square to a 14-inch square.

Since the overall size of the Data Matrix symbol is infinitely scalable, the Data Matrix symbols can be read at virtually any distance, given the right combination of Data Matrix size and reading equipment.

ELP can scale the code with the definition of the small black square height/width.
By default ELP will automatically optimize the encoding (binary, text, digits) by analyzing the data on the data.

FONT-LIKE PARAMETERS DESCRIPTION

B parameter Esc(s#B

The size of one small square in dots. 600 dots are 1 inch or 25.4 cm. The default size is 1mm. This sequence is optional and NOT industry standard compatible

T parameter ....#T (Typeface)

24820 Datamatrix

The following sequences are not industry compatible, but enhance the product:

P parameter Esc(s#P

Default is 0, but once set to 1 the Tilde character becomes a total new meaning:

~~ The Tilde sign itself
~X Is used to represent character values from 0 to 26. Replace the X like in the following example
~@ means character ASCII 0
~A means character 1
~B means character 2
~C means character 3....
~1 Represents the character FNC1. When FNC1 appears in the first position (or in the fifth position of the first symbol of a Structured Append), it will indicate that the data conforms to the UCC/EAN Application Identifier standard format
~2 It is used to represent Structured Append. Structured Append is used to link information from several symbols in a sequence. The ~2 must be followed by 3 additional bytes. The first 4 bits of the first byte identify the position of the particular symbol in the sequence . The last 4 bits identify the total number of symbols in the sequence. The second and third byte are used as a file identifier can have a value between 1 and 254 (up to 254*254=64516 identifiers). See Data Matrix Specification for more information about this (ISO 16022).
~3 This character are only allowed in the first position of the symbol. It indicates that the data contains commands for the bar code reader.
~5 and ~6 These characters are only allowed in the first position of the symbol. If ~5 is used the header [)> ascii30 ascii05 ascii29 will be transmitted by the bar code reader before the data in the symbol and the trailer ascii30 ascii04 will be transmitted after the data. If a ~6 is used , the header [)> ascii30 ascii05 ascii29 will be transmitted by the reader before the data and the trailer ascii30 ascii04 will be transmitted afterwards.
~7NNNNNN specifies the Extended Channel to be used, where NNNNNN is a value between and 000000 - 999999.
For example: ~7000010 means Extended Channel 10 . Extended channel is used for using other character sets other than ASCII. See Data Matrix Specification for more information about this (ISO 16022).
~dNNN represents the ASCII character encoded by the 3 digits NNN. For example, ~d065 represents the character 'A'

H parameter Esc(s#H

Default is 0 and automatic encoding is used. If you want to use a special encoding method, then those encoding values can be used:
10 - ASCII 11 - C40 12 - TEXT
13 - BASE256 3 14 - NONE 15 - AUTO

S parameter Esc(s#S

0 = default
1 = Enable rectangular output greater then 10 AND less then 40

The size of the code is printed by default in the minimized possible size.
The internal calculated amount of code words (CW) does specify the final size. However two possible sizes can be printed in square or in rectangular design, see red entry in table on the next page. If the parameter 1 is set and one of the two sizes can be used, the output then will be set to the rectangular form.
If the value is greater then 10 and less then 40, the algorithm to choose will start at the named size. If that size is already larger then the real needed code words, this start-up size will be used. With this option a specific size of bar code can be addressed. If the code words need more space, then the same minimization search is started as described above.
See for size and code words relation table on next page.

X row Y col Max CW S Parameter X row Y col Max CW S Parameter
10 10 3 10 32 32 62 25
12 12 5 11 36 36 86 26
8 18 5 12 40 40 114 27
14 14 8 13 44 44 144 28
8 32 10 14 48 48 174 29
16 16 12 15 52 52 204 30
12 26 16 16 64 64 280 31
18 18 18 17 72 72 368 32
20 20 22 18 80 80 456 33
12 36 22 19 88 88 576 34
22 22 30 20 96 96 696 35
16 36 32 21 104 104 816 36
24 24 36 22 120 120 1050 37
26 26 44 23 132 132 1304 38
16 48 49 24 144 144 1558 39

Examples:

Calculated CW S parameter Used size Description
20 0 20x20 Fist fit first used, which is 22 Code Words
20 1 12x36 First fit and next fit has 22 CW, 2nd used
39 0 26x26 Fist fit first used, which is 44 Code Words
29 1 26x26 Same as above, as next max CW is larger
39 15 26x26 started at 16x16=15 CW first fit at 26x26
39 27 40x40 Started at 40x40=144 CW which is already largen then 20 CW needed, so 40x40 is used

So a typical selection escape sequence will look like that: Esc(s20b24820T

Note: The old 24820 sequence for austrailan code was moved to 24824.

 

UPS Maxicode

The Maxicode bar code is a 2D bar code that consists of 884 hexagons surrounding a bulls-eye finder pattern. One bit of information is encoded by one hexagon. Up to 100 characters of information can be encoded in one square inch, which is the approximate fixed size of such a bar code. The Maxicode symbology includes built-in error correction capability, automatic data compression and full ASCII character set.

Postscript is integrated but was never tested!

Maxicode has been created by UPS and endorsed by AIM (Uniform symbology
Specification Maxicode) as a multi-purpose EDI-ready two-dimensional bar code.

UPS uses Maxicode to encode all information about the parcels, to provide a faster and better service to its clients. Maxicode data is a string made of a header, the ANSI message and an End Of Transmission code.

FONT-LIKE PARAMETERS DESCRIPTION

S parameter Esc(s#.#,#.#S

the first parameter set the X scaling and the second the Y scaling ration. Default: 4.3,4.0
This sequence is optional and NOT industry standard compatible

T parameter Esc(s24800T

Error messages : On any error message the error.log file in the Workpath folder does contain the detailed text description of the problem. See also error messages below.

 

Field name description size Type Req.
The label number any numeric Y
Field separator 1 comma Y
The number of labels for the shipment any numeric Y
Field separator 1 comma Y
The mode. (4 and 5 are implemented, but not released, release on request)
2 for domestic shipments,
3 for international shipments
1 2 or 3 Y
Field separator 1 comma Y
The Postal code
For mode 2 up to 9 digits
For mode 3 up to 6 alpha numerical values
9
6
numeric
alpha num
Y
Field separator 1 comma
Country code see below the table 3 numeric Y
Field separator 1 comma
Class of service (see UPS description) 3 numeric Y
Field separator 1 comma
ANSI Message Header 3 [)> Y
separator \RS can be coded as ASCII 30 or hex 1E 1 | 3 \RS Y
Transportation Data Format Header
\GS can be coded as ASCII 29 or hex 1D
5 | 7 01\GS96 Y
UPS Tracking Number < 12 alpha num Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
SCAC 4 USPN Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
UPS Shipper Number 6 alpha num Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Julian Day of Pickup 3 num Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Shipment ID 0-30 alpha num O
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Package n/x 1-3/1-3 < 7 num Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Package Weight 3 num Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Address Validation 1 Y | N Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Ship To Address < 36 alpha num O
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Ship To City < 21 alpha num Y
Separator \GS can be coded as ASCII 29 or hex 1D 1 | 3 \GS Y
Ship To State 2 alpha Y
End Of Format character 1 | 3 \RS Y
End Of Transmission
\EOT can be also coded as hex or Ascii 04
1 | 4 \EOT Y

Please consult the latest "Guide to Bar Coding With UPS OnLine For customers Generating Bar Code Labels"

Note: The secondary message can not be longer than 84 characters. Therefore, the destination address length must be truncated if required if the total length for the secondary message is greater than 84 characters. That destination address is anyway optional in the Maxicode data. If data is too long, ELP will not print instead of the Maxicode an error message.

Example:
<Esc>(s24800T1,1,2,152382802,840,001,[)>\RS01\GS96995011234\GS840\GS025\GS1Z07000168\GSUPSN\GSWX9031\GS272\GS\GS1/1\GS15\GSY\GS123\FS\300\\GS\GSAK\RS\EOT<Esc>(s0p10h12vbs4099T

The implementation of the Country code: This code mus be a 3 digit numerical entry, however ELP supports also the full name of the country or the 2 and 3 bytes short name:

So instead of the numerical value you also may use those strings:

Full name 2 char 3 char num
Afghanistan, Islamic State of af afg 004
Albania al alb 008
Algeria dz dza 012
American Samoa ds asm 016
Andorra, Principality of dd and 020
Angola, Republic of do ago 024
Anguilla ai aia 660
Antartica aq ata 010
Antigua and Barbuda ag atg 028
Argentina ar arg 032
Armenia am arm 051
Aruba aw abw 553
Australia au aut 040
Austria at aut 031
Azerbaijan az aze 031
Bahamas bs bhs 044
Bahrain bh bhr 048
Bailiwicks of Guernsey gg ? ?
Bangladesh bd bgb 050
Barbados bb brb 052
Belarus by blr 112
Belgium be bel 056
Belize bz blz 84
Benin bj ben 204
Bermuda bm bmu 60
Bhutan bt btn 64
Bolivia bo bol 68
Bosnia and Herzegowina ba bih 70
Botswana bw bwa 72
Bouvet Island bv bvt 74
Brazil br bra 76
British Indian Ocean Territory io iot 86
Brunei Darussalam bn brn 96
Bulgaria bg bgr 100
Burkina Faso bf bfa 854
Burundi bi bdi 108
Cambodia Kingdom of kh khm 116
Cameroon cm cmr 120
Canada ca can 124
Cape Verde cv cpv 132
Cayman Islands ky cym 136
Central African Republic cf caf 140
Chad td tcd 148
Chile cl chl 152
China cn chn 156
Christmas Island cx cxr 162
Cocos (Keeling) Islands cc cck 166
Colombia co col 170
Comoros km com 174
Congo cg cog 178
The Democratic Republic of the Congo cod 180
Cook Islands ck cok 184
Costa Rica cr cri 188
Cote D'Ivoire (Ivory Coast) ci civ 384
Croatia (Hrvatska) hr hrv 191
Cuba cu cub 192
Cyprus cy cyp 196
Czech Republic cz cze 203
Czechoslovakia (Officially deleted) cs   0
Denmark dk dnk 208
Djibouti dj dji 262
Dominica dm dma 212
Dominican Republic do dom 214
East Timor tp tmp 626
Ecuador ec ecu 218
Egypt eg egy 818
El Salvador sv slv 222
Equatorial Guinea gq gnq 226
Eritrea er eri 232
Estonia ee est 233
Ethiopia et eth 231
Falkland Islands (Malvinas) fk flk 238
Faroe Islands fo fro 234
Fiji fj fji 242
Finland fi fin 246
France fr fra 250
France metropolitan fx fxx 249
French Guiana gf guf 254
French Polynesia pf pyf 258
French Southern Territories tf atf 260
Gabon ga gab 266
Gambia gm gmb 270
Georgia ge geo 268
Germany de deu 276
Ghana gh gha 288
Gibraltar gi gib 292
Greece gr grc 300
Greenland gl grl 304
Great Britain gb gbr 826
Great Britain (iso 3166 code is gb uk gbr 826
Grenada gd grd 308
Guadeloupe gp glp 312
Guam gu gum 316
Guatemala gt gtm 320
Guinea gn gin 324
Guinea-Bissau gw gnb 624
Guyana gy guy 328
Haiti ht hti 332
Heard and MC Donald Islands hm hmd 334
Holy See (vatican City State) va vat 336
Honduras hn hnd 340
Hong kong hk hkg 344
Hungary hu hun 348
Iceland is isl 352
India in ind 356
Indonesia id idn 360
Iran Islamic Republic of ir irn 364
Iraq iq irq 368
Ireland ie irl 372
Isle of Man im   0
Israel il isr 376
Italy it ita 380
Jamaica jm jam 388
Japan jp jpn 392
Jersey je   0
Jordan jo jor 400
Kazakhstan kz kaz 398
Kenya ke ken 404
Kiribati ki kir 296
Korea Democratic People's Republic of kp prk 408
Korea Republic of kr kor 410
Kuwait kw kwt 414
Kyrgyzstan (Kyrgyz Republic) kg kgz 417
Lao People's Democratic Republic la lao 418
Latvia lv lva 428
Lebanon lb lbn 422
Lesotho ls lso 426
Liberia lr lbr 430
Libyan Arab Jamahiriya ly lby 434
Liechtenstein li lie 438
Lithuania lt ltu 440
Luxembourg lu lux 442
Macau mo mac 446
Macedonia Yugoslav Republic of mk mkd 807
Madagascar Republic of mg mdg 450
Malawi mw mwi 454
Malaysia my mys 458
Maldives mv mdv 462
Mali ml mli 466
Malta mt mlt 470
Marshall Islands mh mhl 584
Martinique mq mtq 474
Mauritania mr mrt 478
Mauritius mu mus 480
Mayotte yt myt 175
Mexico mx mex 484
Micronesia Federated States of fm fsm 583
Moldova Republic of md mda 498
Monaco mc mco 492
Mongolia mn mng 496
Montserrat ms msr 500
Morocco ma mar 504
Mozambique mz moz 508
Myanmar mm mmr 104
Namibia na nam 516
Nauru nr nru 520
Nepal np npl 524
Netherlands nl nld 528
Netherlands Antilles an ant 530
Neutral Zone (Officially deleted) nt   0
New Caledonia nc ncl 540
New Zealand nz nzl 554
Nicaragua ni nic 558
Niger ne ner 562
Nigeria ng nga 566
Niue nu niu 570
Norfolk Island nf nfk 574
Northern Mariana Islands mp mnp 580
Norway no nor 578
Oman om omn 512
Pakistan pk pak 586
Palau pw plw 585
Palestine ps   350
Panama pa pan 591
Papua New Guinea pg png 598
Paraguay py pry 600
Peru pe per 604
Philippines ph phl 608
Pitcairn pn pcn 612
Poland pl pol 616
Portugal pt prt 620
Puerto Rico pr pri 630
Qatar qa qat 634
Reunion re reu 638
Romania ro rom 642
Russian Federation ru rus 643
Rwanda rw rwa 646
Saint Kitts and Nevis kn kna 659
Saint Lucia lc lca 662
Saint Vincent and the Grenadines vc vct 670
Samoa ws wsm 882
San Marino sm smr 674
Sao Tome and Principe st stp 678
Saudi Arabia sa sau 682
Senegal sn sen 686
Seychelles sc syc 690
Sierra Leone sl sle 694
Singapore sg sgp 702
Slovakia (Slovak Republic) sk svk 703
Slovenia si svn 705
Solomon Islands sb slb 90
Somalia so som 706
South Africa za zaf 710
South Georgia and the South Sandwich Islands gs sgs 239
Soviet Union (See Russian Federation) su    
Spain es esp 724
Sri Lanka lk lka 144
St. Helena sh shn 654
St. Pierre and Miquelon pm spm 666
Sudan sd sdn 736
Suriname sr sur 740
Svalbard and Jan Mayen Islands sj sjm 744
Swaziland sz swz 748
Sweden se swe 752
Switzerland ch che 756
Syrian Arab Republic sy syr 760
Taiwan Province of China tw twn 158
Tajikistan tj tjk 762
Tanzania United Republic of tz tza 834
Thailand th tha 764
Togo tg tgo 768
Tokelau tk tkl 772
Tonga to ton 776
Trinidad and Tobago tt tto 780
Tunisia tn tun 788
Turkey tr tur 792
Turkmenistan tm tkm 795
Turks and Caicos Islands tc tca 796
Tuvalu tv tuv 798
Uganda ug uga 800
Ukraine ua ukr 804
United Arab Emirates ae are 784
United Kingdom gb gbr 826
United Kingdom (iso 3166 code is gb) uk gbr 826
United States us usa 840
United States minor outlying islands um umi 581
Uruguay uy ury 858
Uzbekistan uz uzb 860
Vanuatu vu vut 548
Venezuela ve ven 862
Viet Nam vn vnm 704
Virgin Islands (British) vg vgb 92
Virgin Islands (U.S.) vi vir 850
Wallis and Futuna Islands wf wlf 876
Western Sahara eh esh 732
Yemen ye yem 887
Yugoslavia yu yug 891
Zaire (see country number 180) zr   0
Zambia zm zmb 894
Zimbabwe zw zwe 716

Printing Bar code, Examples

A typical ESC-Sequence to select a particular bar code could be:

<27>(s4p102h40v10,30b10,30s24670T
4p Readable text below the codes, without start-stop-sign (*)
102h Readable text in Univers normal
40v The code size is 40pt; 40 / 72 * 2,54 cm
10,30s/b The small stroke/space bar is 10 dots, the wide ones are 30 dots 10 / 600 * 2,54 cm
24670 Use Code 39 (3of9)

Normally you want to print the code at a special position in a special orientation and you certainly want to return to the last printing position. Therefore you may need to send the following sequences to the printer:

<27>&fS Push cursor position (save)
<27>&a5000h2000V Positioning in 1/720 units per inch
<27>&a90P Rotate 90 degrees*
<27>(s4p102h40v10,20b10,20s24670T Select bar code
BARCODEINFORMATION Bar code information
<27>(10U<27>(sp10hsb4099T Select any font from PCL font list
<27>&aP Original printing direction*
<27>&f1S Pop cursor position (restore)

If you want to print the code in the current print direction, please leave out the *-marked commands.

For further information of the usage of ESC-Sequences please refer to the Hewlett-Packard PCL5 technical reference manual, which can be download from www.hp.com.
Permanent and secondary fonts switching can be used with bar code fonts. It is highly recommended that a text font is used as primary font, and bar code font as secondary font. (Please refer to your PCL developers guide for all information on primary and secondary fonts).

SAP Support

ELPs bar code functionality is supported standard by the SAP R/3 software.

  • OSS note #5196 lists standard R/3 bar code names and supported DeviceTypes for printing bar code
  • PCL-5 commands for Jetmobile BarSIMM/DIMM are built into the HP DeviceTypes by SAP
  • Modifications are only required for special Bar code types and sizes
  • OSS note #45643 lists PCL-5 command details for bar code attribute selection - PCL-5 commands are maintained as "Print-Controls" in SPAD
  • SE73 transaction lists bar code names and print-controls for every DeviceType
  • Bar code on: Print-control SBPxx
  • Bar code off (regular font): SBSxx
  • A test text is built into R/3: SO10, SAPSCRIPT-BARCODETEST (client 000)

Note: In the early release of the DeviceType, there were a few errors in the escape sequences. It is then recommended to verify the escape sequence syntax in R/3.

It would be nearly a wonder if the bar code size of the predefined print-control would match to your needs. We strongly recommend to copy the control into the user Z-environment and maintain it to your needs.

Tip: Unfortunately the Print-Controls are defined in HEX. Older HP LaserJet manuals do have at the end an ASCII-HEX conversion table! If you cannot get hold of one of those manuals, google the web.

The SAP Print-Controls for OCR-A is SF400 and SF500 for OCR-B.

If you would like to get more information about efficient printing from SAP, please have a look on our stethos home page. There we explain the following methods:

  1. Save processing speed and network data traffic by using Flash (HD) technology.
  2. Use the full printer functionality and even reduce more processing and network traffic by installing the AFE driver.
  3. Usage of external SW to generate based upon SAP data in seconds any form.

If you want to know more about SAP Printing Solutions, then please contact the distributore home page See PPAdmin License register INFO.

Support issue, my Bar Codes are NOT printed:

  1. If older devices are printing bar codes with ELP and a newer one dos not, then in 95% of all cases this is the reason for it.
  2. Other wise you may use the Quick Sets AnalyseBarCodes option for further help on this topic.



How to define your own bar code type and sizing in SAP
Defining Printer Control Sequences in SAP

Within SAP the "Spooler administration" transaction (short cut SPAD) is used for all printer-related settings. Every printer must be defined as an "output device" in SPAD
Select SAP Transaction SPAD and then click the Full Administration button.

Select the DeviceTypes tab and select the printer that will be printing the bar codes (HPLJ4000, for example). It is maybe wise to copy the standard DeviceType to a new one, The new name should start with a Y or Z.

Select the green check mark after entry of the DeviceType to display the Spool Administration: DeviceType screen, then click on the Print-Controls tab.

The Print-Controls page displays a list of defined Print-Control sequences, each identified by a name. You should always create new sequences again staring with a Y or Z in the name. Select the hex notation and enter the complete barcoide select sequence.

Tip:

  • Open DOS Edit or better Notepad++, type the ASCII part in, save the file, open it in any hex editor and copy the hex text over. The Escape sign is hex 1B. Please find in the next chapter also a hex table.
  • Forms & Field Installer also generates the hex string of a defined PCL bar code sequence

Do the same thing with a deselection Escape Sequence. So you may have now 2 new Print-Controls defined: YBCON and YBCOFF.

Printing Bar codes with ABAP or SAPSCRIPT

Now you are ready to print bar codes using an ABAP report program or a SAPSCRIPT form.

Sample SAPSCRIPT

* Variable MY_BARCODE contains the bar code data, including asterisks.
* The & is needed to avoid unwanted spaces or CR/LF characters
/E LINE
/: PRINT-CONTROL YBCON
= &BAR_CODE1&
/: PRINT-CONTROL YBCOFF

Sample ABAP Program:

DATA: MY_BARCODE(4) VALUE `WELP'
NEW-PAGE PRINT ON IMMEDIATELY `X'.
FORMAT COLOR OFF INTENSIFIED OFF.
* If the bar code is the first element on the page, the following Write
* statement is needed (otherwise you get a date in the first print
* control.
WRITE:/
* Turn on the bar code font, print the data, and switch back to the
* printer's default font. Be sure to use NO-GAP to avoid unwanted
* characters or CR/LF.
PRINT-CONTROL FUNCTION `YBCON'
WRITE: MY_BARCODE NO-GAP
PRINT-CONTROL FUNCTION `YBCOFF'
* Add a Write statement to prevent insertion of CR/LF into the bar code.
WRITE:/


Printing Bar codes with SAP using Postscript
Defining Printer Control Sequences in SAP
As ELP is not parsing any Postscript data stream, the bar code command needs to be replaced by the proper PCL sequence. Once the ELP key Bar codesPostscript=ON is set, ELP also parses the Postscript stream and searches for the PCL sequences (see printing bar codes in Postscript) replaces then and writes out the bar code using Postscript sequences.

Please find an example how to setup an ini.file which searches for an SAP Bar code command and replaces it to the proper PCL command, so even a change of the print-controls is not needed.

[GLOBAL]

Bar codesPostScript=ON

ELP_Max_Heap=10000000000

[Bar code ein]

search_Binary=(|BCODE39 SB V36 C0 T1 P2 L1|~

; see nagative point size in order to mirror the output back

Replace_Binary=\x1B(s4p-36v8,24s8,24b24670T

[Bar code aus]

Search_Binary=~)s\x0D\x0A

Search_Binary=~)s\x0A

Replace_Binary=\x0D\x0A

 

A macro call could possibly look like this:

In this example you can define where and with what size a readable barcode is shown.

The full command sequence and the meaning of each command is described here.

<0E> Switch to secondary font = <SO>
<27>&f0S Push cursor to memorize start position (Before drawing barcode)
<27>)s0p090h12.0v6,12s6,12b24670T Pseudo PCL font select sequence to specify barcode attributes
<message data> Message data
<27>)s3T Dummy font select command to end barcoding mode
<0E> Again, switch to secondary font = <SO>
<27>)1O<27)s0p10h0s0b0110T Normal PCL font select sequence for secondary font for CTX (here: OCR-B)
<0E> Again, switch to secondary font = <SO>
<27>*c98d6F Copy to RAM and assign font ID # 98
<27>*p0P Push/save color palette
<27>%1B Enter HP-GL/2 mode; put pen at current PCL cursor position
IN; Re-initialize HP-GL/2
SP8; Select black pen
PR; Set default plotting mode to relative
DT<9F>; Define default delimiter
SC0,400,0,400,2; Define 1 user-unit as 400 ppu = 1 cm
RO0; Cancel rotation
<27>%0A Return to PCL
<27>&f1s0S Restore cursor to start position, pop & push cursor again
<27>%1B Enter HP-GL/2 mode
SA; Select alternate/secondary font
FN98; Select secondary font ID # 98
SP8; Select black pen

RO000; (optional) For rotation: specify angle (0,90,180,270)
PU0.0,0.0; (optional) For positioning: specify relative horizontal & vertical offset (in cm)
SI0.25,1.0; Specify width and height of 1 character (in cm)
ES0.0; Specify inter-character spacing adjustment (the unit is the factor applied to the current width of the <SP> character)
<27>%1A Exit HP-GL/2 mode; put PCL cursor at current pen position
<27>&f31745y3X Call macro
<0F> Switch to primary font = <SI>
<27>*p1P Pop/restore color palette
<27>&f1S Pop cursor

 

 

Enhancements compared to the JetMobile BarDIMM 2.0

  • If Parameter S is only given, B will be assumed to be the same. The original product will keep the standard values, if S parameters are different, it assumes the other way around to adapt the B as well. We do both sides.
  • The readable text is slightly different, but we think more precisely positioned.
  • The readable text of the German Post office bar code is with squares instead of simple dots.
  • Code 128: If there is a specific code selected like CodeA, but the data needs a character out of another code, like B, then the code will be switched over. The original dimm will end in an error message.
  • Code 128. Due to the algorithm, the bar codes might look different. In such cases, the coded information will be the same! Compare EAN128 with 987654321 this emulation will generate a much shorter code.
  • For EAN 8 and 13, you can print the first country digit also using by adding to the P parameter 10, in the middle of the bar code.
  • The readable text can also be top embedded and half embedded! Simply use p parameter 6 and 7.
  • For the Australia 4 state we use strictly the original Code from the Post. Therefore the P parameter is ignored. Code date is 5th March 1999
  • For the Australia 4 the H parameter can be set, then the P parameter will be set to printing readable text under bar code. Dito Singapore 4 state.
  • Singapore 4 state: The barsimm is not checking the user data correctly. Either they are 6 digits or 4 characters 0..9 or A..Z
  • Danish post bar code: The original implementation is not checking any length, nor the constant of the data.
  • Postscript support
  • The command key: BARCODE_ErrorHandler, see above.


Bar codes in Postscript data streams

Originally the bar codes are only supported within PCL5 data streams. However Version 7.1k was enhanced to print also bar codes the intelligent way within Postscript data streams. In order to teach ELP to search also the PostScript print files, the key BarcodesPostScript =ON needs to be set in the section GLOBAL or in the user and or printer named sections.

Barcode_2D_OldVersion Turned on, a possible CR-LF without previous data will NOT be part of the bar code. Also any CR-LF will end the bar code if ELPs voter did not detect a PCL5 data stream
BarcodesPostScript Turns the bar code function for PostScript files off and on. In order to handle this the key Barcodes needs to be set to ON (default value)Only valid in the rule GLOBAL, User-, Printer-, or Port-Name (see Rules theory )
BarcodesPostscriptScalefactor You may set any factor which is only used for the postscript bar code size adaption. The X and Y sizing are both commonly set

 

[Global]
BarcodesPostScript=ON
Barcode_2D_OldVersion=ON
; The bar code user information is stopped reading before CR-LF or a blank.
BarcodesPostscriptScalefactor=2.5

The implementation was made quite easy, the exact same Sequences are used for adressing the bar codes as within PCL. Also the Escape sequence comes first and then the user information.

The user data ends with the next Carriage Return Sign ASCII 10 (Hex 1A). If the PCL sequence for the length of the user data is used <27>&p#X, then the routine stops after having the provided amount of bytes.

Example:

...
490 572 M (Hello)[72 44 28 28 0]xS
<Esc>(s4p24850T1234567890
712 572 M ( )S
...

Using the ELP DIMM / MFC or USB stick the key DIMM_PARSE_POSTSCRIPT=ON must be placed in the Golobal Section of the convert.ini.

Manipulate Bar Code start stop sequences

In very rare cases we face data streams, where the bar code sequences are selected by really starnge sequences, in most cases with start stop signs. Those data streams can be changed with two configuration files. The first one, usually comnvert.ini does search for the initial sequence, calls the second configuration file, named here barcode.ini which does replace the the wrong initial sequence to the correct one. Then the deselection sequence is searched, replaced and finally the main configuration file is called again.

1. convert.ini:
[Search for Barcode start sequence]
Search_Binary=\x1B(s1p12vsp4014T:
; When this sequence is found with including the start sign here :
inifile=#ELP_FORMS_PATH#Barcode.ini
; then execute the new rule set called barcode.ini located in the ..\forms folder.

 

2. barcode.ini:
[Search for Bar code start sequence]; Rule name must be 100% the same as the calling one form convert.ini

Search_Binary=\x1B(s1p12vsp4014T:
; same search as in rule convert.ini
Replace_Binary=\x1B&l2H\x1B(s2p35v24640T
; Replace with the correct bar code selection sequence

[Search for Bar code end character or even a little more if available]

; Rule name must be 100% the same as the calling one form convert.ini
; RUle must be after the one before!!!

Search_Binary=:

; replace with the correct deselection sequence

Replace_Binary=\x1B(10U\x1B(sp10hsb4099T\x1B&a+0H

; Here a dummy sequence is added, whoich does not make anything but is very propriety

 

[Return to the main convert.ini, maybe for correcting the next bar code sequence]

Search_Binary=\x1B&a+0H

; Search for that added dummy sequence and

inifile=#ELP_FORMS_PATH#convert.ini

; return to the convert.ini rule set

Bar code error handling

The printer doesn't print bar code:

  • Use the file A_SIMPLE_ELP_TEST.PCL for basic functionality testing. You find the test option in the Configuration tab.
  • Check in the configuration file, if the key Barcodes is NOT set to OFF. Missing is ok, as the default value is ON.
  • SAP: In 98% of all cases the wrong DeviceType is used. Please check on another printer and which one is used, and use the same one.
  • To find out if or which bar code sequence is used in the data stream, you may get help from the Quicksets: BarcodeAnalyse settings.
  • Verify the ESC-Sequence. It should start with the <ESC> or the Free-Escape sign and end with an uppercase 'T'. The bar code data should directly follow after this termination character. If using Free-Escape, please turn the key Free-Escape in a triggered section of the ini-file on.
  • Another good way to start the search is to replace the <ESC> by any printable characters. The printer must print now the sequence as readable text. If not, then the sequence is definitely not received by the printer.

Windows doesn't print the bar code:

  • Don't use any enhanced printer driver. Enhanced will use PCL XL. Only PCL5 is supported by BarSIMM/DIMM.
  • If you are using a Microsoft driver, switch to any printer builtin font, but not COURIER!

How to stop bar code printing:

Just send any other font selection sequence after the bar code message.

The blank problem:

Sometimes applications fill fields with blanks before or after the data. If you use an alphanumerical code like 3of9 or Code 128, this can cause a problem. We are aware of this, and are trying to solve this in the next versions.
If the field is left justified and fixed length, then just add <27>&pfieldlengthX direct after the 'T' of the selection sequence. Leading blanks are always ignored, unless you add this sequence.

Formatting the German Post bar code:

If you want to print the code with the correct layout, use 124 as the P parameter and for example the 300 for the H parameter: <27>(s124p300h....T

LENGTH error in 2of5 interleaved

The number of printed digits are always even. If you use a check sum, then you need to send an odd number of digits, if not, so the number of digits must be even (dividable by 2).

Problems reading a narrow bar code:

In most lasers, the toner does spread more than it should. So you may either reduce the toner density, or better, use the B parameter to reduce the horizontal size of the bars, or the S parameter to widen up the spaces.

How can I position the bar code

  • PCL5 provides the following EscapeSequences to do so: Esc&a#H (Horizontal) and Esc&a#V (Vertical). Esc stands Hex 1B or ASCII 27. The # is any number in 1/720 of an inch. So Esc&a720H will position the printer curser in the actual vertical position to the horizontal position 1 inch = 2,54 cm from the left logical margin.
  • If you prefer to position relative from the current position, than add in front of the values a plus of minus sign. Minus will move backwards, meaning horizontal to the left and vertical upper.
    Surrounding the positionining by Esc&lS (push) and Esc&f1S (pop) will store the previous position and return back after the action too place. You may find at www.hp.com the full PCL5 technical documentation.

Don't print the bar code on the very top

Especially when somebody tries to use an editor to get his first try print out, they intend to insert the sequences in the first line of text. As the bar code is printed from the Baseline to the top of the paper, you are often not really able to change the height. So we strongly advise for testing not to print the bar code in the first row.

39 bar code is much longer than it should be, typically as wide as the page

  • When you position horizontally the cursor using blanks to put the bar code at the right place, you must send the bar code selection sequence after sending the space characters to move horizontally. If you don't do that, the spaces are part of the bar code data and the bar code is much wider than expected (usually across the page).
  • If you can only send the bar code selection sequence at the beginning of the line, use the special 39 symbologies with no starting spaces (IDs 24670 and 24671). This symbology will not include the starting spaces in the bar code data.

For other problems please use our free of charge technical support. See last page for communication details.

Error number description
0 No data given to routine
1 Not enough memory on heap available
2 Leitcode of German Post AG uses 13 digits fixed length
3 The relation between the small bar to wide bar has to be between 2.0 and 3.0
4 Only the digits from 0 to 9 are allowed for this bar code
5 Identcode of German Post AG uses 9 digits fixed length
6 The length of the bar code string is out of bounce
7 The rotation degree is only allowed 0, 90, 180 and 270
8 For Codabar use only 0..9-$:/.+ and optional A..D for Start/Stop signs
9 For Code 39 use only 0..9 A..Z -. $/+%
10 Bar code information for Code 39 extended only allowed from hex 0 to hex 7f
11 PZN must be length of 6 or 7 digits
12 PZN check digit 10 is not allowed
13 Requested bar code type number zero or larger then available
14 Code 128 characters valid from ASCII 1 to 134
15 Code 128 shouldn't start with a code switch character
16 UPS Bar code is 17 characters long
17 EAN 8 is 7, EAN 13 is 12, UPC A is 11, UPC E 6 or 7 and UPC128 19 characters long
18 EAN-E must start with number 0 or 1!
19 Illegal character for Code 11.
20 Length of UCC-128 Bar code must be 19 digits
21 Maximum input length for String is BARCODESTRLEN - 3
22 Bar code information for Code 93 extended only allowed from hex 0 to hex 7f
23 For Code 93 use only 0..9 A..Z -. $/+%
24 ZIP 4 + 9 must have 9 digits, ZIP 4 + 5 must have 5 digits, ZIP 4 + 7 must have 11 digits
25 FIM characters A..D. no other entry allowed
26 French post bar code, first two characters must be RA or RB then 8 digits
27 2of2 interleaved with check sum requires an odd number of digits
28 2of2 interleaved without check sum requires an even number of digits
29 The relation for Codabar between the small bar to wide bar has to be between 2.25 and 3.0
30 The length of USPS 25, 10 digits Tray label is 10 digits
31 The length of USPS 25, 8 digits Sack label is 8 digits
32 Invalid character in Kix or 4state data, use only 0..9 and A..Z
33 Invalid length Kix data, min. 6 character required
34 Internal Error, Kix or 4state definition chars not valid
35 The Australia 4state Bar code must be minimum 8 DIGITS long (DPID) if longer then 8 characters, then you need to separate the CustInfo from DPID with a colon, no additional spaces allowed!
36 The Australia 4state 37 Bar code uses only 8 digits! Rest is ignored
37 The length of the customer info is too long. For the 52 Type of code it is only allowed 5 chars or 8 digits, the 67 version 10 char or 15 digits.
38 The colon is not allowed in the 4state data stream
39 The singapore 4 state bar codes consists of either 6 digits or 4 alpha-numeric characters (BRS Letter)
40 The Danish PTT bar code uses 10 digits, or 2 characters CC,CK,CO,CU and 8 digits.
41 The Royal Mail Bar code is defined with 0..9 and A..Z characters and with a length of minimum 7 and maximum 9 characters.
42 max. 90 rows and 30 columns
43 not enough memory
44 maximum codeword capacity is 863
45 Illegal Codeword in PDF 417
46 Too many user data for PDF 417
47 Code 128 function does not apply, e.g. shift, FNC3, FNC2 and FNC4 are not used while stying in Code C.
48 The user data length information does not match to the provided information. Hex 00 is not a valid character!
49 See manual, all items need to be sepratated by a comma
50 Mode is currently only supported 2 and 3
51 Not enough memory to set internal maxicode variables
52 The Zip code information is not in the specification. See table in the Maxicode description section
53 Country code must be 3 digits.
54-58 See error.log file for detailes description
59,60,61,62 Internal Data Matrix error, please report
63 Code 128C not numeric
64 QR_ERR_INVALID_DATA

 

Related articles: Bar code Key Description, MS Word Forms & Field Installer