PostScript emulation

This section describes more PostScript emulation operators that are supported when Forms and Bar Code Card is installed. These operators enable printing of bar code symbologies with user-specified parameters from within the PostScript data stream.Note: This functionality is not available in HP BarDIMM Pro.

Defining characteristics

The following operators let you further define characteristics of the bar code:

Operator

Characteristic

barcodeshow

Prints the specified bar code symbol.

barcodebbox

Returns the coordinates for the bounding box.

barcodewidth

Returns the X and Y displacements of the currentpoint.


For more information on bar code characteristic parameters and default values, see PostScript emulation operators .

Command structure considerations

Developers must be familiar with the standard that defines the bar code symbology being implemented. The incoming data is analyzed for valid parameters, such as string length and characters. When an invalid condition is detected, an error message appears. For more information, see Common error messages .

Characteristic values, other than the default value, must be explicitly specified. If no value is specified, then the default value is used. Previously specified non-default values are not retained.

Human-readable text (HRT)

HRT can be specified with one-dimensional bar codes under the following provisions:

Because two-dimensional bar codes can encode thousands of characters, HRT interpretation of the data may not be practical. If descriptive text is printed with the symbol, then any character size and font available may be selected. The text may be printed anywhere near the symbol and must not interfere with the bar code symbol or its quiet zones.

Currentpoint positioning

Note:  Currentpoint positioning applies with or without HRT. It also considers any specified quiet zones to be within the bounding box.

Currentpoint positioning is set as follows when printing with Forms and Bar Code Card:

Compressed data formats

Forms and Bar Code Card accepts data for symbologies regardless of format. Incoming data is analyzed to determine whether it is compressed. If necessary, compression is automatically performed before printing the bar code.

Checksum calculation

Some bar code symbologies define checksum characters as a requirement of the data format. In this case, Forms and Bar Code Card performs the checksum calculation and automatically places the characters according to the symbology specifications. Fixed-length data formats can be sent with or without checksum characters.

PostScript emulation operators

Operator

Function parameter

barcodeshow

String dict barcodeshow

Similar to the show operator, this function prints the specified bar code symbol at the currentpoint and advances the currentpoint by the displacement of the symbol (as returned by the barcodewidth operator).

For example:

(01234567890)
<<
/Symbology /UPC-A
/EmbedText /HalfEmbedded
/FontName /OCR-B

This operation prints a UPC-A symbol starting at the currentpoint with the data half-embedded using the OCR-B font. The default quiet zone of 0.25 in. at the start and end of the bar code is used. The default height of 620 and the default bar and space values of [8 16 24 32] are also used. The /Special key defaults to false, so the checksum is printed at the bottom left of the bar code. For the UPC-A symbology, the checksum character always prints when the embedded text is specified, so /PrintCheckChar is irrelevant.

barcodebbox

String dict barcodebbox ll x ll y ur x ur y

Similar to the pathbbox operator, if a barcodeshow shows the function, then the function returns the coordinates for the bounding box that encloses the specified bar code symbol.

For example:

(123456)
<<
/Symbology /Int2of5
/EmbedText /NoText
/QuietZone [0 0]
>> barcodebbox

This operation returns four values on the stack indicating the coordinates of the lower-left and the upper-right corner of the box. The box fully encloses the bar code that results from doing a barcodeshow with the same arguments. This bar code has no quiet zone and no text embedded, if shown. The default height value of 240 is used. The default bar and space values of [6 18] are also used. The /Special key does not apply to the /Int2of5 symbology. Because there is no text embedded, /PrintCheckChar is irrelevant.

barcodewidth

String dict barcodewidth w x w y

Similar to the stringwidth operator, this function returns the operand stack on the X and Y displacement of the currentpoint. A barcodeshow of the specified bar code symbol causes the displacement.

For example:

(0123456)
<<
/Symbology /EAN-8
/QuietZone [100 200]
/Bars [10 20 30 40]
/Spaces [ 9 18 27 36]
/Height 210
/EmbedText /Embedded
/FontName /Courier-Bold
>> barcodewidth

This operation returns two values on the stack. It indicates the change in currentpoint in the X and Y direction that results from a barcodeshow with the same data.

This example specifies a bar code with the following information:

  • A leading quiet zone of 100 and a trailing quiet zone of 200

  • A bar code height of 210

  • Bars with widths of 10, 20, 30, and 40

  • Spaces with widths of 9, 18, 27 and 36

