An image forming apparatus has a fixing unit that applies heat energy to
non-fused developer on a medium. The medium is advanced in a transport
path and a heater supplies heat energy to the fixing unit when the medium
passes the fixing unit. When a trailing end of the medium is a
predetermined distance upstream of the fixing unit, a controller operates
in a first mode in which the controller causes the heater to supply a
first amount of heat energy to the fixing unit. When the trailing end of
the medium is within a predetermined distance upstream of the fixing
unit, the controller operates in a second mode in which the controller
causes the heater to supply a second amount of heat energy to the fixing
unit. The second amount of heat energy is smaller than the first amount
of heat energy.