1. A device for correcting a document image, comprising: an extracting unit configured to extract first boundaries in a first direction of the document image, determine second boundaries in a second direction of the document image according to the first boundaries in the first direction, and extract lines in the first direction according to a content of the document image, where the first direction is one of a horizontal direction and a vertical direction of the document image, and the second direction is perpendicular to the first direction; a filtering unit configured to filter the lines in the first direction such that a difference between shapes of filtered lines and the first boundaries in the first direction is within a predetermined range; a constructing unit configured to extend the filtered lines to the second boundaries in the second direction according to the first boundaries in the first direction, adjust extended lines of the filtered lines according to adjacent lines adjacent to the filtered lines in the second direction and/or the first boundaries in the first direction, and construct a correcting mesh according to the first boundaries in the first direction and the second boundaries in the second direction and lines of which the extended lines have been adjusted; and a correcting unit configured to correct the document image according to the correcting mesh.