It also specifies that using the Courier Bold font fully embeds the data within the code. For the EAN-8 symbology, the /Special key does not apply, and the checksum character always prints when the embedded text is specified, so /PrintCheckChar is irrelevant.


One-dimensional bar codes

Australia Post 4-State bar code descriptors

Key

Range

Default value

Description

/Symbology

N/A

/AustralianPostal

Identifies the bar code symbology.

/Bars

40–60 dec

50 dec

[int]

Sets the bar width to 1/100 mm.

/Spaces

22–25 dec

24 dec

[int]

Sets the number of bars that print per inch.

/TrackerHeight

100–160 dec

130 dec

[int]

Sets the tracker height to 1/100 mm.

/Ascender, Descender Offset

160–210 dec

185 dec

[int]

Sets the ascender and descender offset to 1/100 mm.

The total height of an ascender or descender is the sum of this field and the tracker height.

/FCC

11 dec

45 dec

59 dec

62 dec

11 dec

[int]

Sets the FCC.

/Encoding

0 for C table

1 for N table

0 dec

[int]

Sets the encoding table.

/QuietZone

[int int]

150 150 dec

[array of integers]

Optional.

Sets the quiet zone in /Units.

/Units

N/A

N/A

The value is 1/100 mm.


Singapore Post 4-State bar code bar code descriptors

Key

Range

Default value

Description

/Symbology

N/A

/SingaporePostal

Identifies the bar code symbology.

/Bars

38–63 dec

50 dec

[int]

Sets the bar width to 1/100 mm.

/Spaces

20–24 dec

22 dec

[int]

Sets the number of bars that print per inch.

/TrackerHeight

102–152 dec

127 dec

[int]

Sets the tracker height to 1/100 mm.

/Ascender, Descender Offset

160–216 dec

188 dec

[int]

Sets the ascender and descender offset to 1/100 mm.

The total height of an ascender or descender is the sum of this field and the tracker height.

/QuietZone

[int int]

150 150 dec

[array of integers]

Optional.

Sets the quiet zone in /Units.

/Units

N/A

N/A

The value is 1/100 mm.


RM4SCC bar code bar code descriptors

Key

Range

Default value

Description

/Symbology

N/A

/RoyalMail

Identifies the bar code symbology.

/Bars

38–63 dec

50 dec

[int]

Sets the bar width to 1/100 mm.

/Spaces

20–24 dec

22 dec

[int]

Sets the number of bars that print per inch.

/TrackerHeight

102–152 dec

127 dec

[int]

Sets the tracker height to 1/100 mm.

/Ascender, Descender Offset

160–216 dec

188 dec

[int]

Sets the ascender and descender offset to 1/100 mm.

The total height of an ascender or descender is the sum of this field and the tracker height.

/QuietZone

[int int]

[150 150]

[array of integers]

Optional.

Sets the quiet zone in /Units.

/Units

N/A

N/A

The value is 1/100 mm.


Japan Post 4-State bar code descriptors

Key

Range

Default value

Description

/Symbology

N/A

/JapanPostal

Identifies the bar code symbology.

/Size

80–115 dec

100 dec

[int]

Optional.

The overall size of the bar code is in decipoints (1/10 pt).

/Bars

0.5–0.7 times the /Size parameter

0.6 times the /Size parameter

Sets the bar width to 1/100 mm.

The range for this value changes based on the /Size setting. For example, if /Size is set to 100, then the range for this value is 50 to 70, with the default setting being 60. If the value is set outside the valid range, then the closest value inside the range is used.

/Spaces

0.45–0.6 times the /Size parameter

0.6 times the /Size parameter

/TimingBar

1.05–1.35 times the /Size parameter

1.2 times the /Size parameter

/LongBar

3.4–3.6 times the /Size parameter

3.6 times the /Size parameter

/QuietZone

[int int]

[150 150]

[array of integers]

Optional.

Sets the quiet zone in /Units.

/Units

N/A

N/A

Optional.

The value is 1/100 mm.


Dutch Post 4-State bar code descriptors

Key

Range

Default value

Description

/Symbology

N/A

/DutchPostal

Identifies the bar code symbology.

/Bars

38–63 dec

50 dec

[int]

Sets the bar width to 1/100 mm.

/Spaces

20–24 dec

22 dec

[int]

Sets the number of bars that print per inch.

/SyncBarHeight

102–152 dec

127 dec

[int]

Sets the synchronization bar height to 1/100 mm.

/UpDnBarHeight

160–216 dec

