A method and apparatus for aligning a scan pattern to a two dimensional bar code
having parallel rows of codewords. The two dimensional bar code is scanned with
a scanning pattern oriented such that a plurality of lines thereof cross the bar
code rows. A determination if there is a non-zero angle between at least one of
the plurality of lines and the rows by decoding codewords in rows intersected by
the at least one line is made and the orientation of the scanning pattern is adjusted
to reduce the absolute value of the angle.