Patent ID: 7561293

Claim:
An image-forming device for selecting at least one element block from an element tree obtained by analyzing a structured document and arranging the selected element block into a predetermined page, the image-forming device comprising: an arrangement unit configured to arrange a first element block into the page; an update unit configured to update a first reference pointer that refers to the first element block, as a next-previous element block, after the first element block is arranged by the arrangement unit and a second reference pointer that refers to a second element block that is arranged after the first element block is arranged, as a current element block; a style-reference unit configured to refer to a style specification corresponding to the second element block; and a determination unit configured to determine which of the first updated reference pointer and the second updated reference pointer is suitable for use based on the style specification referred to by the style-reference unit, wherein the arrangement unit is configured to arrange the first element block by referring to either the first reference pointer or the second reference pointer determined by the determination unit.