188 dec

[int]

Sets the upward and downward bar height to 1/100 mm.

/QuietZone

[int int]

[150 150]

[array of integers]

Optional.

Sets the quiet zone in /Units.

/Units

N/A

N/A

Optional.

The value is 1/100 mm.


Swiss Post bar code descriptors

Key

Range

Default value

Description

/Symbology

N/A

/SwissPostal

Identifies the bar code symbology.

/HeightUnits

0–4 dec

4 dec

[int]

Specifies the units used for /BarHeight dimensions.

0 —Use the default value.

1 —1/300 in. units.

2 —1/600 in. units.

3 —1/1200 in. units.

4 —1/720 in. units.

/Height

/BarHeight must be:

  • Greater than or equal to 22 mm for module widths less than or equal to 0.45 mm (0.0177 in.)

  • Greater than or equal to 23 mm for module widths greater than 0.45 mm (0.0177 in.)

653 dec

[int]

Sets the bar height.

/WidthUnits

0–4 dec

2 dec

[int]

Specifies the units used for /BarWidth and /SpaceWidth dimensions.

0 —Use the default value.

1 —1/300 in. units.

2 —1/600 in. units.

3 —1/1200 in. units.

4 —1/720 in. units.

If /WidthUnits is specified, then it takes precedence over /Units.

/Width

0.40–0.51 mm

(0.0157–0.0200 in.)

11 dec

[int]

Sets the bar width.

The default value is 11/600 in.

/SpaceWidth

0.40–0.51 mm

(0.0157–0.0200 in.)

11 dec

[int]

Sets the space width.

The default value is 11/600 in.

/QuietZone

[int int]

[150 150]

[array of integers]

Optional.

Sets the quiet zone in /Units.

/Units

N/A

N/A

Optional.

The value is 1/600 in.


Intelligent Mail bar code descriptors

Key

Type

Range

Default value

Description

/Symbology

name

N/A

/IntelligentMail

Identifies the bar code symbology.

/Units

name

/300ths

/600ths

/1200ths

/600ths

The value is fixed.

/Bars

int

38–63 dec

50 dec

Sets the bar width in /Units.

/Pitch

int

20–24 dec

23 dec

Sets the number of bars that print per inch.

/TrackerHeight

int

100–160 dec

127 dec

Sets the tracker height in /Units.

/QuietZone

[int int]

[0–10000][0–10000]

[150 150]

The value is fixed.

/AscenderHeight

int

100–210

135

Sets the ascender and descender offset in 1/100 mm.

The total height of an ascender or descender is the sum of this field and the tracker height.

/EmbedText

name

/NoText

/Under

/Above

/NoText

Optional.

Determines the HRT location printed with the bar code.


Arguments for one-dimensional bar codes

Key

Type

Default value

Description

/Symbology

name

N/A

Required.

For a list of valid values, see Values for /Symbology key .

/Units

N/A

1/600 in.

Optional.

Other valid values are 1/300, 1/1200, and 1/720 in., which also apply to height and width units for any one-dimensional symbology.

/Height

int

The default value (in /Units) is based on the symbology. For more information, see Values for /Symbology key .

Optional.

/QuietZone

[int int]

[150 150]

Optional.

/Bars

[int int int int]

The default value (in /Units) is based on the symbology. For more information, see Values for /Symbology key .

Optional.

/Spaces

[num num num num]

The default value (in /Units) is based on the symbology. For more information, see Values for /Symbology key .

Optional.

/EmbedText

name or [name name]

The default value is based on the symbology. For more information, see Values for /Symbology key .

Optional.

Note:  Only ISSN and ISBN use [array].

/FontName

name

Courier Bold

Optional.

For a list of valid values, see Values for /FontName key .

/Pitch

[int]

22

Optional.

Note:  This key is used only by PostNet5, PostNet9, and PostNet11 bar codes.

Allowed values are from 20 to 24. Values less than 20 result in a pitch of 20; values greater than 24 result in a pitch of 24.

/Special

boolean

For UPC-A and Code 3 of 9, the default value is false.

For French 1 and German Postal, the default value is true.

Optional.

UPC-A

  • If the value is set to false, then the checksum is printed at the bottom left of the bar code.

  • If the value is set to true, then the checksum is printed at the middle left of the bar code.

Code 3 of 9

  • If the value is set to false, then the start and stop " * " characters with text do not print.

  • If the value is set to true, then the start and stop " * " characters with text print.

