An image forming apparatus includes a plurality of process units (20) contacting a continuous recording medium and transferring images on the recording medium, a separating and contacting mechanism (6) for controlling at least one of the recording medium and each of the process units to a separated state where the recording medium and the process unit are separated from each other and a contacting state where the recording medium and the process unit contact each other, and a controller (3) for controlling the separating and contacting mechanism at a position where the process unit confronts a non-printing region on the recording medium so as to put the recording medium and the process unit to the contacting state. <IMAGE>