A technique for removing blank space from an input page that includes a
plurality of lines of text is provided. A plurality of objects are defined
to represent the lines of text. A size is determined for an output page,
such that the output page is smaller than the input page. It is then
determined whether all the objects fit within the output page. If not,
then the size of the output page is increased according to a predetermined
amount, and this action is repeated as necessary until all the objects can
fit onto the output page. The objects are then located on the output page,
which may include rearranging the objects, as necessary, such that the
relative positions of the objects in the output page are different from
the relative positions of the objects in the input page.