The invention prevents inconveniences from being caused by ejection failure and unintended mixing of different colors. To this end, the invention performs preliminary ejection of ink after a wiping action to sweep mist adhering to a face of a printing head, in which an ejection opening is formed. Moreover, the amount of ink to be wastefully consumed by the preliminary ejection after the wiping is reduced. To this end, the number of preliminary ejections is regulated. The degree of adherence of mist to the ejection-opening-formed face depends on the amount of printing (the number of printed sheets, the number of ink ejections for printing, or the like). So, at the time of the preliminary ejection after the wiping, the number of ink ejections in the preliminary ejection is regulated in accordance with the amount of printing that has been done since the last wiping action.