Patent ID: 8443282

Claim:
An information processing apparatus comprising at least one processor which executes a program stored in a memory, wherein the at least one processor functions as: a generating unit is configured to generate a template including first and second areas where content data is inserted; a setting unit configured to associate the first area with the second area before the content data is decided; a determination unit configured to determine an arrangement direction in the template by selecting between a vertical direction and a horizontal direction, the selecting based on the content data which is inserted into at least one of the first and second areas associated with each other by the setting unit; and a layout unit configured to arrange the first and second areas in the arrangement direction determined by the determination unit; wherein the first and second areas where the content data is inserted are outputted, the setting unit includes a second setting unit configured to assign priorities to the first and second areas, and the determination unit determines to arrange the first and second areas in a horizontal direction when vertically long image data is inserted as content data to a higher-priority area to be processed in accordance with the priorities assigned by the second setting unit and horizontally long image data is inserted as content data into a lower-priority area, and the determination unit determines to arrange the first and second areas in a vertical direction when horizontally long image data is inserted as content data into a higher-priority area to be processed in accordance with the priorities assigned by the second setting unit and vertically long image data is inserted as content data to a lower-priority area.