Patent ID: 8564823

Claim:
A scanner device utilizing an external storage device, the scanner device comprising: an internal storage device; an original data creation unit configured to create original data for one or more pages representing a scan target object which has been scanned; and a document data creation unit configured to calculate a digest value utilizing the original data for the one or more pages so as to create document data in the external storage device utilizing the original data for the one or more pages and the digest value, wherein the document data creation unit comprises: a writing process performing unit configured to perform, for each of a plurality of partial data constituting original data for one page included in the original data for the one or more pages, a writing process for writing the partial data at least in the external storage device, (A1) wherein if a remaining capacity in the internal storage device is not deficient in the writing process for writing a first type of target partial data which is partial data of a target of the writing process, the writing process performing unit writes the first type of target partial data in both of the internal storage device and the external storage device, and (A2) wherein if the remaining capacity in the internal storage device is deficient in the writing process for writing the first type of target partial data, the writing process performing unit writes the first type of target partial data only in the external storage device; a changing unit configured to change specific partial data included in the plurality of partial data after a completion of a plurality of writing processes for the plurality of partial data, wherein the writing process for the specific partial data is performed prior to the writing process for another partial data included in the plurality of partial data; and a calculating process performing unit configured to sequentially perform a calculating process for calculating the digest value by sequentially utilizing each of the plurality of partial data including the changed specific partial data, (B1) wherein if a second type of target partial data which is partial data of a target of the calculating process is stored in both of the internal storage device and the external storage device, the calculating process performing unit performs the calculating process by utilizing the second type of target partial data being stored in the internal storage device, and (B2) wherein if the second type of target partial data is stored only in the external storage device, the calculating process performing unit performs the calculating process by utilizing the second type of target partial data being stored in the external storage device.