Balancing multiple column layout
First Claim
1. A method for managing a plurality of columns including an initial column and a final column in an electronic document (ED) described in a markup language, comprising:
- obtaining a text stream from the ED;
identifying, based on a plurality of attributes in the markup language, a plurality of widths of the plurality of columns, a height of the plurality of columns, and the number of columns in the plurality of columns, wherein each of the plurality of columns has the height and one of the plurality of widths;
identifying a total area of the plurality of columns based on the plurality of widths and the height;
calculating an area covered by the text stream by placing, using a layout engine, the text stream within the plurality of columns;
calculating a ratio by dividing the area covered with the total area;
calculating a line limit based on a product of the ratio and a number of lines per column; and
replacing, using the layout engine, a first portion of the text stream in the initial column until the line limit is reached and a second portion of the text stream in the final column.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for managing multiple columns in a document. The method includes obtaining a text stream from the document; obtaining a current fill limit associated with an initial column of the multiple columns; placing, using a layout engine, the text stream within the multiple columns according to the current fill limit; identifying, after placing the text stream, a first fill level of a final column of the multiple columns; calculating a first difference between the current fill limit and the first fill level of the final column; calculating, in response to the first difference exceeding a tolerance, a revised fill limit based on the current fill limit; placing, using the layout engine, the text stream within the multiple columns according to the revised fill limit.
9 Citations
11 Claims
-
1. A method for managing a plurality of columns including an initial column and a final column in an electronic document (ED) described in a markup language, comprising:
-
obtaining a text stream from the ED; identifying, based on a plurality of attributes in the markup language, a plurality of widths of the plurality of columns, a height of the plurality of columns, and the number of columns in the plurality of columns, wherein each of the plurality of columns has the height and one of the plurality of widths; identifying a total area of the plurality of columns based on the plurality of widths and the height; calculating an area covered by the text stream by placing, using a layout engine, the text stream within the plurality of columns; calculating a ratio by dividing the area covered with the total area; calculating a line limit based on a product of the ratio and a number of lines per column; and replacing, using the layout engine, a first portion of the text stream in the initial column until the line limit is reached and a second portion of the text stream in the final column.
-
-
2. A method for managing a plurality of columns including an initial column and a final column in an electronic document (ED) described in a markup language, comprising:
-
obtaining a text stream from the ED; identifying, based on a plurality of attributes in the markup language describing the ED, a plurality of widths of the plurality of columns, a height of the plurality of columns, and the number of columns in the plurality of columns, wherein each of the plurality of columns has the height and one of the plurality of widths; setting a first fill limit associated with the initial column of the plurality of columns to the height of the initial column; placing, using a layout engine, the text stream within the plurality of columns according to the first fill limit; identifying, after placing the text stream, a first fill level of the final column of the plurality of columns, wherein the first fill limit exceeds the first fill level; calculating a first difference between the first fill limit and the first fill level of the final column; calculating, in response to the first difference exceeding a tolerance and the first fill limit exceeding the first fill level, a second fill limit by multiplying the first fill limit by a scaling factor; replacing, using the layout engine, the text stream within the plurality of columns according to the second fill limit; identifying, after replacing the text stream, a second fill level, wherein the second fill level exceeds the second fill limit; calculating a second difference between the second fill limit and the second fill level of the final column; calculating, in response to the second difference exceeding the tolerance and the second fill level exceeding the second fill limit, a third fill limit by averaging the second fill limit and the first fill limit; and replacing, using the layout engine, the text stream within the plurality of columns according to the third fill limit. - View Dependent Claims (3, 4, 5)
-
-
6. A non-transitory computer readable storage medium storing instructions for managing a plurality of columns including an initial column and a final column in an electronic document (ED) described in a markup language, the instructions comprising functionality to:
-
obtain a text stream from the ED; identify, based on a plurality of attributes in the markup language describing the ED, a plurality of widths of the plurality of columns, a height of the plurality of columns, and the number of columns in the plurality of columns, wherein each of the plurality of columns has the height and one of the plurality of widths; set a first fill limit associated with an initial column of the plurality of columns to the height of the initial column; place, using a layout engine, the text stream within the plurality of columns according to the first fill limit; identify, after placing the text stream, a first fill level of a final column of the plurality of columns, wherein the first fill limit exceeds the first fill level; calculate a first difference between the first fill limit and the first fill level of the final column; calculate, in response to the first difference exceeding a tolerance and the first fill limit exceeding the first fill level, a second fill limit by multiplying the first fill limit by a scaling factor; replace, using the layout engine, the text stream within the plurality of columns according to the second fill limit; identify, after replacing the text stream, a second fill level of the final column, wherein the second fill level exceeds the second fill limit; calculate a second difference between the second fill level and the second fill limit; calculate, in response to the second difference exceeding the tolerance and the second fill level exceeding the second fill limit, a third fill limit by averaging the second fill limit and the first fill limit; and replace, using the layout engine, the text stream within the plurality of columns according to the third fill limit. - View Dependent Claims (7, 8)
-
-
9. A system for managing a plurality of columns including an initial column and a final column in an electronic document (ED) described in a markup language, comprising:
-
a processor; a convertor module configured to; identify, based on a plurality of attributes in the markup language, a plurality of widths of the plurality of columns, a height of the plurality of columns, and the number of columns in the plurality of columns, wherein each of the plurality of columns has the height and one of the plurality of widths; and set a first fill limit associated with an initial column of the plurality of columns to the height of the initial column; a layout engine executing on the processor and configured to; place the text stream within the plurality of columns according to the first fill limit; replace the text stream within the plurality of columns according to a second fill limit; and replace the text stream within the plurality of columns according to a third fill limit; and a constraint calculation module (CCM) configured to; calculate a first difference between the first fill limit and a first fill level of a final column of the plurality of columns, wherein the first fill level results from placement of the text stream according to the first fill limit; calculate, in response to the first difference exceeding a tolerance and the first fill limit exceeding the first fill level, a second fill limit by multiplying the first fill limit by a scaling factor; calculate a second difference between the second fill limit and a second fill level of the final column, wherein the second fill level results from replacement of the text stream according to the second fill limit; and calculate, in response to the second difference exceeding the tolerance and the second fill level exceeding the second fill limit, the third fill limit by averaging the second fill limit and the first fill limit. - View Dependent Claims (10, 11)
-
Specification