Patent ID: 7894764

Claim:
An image forming apparatus comprising: an image forming section which forms an image on a transfer sheet conveyed to the image forming section; an edge detecting sensor which detects an edge position of the transfer sheet in a main scanning direction while the transfer sheet is conveyed to the image forming section; and a controller which controls an image writing position at the image forming section based on a result of an edge position detection by the edge detecting sensor; wherein the edge detecting sensor comprises a plurality of light sources each having a different wavelength, and the controller comprises a light source controller which controls lighting of the plural light sources, wherein the light source controller sequentially switches to light each of the plurality of light sources while the edge detecting sensor detects the edge position of a single transfer sheet, wherein the image forming apparatus further comprises: a memory section which stores each of sensor outputs obtained by the edge detecting sensor when each of the plurality of light sources each having a different wavelength is lit; and a comparing section which compares the sensor outputs stored in the memory section, and based on a result of comparison, determines a sensor output, among the sensor outputs respectively obtained when each of the plurality of light sources is lit, to be used for determining the edge position of the transfer sheet.