Patent ID: 7528986

Claim:
An image forming apparatus comprising: an image reading device that reads a manuscript and generates a manuscript image data; a command input device that inputs a command; and a layout analysis device that analyzes a layout of an image expressed by the manuscript image data, the layout analysis device comprising: an erection direction judgment device that judges an erection direction of the manuscript image; a spreading direction judgment device that judges a spreading direction of the manuscript by recognizing a border area between the pages of the manuscript image; and a page number extraction device that extracts a character string as a potential page number and judges whether the character string is a page number; the image forming apparatus further comprising: a controller that, on the condition that a command is inputted through the command input device for forming separate images for horizontally or vertically juxtaposed pages of a spread manuscript, decides a page order for the horizontally or vertically juxtaposed pages based on a result of analysis by the layout analysis device, wherein the controller decides an upper page as a former page under the condition that the manuscript is spread vertically according to the judgment result of the erection direction judgment device and the spreading direction judgment device, wherein the controller decides a page order based on the extracted page number under the condition that the spread manuscript is spread horizontally and under the condition that the page number is extracted, wherein, under the condition that the page number is not extracted, the controller judges whether there is any vertically written text area, and under the condition that the controller judges that there is vertically written text area, the controller decides a right side page is a former page, and wherein the controller judges, under the condition that only horizontally written text areas exist, the contextual relationship between the text areas separately existing in both of the horizontally juxtaposed pages and decides a page order based on the judgment result; and an image splitting device that generates split image data expressing two horizontally or vertically split images of the image expressed by the manuscript image data, and outputs the split image data in accordance with the order decided by the controller.