BARCODE (PCL,PDF, PS)

Top  Previous  Next

Syntax

 

1. barcode col|{numexpr}, row|{numexpr},"value"|{expr},symbology,height,spc-pixels [,text] [,rotate degrees] [,start char] [,stop char] [,truncate] [,mode mode] [,cols cols] [,rows rows][,notrim] [,security|errorlevel n] [,symbolno n] [,totsymbol n] [,notbc]

 

2. barcode "text|~regexpr|!=text|!~regexpr[@left,top,right.bottom]", col|{numexpr}, row|{numexpr}, "", symbology, height, spc-pixels, getoffset cols, getcols cols [,eraseoffset cols] [,erasecols cols]  [,text] [,rotate degrees] [,start char] [,stop char] [,truncate] [,mode mode] [,cols cols] [,rows rows][,notrim] [,security|errorlevel n] [,symbolno n] [,totsymbol n] [,notbc]

 

 

Description

 

col and row determine the upper left corner of the barcode.  If used, numexpr is a Business Basic expression that generates a numeric value for the column or row.

 

value is a text string, up to 28 characters, to barcode (when using the Support Server, there is no limit on characters).  Often this is symbology-dependent.  If check digits are required, they are generated internally in UnForm.  Within barcode families, if a unique symbology is associated with a specific length, then UnForm will internally select the correct symbology.  For example, if a 9-digit zip code is specified with symbology 900 (5-digit post net), then symbology 905 will be used automatically.

 

expr is an expression that generates the text to barcode.

 

symbology is one of the following numbers:

 

Code

Description

100

UPC VERSION A

105

UPC VERSION A + 2 DIGIT SUPPLEMENTAL ADD-ON

110

UPC VERSION A + 5 DIGIT SUPPLEMENTAL ADD-ON

125

UPC VERSION E

126

UPC VERSION E supporting number series 1, 6-digit input

130

UPC VERSION E + 2 DIGIT SUPPLEMENTAL ADD-ON

135

UPC VERSION E + 5 DIGIT SUPPLEMENTAL ADD-ON

150

UPC/EAN/IAN – 13

155

UPC/EAN/IAN – 8

200

INTERLEAVED 2 OF 5 – 2:1 CHECK DIGIT

205

INTERLEAVED 2 OF 5 – 2:1 NO CHECK DIGIT

220

INTERLEAVED 2 OF 5 – 3:1 CHECK DIGIT

225

INTERLEAVED 2 OF 5 – 3:1 NO CHECK DIGIT

300

STANDARD CODE 2 OF 5 – 2:1 CHECK DIGIT

305

STANDARD CODE 2 OF 5 – 2:1 NO CHECK DIGIT

320

STANDARD CODE 2 OF 5 – 3:1 CHECK DIGIT

325

STANDARD CODE 2 OF 5 – 3:1 NO CHECK DIGIT

400

CODE 39 (3 OF 9) – 2:1 NO CHECK DIGIT

405

CODE 39 (3 OF 9) – 2:1 CHECK DIGIT

410

CODE 39 (3 OF 9) – 2:1 NO CHECK DIGIT (FULL 128 ASCII)

415

CODE 39 (3 OF 9) – 2:1 CHECK DIGIT (FULL 128 ASCII)

440

CODE 39 (3 OF 9) – 3:1 NO CHECK DIGIT

445

CODE 39 (3 OF 9) – 3:1 CHECK DIGIT

450

CODE 39 (3 OF 9) – 3:1 NO CHECK DIGIT (FULL 128 ASCII)

455

CODE 39 (3 OF 9) – 3:1 CHECK DIGIT (FULL 128 ASCII)

500

CODE 93

600

CODE 128 – SERIES "A"

605

CODE 128 – SERIES "B"

610

CODE 128 – SERIES "C"

700

CODABAR – NO CHECK DIGIT

705

CODABAR – CHECK DIGIT

900

USPS Post net – 5 DIGIT

905

USPS Post net – 9 DIGIT

910

USPS Post net ABC – 11 DIGIT

950

USPS Planet

960

USPS Intelligent Mail (Aka: OneCode, the 4-State Customer Barcode, 4CB and USPS4CB)

1000

PDF417

