The Barcode Data Structure
The following table describes the structured
representation of a barcode that is passed by an encoder to the
renderer as a dictionary when the PostScript is executed.
Element Key Value
------- --- -----
Space bar succession sbs Array containing the widths, in points, of
each bar and space, starting with the
leftmost bar.
Bar height succession bhs Array containing the height of each bar
in inches, starting with the leftmost bar.
Bar base succession bbs Array containing the offset of the base of
each bar in inches, starting with the
leftmost bar.
Human readable text txt Array of arrays that contain the character,
position, height, font and scale factor
(font size), in points, for each of the
visible text characters.
Renderer options opt String containing the user-defined renderer
options.
Other keys and values may be contained in this structure that override the render defaults with encoder specific defaults.
The structure is the complete internal
representation of the barcode and can be enumerated with the following
modified invokation which writes to the standard output stream:
0 0 moveto (^104^102Count^0990123456789^101!) (includetext) code128 {exch == ==} forall flush
For the above code, GhostScript generates the following on STDOUT:
/bhs
[1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0]
/sbs
[2 1 1 2 1 4 4 1 1 1 3 1 1 3 1 3 2 1 1 3 4 1 1 1 1 2 4 2 1 1 2 4 1 1 1
2 1 2 4 1 1 2 1 1 3 1 4 1 2 2 2 1 2 2 3 1 2 1 3 1 1 1 3 1 2 3 1 4 1 1 2
2 2 1 2 1 4 1 3 1 1 1 4 1 2 2 2 1 2 2 3 1 2 1 1 3 2 3 3 1 1 1 2]
/opt
(includetext)
/bbs
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
/txt
[[( ) 0 -7.0 /Courier 10.0] [( ) 11 -7.0 /Courier 10.0] [(C) 22 -7.0
/Courier 10.0] [(o) 33 -7.0 /Courier 10.0] [(u) 44 -7.0 /Courier 10.0]
[(n) 55 -7.0 /Courier 10.0] [(t) 66 -7.0 /Courier 10.0] [( ) 77 -7.0
/Courier 10.0] [(01) 88 -7.0 /Courier 10.0] [(23) 99 -7.0 /Courier
10.0] [(45) 110 -7.0 /Courier 10.0] [(67) 121 -7.0 /Courier 10.0] [(89)
132 -7.0 /Courier 10.0] [( ) 143 -7.0 /Courier 10.0] [(!) 154 -7.0
/Courier 10.0]]