Patent ID: 8250470

Claim:
An information processing apparatus, having a processor and a memory, which executes layout processing of content data in a page on the basis of a template that defines a layout of text and image as the content data in the page, comprising: a selecting unit adapted to select a template from a plurality of types of templates in accordance with a priority order; a deciding unit adapted to decide a difference between (1) the size and the position of a region in the template after the content data is inserted and (2) the size and the position of the region in the template before the content data is inserted, when a usage condition of the template selected by said selecting unit requires the difference between before and after layout control using the template; a using unit adapted to use the template selected by said selecting unit when the difference decided by said deciding unit meets the usage condition of the template; and a changing unit adapted to change the template selected by said selecting unit to a template different from the template selected by said selecting unit in accordance with the priority order when the difference decided by said deciding unit does not meet the usage condition of the template.