1. A computer-implemented method for providing page and table layout services to a client application program, the method comprising: receiving a request from the client application program to format a page of a document; in response to the request, performing one or more callback operations to the client application program to retrieve the request specifying one or more layout requirements and the portions of the document to be laid out; and laying out the portions of the document retrieved from the client application through the callback operations in a manner consistent with the layout requirements.