Patent ID: 8336986

Claim:
An image forming apparatus comprising: a detection unit for scanning in a main-scanning direction at a speed equal to a speed of a carriage that moves in the main-scanning direction while discharging ink so as to detect a position of a leading end of a medium in a sub-scanning direction; a position acquisition unit for acquiring an end position of the detection unit in the main-scanning direction when image formation on a first medium is completed; and a control unit for controlling a leading end detection position of the detection unit in the main-scanning direction according to a moving amount of the detection unit and a moving amount of the medium when a leading end of a second medium is detected by the detection unit on which an image is formed following to the first medium, the moving amount of the detection unit being an amount corresponding to time required for the movement of the detection unit from the end position to a predetermined position of the main-scanning direction, the moving amount of the medium being an amount corresponding to a moving time of the medium required for the leading end of the second medium to move to a predetermined position in the sub-scanning direction.