French 1 and German Postal

  • If the value is set to false, then the embedded text for the bar code is not formatted.

  • If the value is set to true, then the embedded text for the bar code is formatted.

/PrintCheckChar

boolean

The default value is false.

For French 1 and German Postal, the default value is true.

Optional.

French 1 and German Postal

  • If the value is set to false, then the checksum character with text does not print.

  • If the value is set to true, then the checksum character with text prints.

For the UPC-E symbologies, if the embedded text is specified, then the checksum characters are always printed.

  • If the value is set to false, then the checksum characters are printed with the same height as the text.

  • If the value is set to true, then the checksum characters are printed at half the height of the text.


Values for /Symbology key

Command

Function parameters (/Height, /Bars, and /Spaces units are in 1/600 in.)

/Symbology

Select the bar code

Default parameters 1

Characters

encoded

Symbol 2

length

Checksum

character

Bar code

symbology

/Height

/EmbedText

/Bars and /Spaces

[num

num

num

num]

/Codabar

Codabar

240

1

6

18

N/A

N/A

Mixed

N/A

No

/CodabarChk

Codabar with mod16 check digit

240

1

6

18

N/A

N/A

Mixed

N/A

Yes

/Code128A

Code 128 A

240

1

6

12

18

24

Mixed

N/A

Yes

/Code128auto

Code 128 autoswitch

240

1

6

12

18

24

Mixed

N/A

Yes

/Code128B

Code 128 B

240

1

6

12

18

24

Mixed

N/A

Yes

/Code128C

Code 128 C

240

1

6

12

18

24

Mixed

N/A

Yes

/Code39

Code 3 of 9

240

1

6

18

N/A

N/A

Mixed

N/A

No

/Code39Chk

Code 3 of 9 with check digit

240

1

6

18

N/A

N/A

Mixed

N/A

Yes

/Code39Ext

Code 3 of 9 extended

240

1

6

18

N/A

N/A

Mixed

N/A

No

/Code39ExtChk

Code 3 of 9 extended with check digit

240

1

6

18

N/A

N/A

Mixed

N/A

Yes

/Code93

Code 93

240

1

6

12

18

24

Mixed

N/A

Yes

/Code93Ext

Code 93 extended

240

1

6

12

18

24

Mixed

N/A

Yes

/Danish39

Danish PTT 3 of 9

240

1

6

18

N/A

N/A

Mixed

10

Yes 3

/French39

French Postal 3 of 9 A/R

300†

4†

6†

18†

N/A

N/A

Mixed

10

Yes 3

/EAN-8

EAN/JAN-8

420

3

8

16

24

32

Numeric

7

Yes 3

/EAN-8-2

EAN/JAN-8 with 2-digit supplemental

420

3

8

16

24

32

Numeric

9

Yes 3

/EAN-8-5

EAN/JAN-8 with 5-digit supplemental

420

3

8

16

24

32

Numeric

12

Yes 3

/EAN-13

EAN/JAN-13

620

3

8

16

24

32

Numeric

12

Yes 3

/EAN-13-2

EAN/JAN-13 with 2-digit supplemental

620

3

8

16

24

32

Numeric

14

Yes 3

/EAN-13-5

EAN/JAN-13 with 5-digit supplemental

620

3

8

16

24

32

Numeric

17

Yes 3

/EAN-128

EAN 128

240

1

6

12

18

24

Mixed

N/A

Yes

/Identcode

German Postal 2 of 5 Identcode

600

4

10

30

N/A

N/A

Numeric

11

Yes

/Ind2of5

Industrial 2 of 5

240

1

6

18

N/A

N/A

Numeric

N/A

No

/Ind2of5Chk

Industrial 2 of 5 with check digit

240

1

6

18

N/A

N/A

Numeric

N/A

Yes

/Int2of5

Interleaved 2 of 5

240

1

6

18

N/A

N/A

Numeric

Even

No

/Int2of5Chk

Interleaved 2 of 5 with check digit

240

1

6

18

N/A

N/A

Numeric

Odd

Yes

/ISBN

ISBN

620

3

8

16

24

32

Numeric 5

10

Yes 3

/ISSN

ISSN

620

3

8

16

24

32

Numeric 5

10

Yes 3

/Leitcode

German Postal 2 of 5 Leitcode

600

4

10

30

N/A

N/A

Numeric

13

Yes

/Mat2of5

Matrix 2 of 5

240

1

6

18

N/A

N/A

Numeric

N/A

No

/Mat2of5Chk

