Patent ID: 7706014

Claim:
A printing device that analyzes a document of describing printable objects in a hierarchical manner in a preset format and prints the objects on a medium, said printing device comprising: a data storage module that stores data; a structural analysis module that analyzes a hierarchical tree structure of each object described in a given document and stores the analyzed tree structure into said data storage module; a layout setting module that, if medium orientation is identical with page orientation, repeats a layout process without orientation change, the layout process without orientation change laying out an element box, to which an object is applied, in a page box corresponding to a specific page and, if there is no area left in the specific page for layout of the element box, laying out the element box in a page box corresponding to a subsequent page, and if medium orientation is different from page orientation, repeats a layout process with orientation change, the layout process with orientation change laying out an element box in a page box corresponding to a specific page and performing coordinate conversion at a preset position of the laid-out element box based on a rotation angle which is determined to eliminate the difference between the page orientation and the medium orientation and, if there is no area left in the specific page for layout of the element box, laying out the element box in a page box corresponding to a subsequent page and performing coordinate conversion at a preset position of the laid-out element box based on the rotation angle; and a print execution module that, in response to a print command after laying out by the layout setting module, if medium orientation is identical with page orientation, reads out data stored in the data storage module according to the page box after layout by the layout setting module and draws the object on the medium, and if medium orientation is different from page orientation, reads out data stored in the data storage module according to the page box after layout by the layout setting module and draws the object on the medium based on a position after the coordinate conversion.