beautypg.com

A. bar code considerations, Precision bar code control, Error! bookmark not defined – AMT Datasouth PAL User Manual

Page 205

background image

A. Bar Code Considerations

Precision Bar Code Control

PAL's philosophy allows you to run the same PAL program on different printers and produce
labels that look the same, regardless of the printing method and printer resolution. PAL performs
this function very well for letters, lines, and boxes. There are, however, physical constraints that
prevent PAL from exactly reproducing bar codes on printers with different resolutions. PAL will
always attempt to adapt the bar codes to different printers and, although the bar codes will not
match exactly, they will usually be acceptable.

If you must have precise control, your PAL programs will become machine dependent. In op-
erational situations, this is not usually a problem. Getting precise control over bar code appearance
is not difficult. The major constraint that PAL must work with while converting bar code di-
mensions from user to device coordinates is bar code dimensions must be an integral number of
dots
. There is no way to print a fraction of a dot.

To illustrate how this might be a problem, consider what happens when a PAL program requests a
Code-39 bar code with a NarrowWidth of 0.01" and a WideRatio of 2.7:1 to be printed on a
printer with 8 dots/mm (203 dots/inch). The first problem comes with the conversion of 0.01" to
dots. To make narrow bars exactly 0.01" wide would require 2.03 dots. The best PAL can do on
the 8 dots/mm printer is 2 dots. In this case, the error is probably not noticeable.

However, look what happens when the width of the wide bars is calculated by multiplying those 2
dots by 2.7. The result is 5.4 dots. PAL will round this to 5 dots, giving an effective WideRatio of
2.5:1. There is no way to avoid this problem. If precise WideRatios are required, careful selection
of the NarrowWidth with a knowledge of the print density is required. A better solution is to
choose a WideRatio that can be achieved at the current resolution (for this example, 2:1, 2.5:1, or
3:1).

Now suppose bar codes made with the above program on the 8 dot/mm printer was acceptable as
PAL made it. What happens when the same program is run on a printer with 12 dots/mm (305
dots/inch)? The NarrowWidth will be 3 dots (with an insignificant error of .05 dots/bar). The wide
bars will be 8 dots wide, giving an effective WideRatio of 2.67:1. This will give wider bar codes
than the 8 dot/mm case and the difference would be noticeable. However, both bar codes would
probably be acceptable.