Barcode reader for datamatrix and linear codes