Patent ID: 8269997

Claim:
A document processing apparatus comprising: an acquiring unit that acquires first document data containing plural pieces of page image data corresponding to pages of a document, wherein each page of the document has a first end and a second end opposite to the first end; and a document data output unit that outputs second document data in which an order or a direction of the plural pieces of page image data is changed, when the first document data contains first page image data indicating that an image is drawn in a first area corresponding to the first end of at least one of the pages of the document and second page image data indicating that an image is drawn in a second area corresponding to the second end of at least one of the pages of the document and when a page number of the first page image data and a page number of the second page image data have a predetermined relationship; a first detection unit that detects the first page image data from the first document data; a second detection unit that detects the second page image data from the first document data; and a determination unit that determines whether or not the page number of the first page image data and the page number of the second page image data have the predetermined relationship, wherein the document data output unit outputs the second document data in which the order or the direction of the plural pieces of page image data is changed based on a determination result by the determination unit.