Patent ID: 8761620

Claim:
An image forming apparatus comprising: a calculating unit configured to specify pieces of thickness information for calculation of a difference between thicknesses of a recording medium among pieces of thickness information each indicating thicknesses of the recording medium and calculate the difference using the specified pieces of thickness information, the pieces of thickness information being obtained as a detection result by sequentially detecting the thicknesses of the recording medium being conveyed; a determining unit configured to determine whether the calculated difference is equal to or larger than a first threshold; and a transfer unit configured to transfer an image onto the recording medium using at least an alternating-current voltage when the difference is equal to or larger than the first threshold, wherein the calculating unit specifies the pieces of thickness information for calculation of the difference among the pieces of thickness information obtained by sequentially detecting the thicknesses of the recording medium excluding a maximum and a minimum among the pieces of thickness information and calculates the difference using the specified pieces of thickness information.