1010

MicroPDF

1100

Maxicode

1200

Data Matrix

1300

Aztec

1310

Aztec with binary content flag

1400

QR Code

1410

Micro QR Code

 

 

height is expressed in points or pixels.  If it is an integer, such as 50 or 175, then it is treated as pixels at 300 dpi.  If it is a floating-point number, like 18.7 or 12.0 (it contains a decimal point), then it is treated as points (1 point=1/72 inch).  The maximum height is 3000 pixels.

 

spc-pixels is the number of pixels allocated to spacing between bars, from 1 to 50, the default being 2.

 

In syntax 2, triggered by a quoted value as the first argument, barcodes will be generated at all locations on a page where the text or the regular expression regexpr occurs.  The value(s) to barcode will be based upon what text matches occur.  Each match will determine the value to barcode based on the word found (up to the first space or the end of the line), and the placement of the barcode.  The value to barcode can be adjusted by the getoffset cols (integer columns from the location of the match) and getcols cols (number of columns to use for the value).  The location of the barcode can be adjusted by the col and row parameter, where 0,0 is the location where the match is found.  The match text found can be erased from the report by setting eraseoffset cols and erasecols cols.

 

If the syntax "!=text" or "!~regexpr" is used, then the search is for positions NOT equal to the text or NOT matching the regular expression.  When using the NOT syntax, only one search is performed per line in the search region.

 

The search for text or regexpr can be limited to a region on the page by adding a suffix in the format '@left,top,right,bottom'.  To use a literal "@" character in text or regexpr, it is necessary to specify "\@".

 

Normally, UnForm will trim trailing spaces from the value being barcoded.  If the notrim option is present, trailing spaces will not be trimmed.  This can be critical if the barcode data contains spaces that must be retained.  For example, a Code 128 barcode uses encoding that can produce space characters for valid data, so the notrim option should be used to prevent valid data from being truncated.

 

For 1D symbologies, you can specify 'cols n' to fit the barcode into the specified number of columns (specified in integers), overriding the space-pixel setting.  This provides more precise space allocation.

 

 

Symbology Notes

 

Use symbolno n and totsymbol n for linked 2d barcodes, supported by QR code, Aztec, and Maxicode

 

Use "security n" or "errorlevel n" to set the error correction level with Aztec (range 1-89), QR (range 0 to 3), and PDF417 (range 1 to 8)

 

PDF417 also supports "mode 1" to enable binary compaction, and uses cols and rows for number of columns (1 to 30) and rows (3 to 90)

 

MicroPDF417 uses "cols n" to specify a symbol size, described in the following table:

 

Index

Symbol size (rows x cols)

Index

Symbol size (rows x cols)


0

automatic calculation

18

3 x 15

1

1 x 11

19

3 x 20

2

1 x 14

20

3 x 26

3

1 x 17

21

3 x 32

4

1 x 20

22

3 x 38

5

1 x 24

23

3 x 44

6

1 x 28

24

4 x 4

7

2 x 8

25

4 x 6

8

2 x 11

26

4 x 8

9

2 x 14

27

4 x 10

10

2 x 17

28

4 x 12

11

2 x 20

29

4 x 15

12

2 x 23

30

4 x 20

13

2 x 26

31

4 x 26

14

3 x 6

32

4 x 32

15

3 x 8

33

4 x 38

16

3 x 10

34

4 x 44

17

3 x 12

 

MicroPDF417 uses "mode n" to define an emulation mode:

 

0

Default format

1

UCC/EAN/GS1-128 Emulation

2

Code 128 Emulation

3

Code 128/FNC2 Emulation

4

Linked UCC/EAN/GS1-128

5

05 Macro

6

06 Macro

7

CC-A Data Mod

 

 

QR format uses "cols n" to specify a symbol size:

 

Index

Symbol size (rows x cols)

Index

Symbol size (rows x cols)


0

automatic calculation

21

101 x 101

1

21 x 21

22

105 x 105

2

25 x 25

23

109 x 109

3

29 x 29

24

113 x 113

4

33 x 33

25

117 x 117

5

37 x 37

26

121 x 121

6

41 x 41

27

125 x 125

7

45 x 45

28

129 x 129

8

