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 a vertical direction relative to the primary scanning direction, rotating section configured to rotate the image sensor; secondary scanning section configured to move the image sensor; 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 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 is controlled to within a depth-of-field range of the image sensor.