For larger barcodes, hold the scanner farther away from the barcode.
For the barcodes with bars that are closer together, hold the scanner closer to the barcode.
The optimal scanning distance varies with barcode density, but 10 — 25 cm (4 — 10 in.) generally works.
Practice to determine what distances to work within.