Matrix 2 of 5 with check digit

240

1

6

18

N/A

N/A

Numeric

N/A

Yes

/MSI

MSI

240

1

6

12

18

24

Numeric

N/A

No

/MSIChk10

MSI with mod10 check digit

240

1

6

12

18

24

Numeric

N/A

Yes

/MSIChk10-10

MSI with mod10 and mod10 check digit

240

1

6

12

18

24

Numeric

N/A

Yes

/MSIChk11-10

MSI with mod11 and mod10 check digit

240

1

6

12

18

24

Numeric

N/A

Yes

/Postnet5

USPS POSTNET 5-digit ZIP code

76†

1†

12†

N/A

N/A

N/A

Numeric

5

Yes

/Postnet9

USPS POSTNET 9-digit ZIP with 4 code

76†

1†

12†

N/A

N/A

N/A

Numeric

9

Yes

/Postnet11

USPS POSTNET 11-digit Delivery Point Code

76†

1†

12†

N/A

N/A

N/A

Numeric

11

Yes

/UCC-128

UCC-128

240

5

6

12

18

24

Mixed

N/A

Yes 3

/UPC-A

UPC-A

620

3

8

16

24

32

Numeric

11

Yes 3

/UPC-A-2

UPC-A with 2-digit supplemental

620

3

8

16

24

32

Numeric

13

Yes 3

/UPC-A-5

UPC-A with 5-digit supplemental

620

3

8

16

24

32

Numeric

16

Yes 3

/UPC-E

UPC-E

240

3

8

16

24

32

Numeric

6

Yes 3

/UPC-E-2

UPC-E with 2-digit supplemental

240

3

8

16

24

32

Numeric

8

Yes 3

/UPC-E-5

UPC-E with 5-digit supplemental

240

3

8

16

24

32

Numeric

11

Yes 3

/USPS-fim

USPS FIM

N/A

N/A

N/A

N/A

N/A

N/A

Numeric

N/A

No

/USPS-sack

USPS sack label, 8-digit 2 of 5

420†

1

9

27

N/A

N/A

Numeric

8

No

/USPS-tray

USPS tray label, 10-digit 2 of 5

420†

4

9

27

N/A

N/A

Numeric

10

No

/USPS-zebra

USPS Zebra code

225†

1†

150†

150†

N/A

N/A

" / " or " | "

N/A

No


Values for /EmbedText key

Value

Default parameter

Description

/Default

0

Use symbology-dependent default parameter. For more information, see Values for /Symbology key .

/NoText

1

Do not print the text.

/Embedded

2

Print the embedded text.

For ISBN and ISSN, this value is not allowed as the second array element.

/HalfEmbedded

3

Print the text half embedded.

/Under

4

Print the text below the bar code.

/Above

5

Print the text above the bar code.


Values for /FontName key

If displayed, then this key determines the font for the HRT.

/FontName

HRT font attribute

/Courier

Regular

/Courier-Bold

Bold

/Courier-Oblique

Italic

/Courier-BoldOblique

Bold italic

/LetterGothic

Regular

/LetterGothic-Bold

Bold

/LetterGothic-Italic

Italic

/LetterGothic-BoldItalic

Bold italic

/Univers-Medium

Regular

/Univers-Bold

Bold

/Univers-MediumItalic

Italic

/Univers-BoldItalic

Bold italic

/Univers-Condensed-Medium

Regular

/Univers-Condensed-Bold

Bold

/Univers-Condensed-MediumItalic

Italic

/Univers-Condensed-BoldItalic

Bold italic

/CG-Times

Regular

/CG-Times-Bold

Bold

/CG-Times-Italic

Italic

/CG-Times-BoldItalic

Bold italic

/OCR-B

Only one style


For example: /FontName /Courier

Using the symbology ID for ISBN and ISSN

The ISBN and ISSN bar codes are normally 10 digits in length, but they have extensions known as ISSN+2, ISSN+5, and ISBN+5. Adding a 5 or 2 to the end of the symbology ID does not obtain these variants. Adding two or five more characters to the string that defines the bar code obtains them. For example, the following is an ISSN+5 bar code defined in PostScript emulation:

%!PS
%
/Courier findfont
12 scalefont
200 400 moveto
(012345678934567)
<< /Symbology /ISSN >> barcodeshow
showpage

Two-dimensional bar codes

HIBC 39/128 bar code descriptors

Key

Type

Range

Default value

Description

/Symbology

name

N/A

N/A

Required.

