1. An editing apparatus for laying out image data and text data on a page, comprising: a distributing unit configured to distribute multiple sets of image data and text data into multiple sets of an image box and a text box upon a page in an order based on attribute information of the image data; a comparison unit configured to compare the amount of the text data to an upper limit amount of the text box into which the text data has been distributed; and a switching unit configured to, when the result of the comparison indicates that the amount of the text data is greater than the upper limit amount of the text box, switch the set of the image data and the text data with another set of image data and text data that has been distributed into another set of an image box and a text box, wherein the amount of the text data is less than the upper limit amount of the other text box, and the upper limit amount of the text box is greater than the amount of the other text data.