An image forming apparatus includes a first registration mark detection
unit, second registration mark detection unit, CPU, and first
registration mark time difference storage. If the width (tp) of the first
registration mark signal detected by the second registration mark
detection unit is equal to or smaller than a set value, the CPU directly
uses, as an enable signal for controlling paper conveyance, the first
registration mark detection signal detected by the first registration
mark detection unit. If the width (tp') of the first registration mark
signal detected by the second registration mark detection unit is equal
to or larger than a set value, the CPU controls a paper conveyer by
setting, as a correct first registration mark position, a position
shifted by tE measured from an error signal, from the first registration
mark detection signal detected by the first registration mark detection
unit.