Identifies the bar code symbology.

/HIBC128PAS.

/HIBC128SLS.

/HIBC39PAS.

/HIBC39SLS.

/Units

name

/300ths

/600ths

/1200ths

/600ths

Optional.

/Units is used in the calculations that follow.

/Height

int

150–600 dec

240 dec

(F0 hex)

Optional.

Sets the bar height in /Units.

Note:  Values beyond the defined range are clipped and set to the minimum and maximum values.

/Bars

[int]

5–27 dec

(05–1B hex)

6 dec

(06 hex)

Optional.

Sets the bar widths in /Units.

Note:  Values beyond the defined range are clipped and set to the minimum and maximum values.

/Spaces

[int]

5–27 dec

(05–1B hex)

6 dec

(06 hex)

Optional.

Sets the space widths in /Units.

Note:  Values beyond the defined range are clipped and set to the minimum and maximum values.

/EmbedText

name

/NoText

/Under

/Above

/Embedded

/HalfEmbedded

/Under

Optional.

If available, this key determines the HRT location printed with the bar code.

/FontName

name

For more information, see Values for /EmbedText key and Values for /FontName key .

/Courier-Bold

Optional.

Determines the font for the HRT.

If an invalid type name value is specified, then the default value is used. Otherwise, a typecheck error is returned.

/QuietZone

[int int]

[0 0]–[1200 1200] dec

[150 150] dec

([96 96] hex)

Optional.

Note:  Values less than the minimum use the default value of [150 150] dec ([96 96] hex).


The bar and space widths of HIBC must follow these ratios:

If the values of bar and space widths #2, #3, or #4 are invalid, then the values of the bar and space width #1 are used. If the values of the bar and space width #1 are invalid, then all the bar and space width fields use their default values.

ITF-14 bar code descriptors

Key

Type

Range

Default value

Description

/Symbology

name

N/A

N/A

Required.

Identifies the bar code symbology.

/Units

name

/300ths

/600ths

/1200ths

/600ths

Optional.

/Units is used in the calculations that follow.

/Height

int

The minimum value is 307 dec (01 33 hex).

There is no maximum value, but larger bar codes use more memory.

756 dec

(02 F4 hex)

Optional.

Sets the bar height in /Units.

Notes:

  • Bearer bars are not included.
  • Values beyond the defined range are clipped and set to the minimum and maximum values.

/Bars

[int int]

[12 27]–[24 72] dec

12 dec

(00 0C hex)

Optional.

Sets the bar widths in /Units.

Notes:

  • The bar width #2 value is 2.50 multiplied by the bar width #1 value.
  • Values beyond the defined range are clipped and set to the minimum and maximum values.

/Spaces

[int int]

[12 27]–[24 72] dec

12 dec

(00 0C hex)

Optional.

Sets the space widths in /Units.

Notes:

  • The minimum space width #2 value is 2.25 multiplied by the space width #1 value. The maximum value is 3 multiplied by the space width #1 value.
  • Values beyond the defined range are clipped and set to the minimum and maximum values.

/EmbedText

name

/NoText

/Under

/Above

/NoText

Optional.

If available, this key determines the HRT location printed with the bar code.

/FontName

name

For more information, see Values for /EmbedText key and Values for /FontName key .

/Courier-Bold

Optional.

Determines the font for the HRT.

If an invalid type name value is specified, then the default value is used. Otherwise, a typecheck error is returned.

/QuietZone

[int int]

[0 0]–[1200 1200] dec

[150 150] dec

([96 96] hex)

Optional.

Note:  Values less than the minimum use the default value of [150 150] dec ([96 96] hex).


PLANET bar code descriptors

Key

Type

Range

Default value

Description

/Symbology

name

N/A

N/A

Required.

Identifies the bar code symbology.

/Pitch

int

20–24 dec

22 dec

(16 hex)

Optional.

Selects the bar pitch.

Note:  Values less than 20 dec (14 hex) result in a pitch of 20. Values greater than 24 dec (18 hex) result in a pitch of 24.

/QuietZone

[int int]

[0 0]–[1200 1200] dec

[150 150] dec

([96 96] hex)

Optional.

Note:  Values less than the minimum use the default value of [150 150] dec ([96 96] hex).


Note:  For more information on PLANET bar codes, see One-dimensional bar code symbologies and Single-byte Forms Card fonts .

Arguments for two-dimensional bar code symbology

PDF417 arguments

Key

Type

Range

Default value

Description

/Symbology

