In an image forming apparatus which has a medium thickness detecting unit
for detecting a thickness of print medium and forms an image by an
electrophotographic process, the apparatus has a unit for detecting the
thickness of print medium that is used after a predetermined operation
and a unit for detecting the thicknesses of print media on a paper feed
tray at a period of a predetermined number of print pages. A target
temperature of a fixing device is set on the basis of the thickness of
print medium that is used after the predetermined operation and the
thicknesses of print media detected at the period of the predetermined
number of print pages. A waiting time is reduced and print quality can be
maintained by this apparatus.