1. An image forming apparatus for primarily transferring a toner image to an intermediate transfer member by a primary transfer unit, secondarily transferring the toner image primarily transferred to the intermediate transfer member to a transfer material by a secondary transfer unit, and fixing the image secondarily transferred to the transfer material with a fixing unit comprising: a deflection amount detector disposed between the secondary transfer unit and the fixing unit, that detects information indicating a deflection amount of the transfer material by detecting a reflection of light illuminating the transfer material; a density detector that detects a density of the toner image that is primarily transferred to the intermediate transfer member with the primary transfer unit; and a controller that controls the deflection amount of the transfer material based on the density of the toner image that is detected by the density detector and the information indicating the deflection amount that is detected by the deflection amount detector.