name

N/A

N/A

Required.

Identifies the bar code symbology.

/Type

int

N/A

N/A

Required.

Notes:

  • If /Rows is set to 0, then /Columns is set manually.
  • If /Rows is set to 1, then /AspectRatio determines /Columns.

/Rows

int

3–90

N/A

Required.

Notes:

  • Values beyond the defined range cause a rangecheck error.
  • If /Type is set to 0, then the number of symbol rows is set manually.

/Columns

int

1–30

N/A

Required.

Notes:

  • Values beyond the defined range cause a rangecheck error.
  • If /Type is set to 0, then the number of symbol columns is set manually.

/AspectRatio

real

0.1–10.0

N/A

Required.

Notes:

  • Values beyond the defined range are set to 0.5.
  • If /Type is set to 1, then design the rows and columns ratio by dividing the value of the height to the width. For example, for a height-to-width ratio of 2/3, set /AspectRatio to 0.67.

/Units

N/A

N/A

1/600 in.

Optional.

/ModuleWidth

int

N/A

N/A

Required.

Sets the module width in /Units and specifies the X dimension (smallest element width).

For example, a value of 15 specifies an element width of 15/600 in.

/Height

int

N/A

N/A

Required.

Specifies the bar height in terms of /ModuleWidth.

For example, if /ModuleWidth is set to 15, then a value of 3 sets the bar height to 45/600 in.

/ErrorLevel

int

0–8

0

Optional.

This key designates the error correction levels by predetermined values. Values beyond the defined range set the rangecheck error. ECC can also be specified as a percentage. A valid nonzero ECC by percentage overrides ECC by predetermined value. For more information, see the /ErrorPercent key.

Predetermined values

0

1

2

3

4

5

6

7

8

Number of error codewords

2

4

8

16

32

64

128

256

512

/Mode

int

N/A

N/A

Optional.

Note:  This key is not supported.

/Macro

boolean

N/A

N/A

Optional.

Note:  This key is not supported.

/Truncated

boolean

N/A

false

Optional.

Note:  If the value is set to true, then the right row indicator and the stop pattern are omitted.

/QuietZone

[int int]

N/A

[150 150]

Optional.

Sets the quiet zone in 1/600 in.

/ErrorPercent

int

0%–400%

0%

Optional.

This key designates the error correction levels by percentage. Values beyond the defined range cause a rangecheck error. A valid nonzero value overrides the /ErrorLevel value. A zero value causes the /ErrorLevel value to be used.

If a valid nonzero percentage is specified, then the ECC level is computed by selecting one of the /ErrorLevel values. The ECC level selected is the one that best matches the number generated by multiplying the specified percentage by the number of data codewords in the symbol.

For example, if there are 20 data codewords in a symbol, and /ErrorPercent is specified at 100%, then the /ErrorLevel selected is the one closest to 20, or /ErrorLevel 3 (16 error codewords).

For the same 20 data codewords, and an /ErrorPercent of 35%, /ErrorLevel 2 is selected because it is closest to 20 x 0.35, or 7.


This example prints a PDF417 bar code with the following settings:

Sample01234
<<
/Symbology /PDF417
/Type 1
/AspectRatio 0.5
/Units /600ths 	
/ModuleWidth 20
/Height 2
/ErrorLevel 2
>>barcodeshow
%This is the data to be encoded.

%Specifies PDF417 symbology.
%Rows and columns determined by /AspectRatio.
%Height/width ratio is 1/2.
%Smallest element width in 600th units.
%Smallest element width is 20/600ths.
%Bar height is 40/600ths.
%Number of error code words is 8.
%Because they are not specified, /Truncated.
%Defaults to %false (no ;truncation) and /.
%QuietZone defaults to [150 150].

QR Code arguments

Key

Type

Range

Default value

Description

/Symbology

name

N/A

N/A

Required.

Identifies the bar code symbology.

/Units

name

/300ths

/600ths

/1200ths

/600ths

Optional.

/Model

name

/Model1

/Model2

/Model2

Optional.

Determines the model of the QR Code symbology.

/ECC

name

/L

/M

/Q

/H

/M

Optional.

Determines the ECC level.

/Mod

name

/Numeric

/Alphanumeric

/ECI

/Byte

/Kanji

/Mixed

/Mixed

Optional.

Sets the encoding mode.

/ModuleSize

int

The minimum value is 1.

10

Optional.

Sets the module element size in /Units.


MaxiCode arguments

Key

Range

Default value

