A multifunctional device adapted for a serial transmission of image data from a transmission controller to a controller within the device using a plurality of allowable frame sizes set in advance, the multifunctional device comprising: an automatic sheet feeding device configured to automatically feed plural documents one by one to the device; a reading unit configured to optically read image data of the documents supplied by the automatic sheet feeding device; the controller being configured to receive serial image data transmitted by the transmission controller and to process information; and the transmission controller comprising: a serialization unit configured to insert the read image data into the payload of a frame, convert the frame into serial data, and transmit the serial data to the controller; a document size determination unit configured to determine whether a document has a regular size or an irregular size, wherein an irregular size is a read document size of a scanning direction that is shorter than a predetermined width and is longer than the maximum length in a sub-scanning direction of the regular size; and a document edge detection unit configured to detect the rear edge of the document in a case where the document size determination unit determines that the document has an irregular size; wherein, in a case where the document size determination unit determines that the document has an irregular size, the transmission controller is configured to transmit the image data of the document to the controller in a preset frame of a first frame size until the rear edge of the document is detected, and if a portion, which has not yet been transmitted, of the image data of the document exists when the rear edge of the document is detected, the transmission controller is configured to transmit the portion of the image data of the document to the controller in a frame of a second frame size smaller than the first frame size wherein transmitting of the portion of the image data of the document is finished before a start of transmission of image data corresponding to a next document. an automatic sheet feeding device configured to automatically feed plural documents one by one to the device; a reading unit configured to optically read image data of the documents supplied by the automatic sheet feeding device; the controller being configured to receive serial image data transmitted by the transmission controller and to process information; and the transmission controller comprising: a serialization unit configured to insert the read image data into the payload of a frame, convert the frame into serial data, and transmit the serial data to the controller; a document size determination unit configured to determine whether a document has a regular size or an irregular size, wherein an irregular size is a read document size of a scanning direction that is shorter than a predetermined width and is longer than the maximum length in a sub-scanning direction of the regular size; and a document edge detection unit configured to detect the rear edge of the document in a case where the document size determination unit determines that the document has an irregular size; a serialization unit configured to insert the read image data into the payload of a frame, convert the frame into serial data, and transmit the serial data to the controller; a document size determination unit configured to determine whether a document has a regular size or an irregular size, wherein an irregular size is a read document size of a scanning direction that is shorter than a predetermined width and is longer than the maximum length in a sub-scanning direction of the regular size; and a document edge detection unit configured to detect the rear edge of the document in a case where the document size determination unit determines that the document has an irregular size; wherein, in a case where the document size determination unit determines that the document has an irregular size, the transmission controller is configured to transmit the image data of the document to the controller in a preset frame of a first frame size until the rear edge of the document is detected, and if a portion, which has not yet been transmitted, of the image data of the document exists when the rear edge of the document is detected, the transmission controller is configured to transmit the portion of the image data of the document to the controller in a frame of a second frame size smaller than the first frame size wherein transmitting of the portion of the image data of the document is finished before a start of transmission of image data corresponding to a next document.