1. An image processing apparatus for judging for each page whether an obtained document image is similar to a preliminary reference image and then, on the basis of the judgment result, performing image processing on the document image, comprising: a storage section for storing a plurality of type identifiers each of which contains one or a plurality of image identifiers each for identifying each of a plurality of reference images page by page and thereby identifies a type of a document composed of a plurality of pages; a judgment section for judging whether the obtained document image is similar to a reference image; a selection section for, when said judgment section judges that the document image is similar to a reference image, selecting an image identifier which identifies the reference image from among the image identifiers stored in said storage section; and a first determination section for, for each type identifier which contains the image identifier selected by said selection section, determining whether a constitution of the document image corresponds with a constitution of the reference image by determining whether the image identifier contained in the type identifier corresponds with the image identifier which identifies the reference image judged as being similar to the document image.