49 x 49

29

133 x 133

9

53 x 53

30

137 x 137

10

57 x 57

31

141 x 141

11

61 x 61

32

145 x 145

12

65 x 65

33

149 x 149

13

69 x 69

34

153 x 153

14

73 x 73

35

157 x 157

15

77 x 77

36

161 x 161

16

81 x 81

37

165 x 165

17

85 x 85

38

169 x 169

18

89 x 89

39

173 x 173

19

93 x 93

40

177 x 177

20

97 x 97

 

MicroQR format uses "cols n" to specify a symbol size

 

Index

Symbol size (rows x cols)

Index

Symbol size (rows x cols)


0

automatic calculation

3

15 x 15

1

11 x 11

4

17 x 17

2

13 x 13

 

 

Data Matrix uses "cols n" to specify a symbol size:

 

Index

Symbol size (rows x cols)

Index

Symbol size (rows x cols)

0

automatic calculation

16

64 x 64

1

10 x 10

17

72 x 72

2

12 x 12

18

80 x 80

3

14 x 14

19

88 x 88

4

16 x 16

20

96 x 96

5

18 x 18

21

104 x 104

6

20 x 20

22

120 x 120

7

22 x 22

23

132 x 132

8

24 x 24

24

144 x 144

9

26 x 26

25

8 x 18

10

32 x 32

26

8 x 32

11

36 x 36

27

12 x 26

12

40 x 40

28

12 x 36

13

44 x 44

29

16 x 36

14

48 x 48

30

16 x 48

15

52 x 52

 

Data Matrix uses "mode n" to specify a format:

 

Index

Format

0

Default format

1

GS1/UCC/EAN

2

Industry

3

Macro 05

4

Macro 06

 

Aztec uses "cols n" to specify a symbol size:

 

Index

Symbol size (rows x cols)

Index

Symbol size (rows x cols)


0

automatic calculation

17

83 x 83

1

15 x 15

18

87 x 87

2

19 x 19

19

91 x 91

3

23 x 23

20

95 x 95

4

27 x 27

21

101 x 101

5

31 x 31

22

105 x 105

6

37 x 37

23

109 x 109

7

41 x 41

24

113 x 113

8

45 x 45

25

117 x 117

9

49 x 49

26

121 x 121

10

53 x 53

27

125 x 125

11

57 x 57

28

131 x 131

12

61 x 61

29

135 x 135

13

67 x 67

30

139 x 139

14

71 x 71

31

143 x 143

15

75 x 75

32

147 x 147

16

79 x 79

33

151 x 151

And 3 special sizes, usually used only for reader programming

34

19 x 19 (reader progr.)

36

27 x 27 (reader progr.)


35

23 x 23 (reader progr.)

 

Aztec uses "mode m" to specify a format:

 

Index

Format

0

default format

1

GS1/UCC/EAN

2

Industry

 

 

Version 9.0 notes

The internal barcode engine has been upgraded to use the TEC-IT barcode toolkit, which enables many new features and barcode symbologies, and eliminates the need for the Windows Support Server, which was required for certain features in previous releases.  The legacy 1D barcode kit is still available, by specifying a "notbc" option.

 

Barcodes are now generated before other raster data, such as boxes or text, in order to support human-readable text output.  This might change job appearance if boxes or text are drawn on top of the barcode image.

 

 

Version 5 Note

The positioning algorithm for PDF versions of the barcode was modified in Version 5 to match the positioning of laser barcodes.  If your application depends on this older algorithm, then you can modify your ufparam.txt file (preferably by copying it to ufparam.txc and then modifying that file, to avoid losing your changes during an update) to add (or change) 'v4pdfbcd=1' in the [defaults] section.

 

Drivers: pcl, pdf, ps

 

Examples:

 

barcode 10.5,22,{get(10,21,5)},900,12.0,2 will add a 12.0 point high, 5-digit post net barcode based on a zip code found at column 10, row 21.

 

barcode "bcd:@16,22,20,55",0,0,"",600,75,2, getoffset 4, getcols 10, erasecols 14 will search for data starting with "bcd:" in the region starting at column 16, row 22, through column 20, row 55, barcode the 10 characters following it, and erase the underlying text.