A method and apparatus for reformatting a document is disclosed. In one
embodiment, the method comprises selecting a plurality of image segments
having a plurality of attributes and determining a plurality of positions
and a plurality of geometric operations to be performed on the plurality
of image segments according to the plurality of attributes.