A document image processing device can correct the location of a document of
an
arbitrary format. The reference position of a document image is designated previously
by a reference position designation unit. The document image is input per page
and stored. A predetermined pixel block extraction unit extracts the predetermined
pixel block appearing commonly on each page, and the coordinate value of the predetermined
pixel block is supplied to a difference extraction unit. The difference extraction
unit calculates the difference value between the position of the extracted predetermined
pixel block and the reference position designated by the reference position designation
unit, and supplies the difference value to an image shifting unit. The image shifting
unit shifts the document image of that page based on the difference value, and
corrects the location of the document image. The predetermined pixel block used
for position correction can be set arbitrarily.