Description

/Symbology

N/A

/MaxiCode

Identifies the bar code symbology.

/Mode

02 dec —Structured carrier message with numeric postal code

03 dec —Structured carrier message with alphanumeric postal code

04 dec —Standard symbol with standard error correction

05 dec —Full symbol with enhanced error correction

06 dec —Reader program with standard error correction

02 dec

N/A

/QuietZone

N/A

N/A

Sets the quiet zone in an array of two numbers.


Depending on the mode, the input data sent with the Transfer Bar Code Data command must follow these rules:

An optional secondary message follows the class of services for modes 2 and 3. For modes 4, 5, and 6, the message follows the number-of-labels field.

MicroPDF417 arguments

Key

Type

Range

Default value

Description

/Symbology

name

N/A

N/A

Required.

/Units

name

/300ths

/600ths

/1200ths

/600ths

Optional.

/Units is used in the calculations that follow.

/ModuleWidth

int

240–12000 dec

945 dec

(03 B1 hex)

Optional.

Sets the X dimension of the module (white or black rectangle) in 100th of an inch.

Notes:

  • You need a value of 9.45 (945 dec or 03 B1 hex) to set the X dimension to its default at 600 dpi.
  • Values beyond the defined range are clipped and set to the minimum and maximum values.

/ModuleHeight

int

480–60000 dec

1890 dec

(07 62 hex)

Optional.

Sets the Y dimension of the module (white or black rectangle) in 100th of an inch.

Notes:

  • The range of values of the Y dimension is between 2 and 5 times the value of the X dimension.
  • Values beyond this range are clipped and set to the minimum and maximum values.

/Rows

int

4–44 dec

0 dec

(00 hex)

Optional.

This key is an automatic operation specified by using 0.

/Columns

int

1–4 dec

0 dec

(00 hex)

Optional.

This key is an automatic operation specified by using 0.

/FontName

name

For more information, see Values for /EmbedText key and Values for /FontName key .

/Courier-Bold

Optional.

Determines the font for the HRT.

If an invalid type name value is specified, then the default value is used. Otherwise, a typecheck error is returned.

/QuietZone

[int int]

[0 0]–[1200 1200] dec

[150 150] dec

([96 96) hex)

Optional.

Note:  Values less than the minimum use the default value of [150 150] dec ([96 96] hex).


Swiss QR code arguments

Key

Type

Range

Default value

Description

/Symbology

name

N/A

N/A

Required.

Identifies the bar code symbology.

/ECC

name

/M

/M

Fixed.

Determines the ECC level.


Note:  No other arguments.

Composite bar codes

Key

Type

Range

Default value

Description

/Symbology

name

/UPC-A

/UPC-A-2

/UPC-A-5

/UPC-E

/UPC-E-2

/UPC-E-5

/EAN-8

/EAN-8-2

/EAN-8-5

/EAN-13

/EAN-13-2

/EAN-13-5

/UCC-128

/RSS14

/RSS14Truncated

/RSS14Stacked

/RSS14Limited

/RSS14Expanded

N/A

Required.

Identifies the bar code symbology.

/Units

name

/300ths

/600ths

/1200ths

/600ths

/Units is used in the calculations that follow.

/Height

int

Depends on the module height range of the linear component

Depends on the default module height range of the linear component

Optional.

Sets the Y dimension of the linear bar code.

/ModuleWidth

int

Depends on the module width range of the linear component

Depends on the default module width range of the linear component

Optional.

Sets the X dimension of the module (white or black rectangle) in 100th of an inch.

/EmbedText

name

/NoText

/Embedded

/HalfEmbedded

/Under

Depends on the default HRT location of the linear component, except for UCC-128 which uses /Under as its default value

If available, this key determines the HRT location printed with the bar code.

If /Above is specified, then the BCE automatically sets it to /HalfEmbedded. If an invalid value is specified, then the default value is used.

/FontName

name

For more information, see Values for /EmbedText key and Values for /FontName key .

/Courier-Bold

Optional.

Determines the font for the HRT.

If an invalid type name value is specified, then the default value is used. Otherwise, a typecheck error is returned.


The data in a PostScript emulation bar code sequence is represented within parentheses. For example, (0123456789). To add the composite component, add the pipe character, “ | ”, 124 decimal (72 hexadecimal) to the end of the normal bar code data.

For example, the following is a UPC-A composite bar code sequence:

(12345678901|Lexmark)
<</Symbology /UPC-A >> barcodeshow