1. A document reader for reading an image from a document surface of a document placed on a platen, the document surface facing the platen, the document reader comprising: an image sensor which is rotatable about a rotational axis extending in a primary scanning direction contained in a plane parallel with the platen and movable in a secondary scanning direction which is contained in the plane parallel with the platen and is perpendicular to the primary scanning direction, the image sensor having a light-receiving surface configured to obtain image information from the document surface at a location facing in a vertical direction relative to the primary scanning direction, the image sensor having a fixed depth-of-field range in which the image sensor can obtain an image that is prevented from being blurred and distorted, in a distance between the document surface and the image sensor in a direction in which the light-receiving surface is oriented; a rotating section configured to rotate the image sensor; a secondary scanning section configured to move the image sensor; a distance information obtaining section configured to obtain distance information about a distance between the document surface and the platen while moving in the secondary scanning direction; and a secondary scanning control section configured to control the secondary scanning section while controlling the rotating section in accordance with a change in the distance between the document surface and the platen based on the distance information obtained by the distance information obtaining section, in such a manner that a distance between the document surface and the image sensor in a direction in which the light-receiving surface of the image sensor is oriented falls within the depth-of-field range of the image sensor, wherein: the secondary scanning control section controls the rotating section in such a manner that the direction in which the light-receiving surface of the image sensor is oriented is turned closer to a direction normal to the platen when a distance between the platen and a region of the document surface from which the image information is to be obtained is larger than a distance between the platen and a region of the document surface from which the image information has been obtained last, and the secondary scanning control section controls the rotating section in such a manner that the direction in which the light-receiving surface of the image sensor is oriented is turned away from the direction normal to the platen when the distance between the platen and the region of the document surface from which the image information is to be obtained is smaller than the distance between the platen and the region of the document surface from which the image information has been obtained last.