An image processor is provided with an acquisition unit; a discriminating
unit; a decomposing unit; and a rearranging unit. The acquisition unit
acquires image data and layout information of an original document which
are obtained by reading the original document in which the layout
information is recorded in advance. The discriminating unit discriminates
number of logical pages in the original document, an arranged order of
the logical pages, and orientation of the original document, based on the
layout information. The decomposing unit decomposes the image data into
the logical pages, based on the result of the discriminating. The
rearranging unit rearranges the decomposed logical pages according to a
predetermined output layout, and outputs image data in which the logical
pages has been rearranged.