To provide an inspection device capable of shortening time required for quality inspection of whether or not a code satisfies predetermined conditions, and a printer.SOLUTION: When a plurality of images in which a position of bar codes 41, 42 on a
label L is the same are printed on a
label L one by one for each image, an image printed on the
label L with a serial number "1" is read by a CIS unit 23. From the read data, each bar code 41, 42 is inspected, and information for specifying the position of each bar code 41, 42 is acquired. Thereafter, when the CIS unit 23 reads an image printed on the label L upstream of the label L having the serial number "1" in a feeding direction, based on previously acquired information, a
processing range including each bar code 41, 42 is extracted from the read data, and the bar codes 41, 42 included in the extracted
processing range are inspected.SELECTED DRAWING: Figure 4