Patent ID: 7911641

Claim:
An image forming apparatus comprising: an automatic document feeding apparatus that conveys an original document; a document table on which an original document is to be placed; a reading section that reads out an image of the original document; a storage section that stores image data obtained by reading out the image of the original document read out by the reading section; a sheet feeding section that feeds sheets of paper; and a control section, wherein the control section executes reading out of the image of the original document either in a first mode in which the image of the original document is read while being conveyed by the original document using the automatic document feeding apparatus, or in a second mode in which the image of the original document is read while the reading section scans the image of the original document placed on the document table, the sheet feeding section has a sheet feeding tray that stores sheets and an attachment detection sensor that detects whether or not the sheet feeding tray is attached, and wherein the control section, when the attachment or detachment of the sheet feeding tray is detected by the attachment detection sensor during execution of reading out of the image in the first mode, suspends the conveying of the original document for reading of the original document image by the automatic document feeding apparatus, deletes from the storage section the image data obtained from the original document image whose reading was suspended, and conveys in a reverse direction the original document whose reading was suspended to a starting position of conveying, and when the attachment or detachment of the sheet feeding tray is detected by the attachment detection sensor during execution of reading out of the image in the second mode, suspends a scanning by a scanning unit of the reading section and the reading out of the original document image by the reading section, deletes from the storage section the image data obtained from the original document image whose reading was suspended, and moves the scanning unit of the reading section to a home position.