Patent ID: 8840239

Claim:
An image forming device comprising: a forming component that forms an index, at a formation position, on a recording medium that is conveyed in a first direction and passes the formation position; an acquiring component that acquires measurement results, from a measuring component, of a width, in a second direction that intersects the first direction, of the recording medium on which the index is formed by the forming component; a formation control component that carries out control that causes the index to be formed by the forming component at a position that is at one end portion side, along the second direction, of the recording medium, and that is apart, along the second direction and by a distance corresponding to the width acquired by the acquiring component, from a formation reference position that is set at another end portion side, along the second direction, of the recording medium; a detecting component that, at a detection position that is further toward a downstream side in a conveying direction of the recording medium than the formation position, detects the index formed on the recording medium; a moving component that moves, along the second direction, a detection range in which the detecting component can detect the index; a sensing component that senses an offset amount, along the second direction, between the detection range of the detecting component and a position of the index formed on the recording medium, at the detection position; and a movement control component that carries out control that moves the detecting component by the moving component, in accordance with the offset amount sensed by the sensing component, wherein the index is a shape that has a portion whose length along the first direction varies continuously along the second direction, and on the basis of a length of the portion of the index detected by the detecting component, the sensing component senses the offset amount, along the second direction, between the detection range and the position of the index.