A data reader (5, 105) comprising: a housing; a lens system (14, 114) carried in the housing, the lens system (14, 114) including one or more lens elements; an image sensor (16, 116) carried by the housing, the image sensor (16, 116) operable to acquire a set of images of an item in a field-of-view of the data reader (5, 105), the item bearing an optical label; a driver (28, 128) in operable communication with the lens system (14, 114), the driver (28, 128) operable to adjust a focus setting of the lens system (14, 114) by moving at least one of the one or more lens elements, wherein the driver (28, 128) adjusts a focus setting of the lens element, and wherein the image sensor (16, 116) acquires the set of images of the item with the lens system (14, 114) at the focus setting; and a decoding engine (42, 142) operable to decode the optical label from the set of images acquired by the image sensor (16, 116); characterized by a rangefinder (22, 122) operable to measure a distance between the data reader (5, 105) and the item in the field of view of the data reader (5, 105); and a controller (24, 124) operable to determine whether the optical code is decodable or non-decodable from the set of images based on an output signal from the decoding engine (42, 142), wherein, when the controller (24, 124) determines that the optical code is non-decodable, the controller (24, 124) is further operable to: analyze at least two images from the set of images acquired by the image sensor (16, 116) and determine contrast measurements for each of the at least two images; and identify in each of the at least two images one or more focal planes based on the determined contrast measurements, each of the one or more focal planes corresponding to a focus position of the lens system (14, 114); wherein, the driver (28, 128) adjusts the lens system (14, 114) to the focus position corresponding with at least one of the one or more focal planes, and wherein the decoding engine (42, 142) attempts further decoding with the lens system (14, 114) set at the focus position. a housing; a lens system (14, 114) carried in the housing, the lens system (14, 114) including one or more lens elements; an image sensor (16, 116) carried by the housing, the image sensor (16, 116) operable to acquire a set of images of an item in a field-of-view of the data reader (5, 105), the item bearing an optical label; a driver (28, 128) in operable communication with the lens system (14, 114), the driver (28, 128) operable to adjust a focus setting of the lens system (14, 114) by moving at least one of the one or more lens elements, wherein the driver (28, 128) adjusts a focus setting of the lens element, and wherein the image sensor (16, 116) acquires the set of images of the item with the lens system (14, 114) at the focus setting; and a decoding engine (42, 142) operable to decode the optical label from the set of images acquired by the image sensor (16, 116); characterized by a rangefinder (22, 122) operable to measure a distance between the data reader (5, 105) and the item in the field of view of the data reader (5, 105); and a controller (24, 124) operable to determine whether the optical code is decodable or non-decodable from the set of images based on an output signal from the decoding engine (42, 142), wherein, when the controller (24, 124) determines that the optical code is non-decodable, the controller (24, 124) is further operable to: analyze at least two images from the set of images acquired by the image sensor (16, 116) and determine contrast measurements for each of the at least two images; and identify in each of the at least two images one or more focal planes based on the determined contrast measurements, each of the one or more focal planes corresponding to a focus position of the lens system (14, 114); analyze at least two images from the set of images acquired by the image sensor (16, 116) and determine contrast measurements for each of the at least two images; and identify in each of the at least two images one or more focal planes based on the determined contrast measurements, each of the one or more focal planes corresponding to a focus position of the lens system (14, 114); wherein, the driver (28, 128) adjusts the lens system (14, 114) to the focus position corresponding with at least one of the one or more focal planes, and wherein the decoding engine (42, 142) attempts further decoding with the lens system (14, 114) set at the focus position.