1. An image forming apparatus for reading images of documents that are defined by a main scanning direction and a sub-scanning direction, and copying the images onto an image forming medium, comprising: conveyance means for conveying a document; reading means for reading an image of the document to obtain image data; determining means for determining whether or not the conveyed document should be copied first, and also determining, on the basis of the determination result, whether or not an orientation of the document should be detected; document orientation detecting means for extracting character data from the image data, recognizing the character data, and detecting the orientation of the document on the basis of the recognition result, if the determining means determines that the orientation of the document should be detected; image data rotation process means for executing a rotation process on the image data obtained by the reading means, on the basis of the detection result of the document orientation detecting means; and image forming means for reading the image data subjected to the rotation process by the image data rotation process means, thereby forming an image onto the image forming medium.