In processing documents, a scan-all-first mode is available, in which a set of documents is input part by part until all documents have been input, and, after completion of the input process, an output process is performed as a single job for the set of documents. In an intermediate state during the input process in which the set of documents is input part by part in the scan-all-first mode, a user is allowed to make settings of processing conditions associated with, for example, insertion of a sheet or insertion of a form image. In the job processed in the scan-all-first mode, insertion of the sheet or insertion of a composite image including the form image is performed according to the settings made in the intermediate state.