A printer including a transport system for a recording medium, a printhead containing a plurality of print units each of which being capable of printing a pixel line when the printhead is scanned over the recording medium, and a failure compensation unit for controlling the print operation such that a failure of a print unit is compensated, wherein a segmentation unit is provided for dividing an image to be printed into segments containing different types of image information, and wherein the failure compensation unit includes a memory for storing a plurality of compensation strategies and a controller for selecting one of said compensation strategies in accordance with the segment to be printed.