1. A computer-implemented system for processing objects in a document, comprising: a formatting component for formatting objects of a document based on object content; and a measurement component for computing optimal sizes of the objects based on results of the formatting.