1. A method of applying document content to adaptive templates, comprising: calculating a template score for a template based on how well the document content fits the template to determine whether to include the template in an appropriate set of templates; determining the size and position of an element within a template of the set of templates; calculating two-dimensional regions of a layout page; reducing the size of the two-dimensional regions according to element overlap and z-ordering; inserting document content into the two-dimensional regions; and paginating the document content by using the template score along with a previous template score for a previous page of content and a subsequent template score for a subsequent page of content to calculate an optimal sequence of the appropriate set of templates.